Modifier and Type | Field and Description |
---|---|
protected javax.swing.JList |
choice_list
The list containing the data.
|
protected int[] |
indices
The list of indices selected
|
protected java.lang.String |
label
the label for the text field
|
protected java.lang.String |
name
The name of the table for which the references are stored.
|
protected DBSchema |
reference
The reference schema object - the schema which is being referenced
This is really an arbitrary designation since both schemas 'root'
and 'reference' can be read by the same table (i.e.
|
protected DBSchema |
root
The root schema object - the schema which is being referenced from
This is really an arbitrary designation since both schemas 'root'
and 'reference' can be read by the same table (i.e.
|
Constructor and Description |
---|
ReferenceField(java.lang.String name,
DBSchema root,
DBSchema reference)
Creates a new instance of a reference field.
|
ReferenceField(java.lang.String name,
java.lang.String label,
DBSchema root,
DBSchema reference)
Creates a new instance of a reference field.
|
ReferenceField(java.lang.String name,
java.lang.String label,
java.lang.String rootTable,
KeyableField rootKey,
java.lang.String tableRef,
KeyableField keyRef,
DBField refName)
Creates a new instance of a reference 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.awt.event.ActionListener |
editWindow(java.awt.Container dest)
Populates a container with the component objects
necessary for editing the current widget
|
org.biopcd.widgets.WidgetInstance |
getInstance()
Returns the value of the variable.
|
java.lang.String |
getName()
Returns the database SQL name 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 |
setValue(java.lang.String newValue)
Changes the current default value for the widget.
|
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.
|
protected java.lang.String name
protected DBSchema root
protected DBSchema reference
protected java.lang.String label
protected transient javax.swing.JList choice_list
protected int[] indices
public ReferenceField(java.lang.String name, DBSchema root, DBSchema reference)
name
- the database key of the current fieldroot
- the root schema to reference fromreference
- the schema to referencepublic ReferenceField(java.lang.String name, java.lang.String label, DBSchema root, DBSchema reference)
name
- the database key of the current fieldlabel
- the label to display representing the parameter to be manipulated by the text field.root
- the root schema to reference fromreference
- the schema to referencepublic ReferenceField(java.lang.String name, java.lang.String label, java.lang.String rootTable, KeyableField rootKey, java.lang.String tableRef, KeyableField keyRef, DBField refName)
name
- the database key of the current fieldlabel
- the label to display representing the parameter to be manipulated by the text field.rootTable
- the table from which the reference comesrootKey
- the primary key of the table from which the reference comestableRef
- the table to referencekeyRef
- the primary key of the table to referencerefName
- the column in the reference table to displaypublic 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 save(java.lang.String keyvalue)
public org.biopcd.widgets.WidgetInstance getInstance()
public java.awt.event.ActionListener editWindow(java.awt.Container dest)
dest
- the destination to display the widget-editing componentspublic void setValue(java.lang.String newValue)
newValue
- the new default value for the widget.Copyright © 2008-2014 University of Manitoba.