public class DBTextField extends org.biopcd.widgets.TextWidget implements KeyableField
Constructor and Description |
---|
DBTextField(java.lang.String name)
Creates a new instance of a text field.
|
DBTextField(java.lang.String name,
java.lang.String label)
Creates a new instance of a text field.
|
Modifier and Type | Method and Description |
---|---|
void |
createTable(java.lang.Appendable out)
Writes the CREATE TABLE representation of the current database field to a writer object
|
void |
dbpcdout(int scope,
java.lang.Appendable out,
boolean isKey)
Writes the DBPCD representation of the database field to a writer object
|
void |
edit(java.sql.Connection conn,
java.awt.Container parent,
java.util.Map<java.lang.String,java.lang.String> results)
Displays the content of a field within a dataset entry.
|
java.lang.String |
getName()
Returns the database SQL name of the current field
|
java.lang.String |
getType()
Returns the database SQL type of the current field
|
java.lang.String |
getValue()
Returns the database SQL value of the current field
|
java.lang.String |
save(java.lang.String keyvalue)
Returns the SQL command(s) or fragment(s) necessary to save the current
database field.
|
java.awt.Component |
schemaEditor(java.sql.Connection conn,
javax.swing.JFrame mainFrame)
Displays the current field in an editor panel.
|
void |
view(java.sql.Connection conn,
java.awt.Container parent,
java.util.Map<java.lang.String,java.lang.String> results)
Displays the content of a field within a dataset entry.
|
public DBTextField(java.lang.String name)
name
- the database key of the current fieldpublic DBTextField(java.lang.String name, java.lang.String label)
name
- the database key of the current fieldlabel
- the label to display representing the parameter to be manipulated by the text field.public void view(java.sql.Connection conn, java.awt.Container parent, java.util.Map<java.lang.String,java.lang.String> results)
public void edit(java.sql.Connection conn, java.awt.Container parent, java.util.Map<java.lang.String,java.lang.String> results)
public java.awt.Component schemaEditor(java.sql.Connection conn, javax.swing.JFrame mainFrame)
schemaEditor
in interface DBField
mainFrame
- a JFrame object for any editor popup windows to be modal toconn
- a database connection object - for reference fieldspublic void dbpcdout(int scope, java.lang.Appendable out, boolean isKey) throws java.io.IOException
public void createTable(java.lang.Appendable out) throws java.io.IOException
createTable
in interface DBField
out
- the writer object to output the CREATE TABLE SQL-statement code.java.io.IOException
public java.lang.String getName()
public java.lang.String getValue()
getValue
in interface KeyableField
public java.lang.String getType()
public java.lang.String save(java.lang.String keyvalue)
Copyright © 2008-2014 University of Manitoba.