|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.greenstone.gs3client.data.QueryFormData org.greenstone.gs3client.data.QueryFormData.QueryFormParam org.greenstone.gs3client.QueryFormControl
class QueryFormControl
Represents a control in a query form. This wrapper class is a subclass of QueryFormParam that presents its QueryFormParam details as an appropriate GUI item *with* label (based on the QueryFormParam's type) for display in its own JPanel. This wrapper class is a widget that knows to display this QueryFormParam -- and any child <param>s or <option>s -- in its own JPanel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.greenstone.gs3client.data.QueryFormData |
---|
QueryFormData.QueryFormParam |
Field Summary | |
---|---|
protected javax.swing.JComponent |
ref
the widget that's a visual representation of this QueryFormParam |
(package private) int |
width
|
Fields inherited from class org.greenstone.gs3client.data.QueryFormData.QueryFormParam |
---|
def, ignore, occurs, subElements, type |
Fields inherited from class org.greenstone.gs3client.data.QueryFormData |
---|
displayItem, name, OCCURS_ATT |
Constructor Summary | |
---|---|
QueryFormControl(org.w3c.dom.Element param)
Constructor that creates a QueryFormControl for a <param> element |
|
QueryFormControl(org.w3c.dom.Element param,
javax.swing.JPanel parentPanel)
Constructor that creates a QueryFormControl for a <param> element inside a panel. |
Method Summary | |
---|---|
protected void |
addGridBagComponent(javax.swing.JPanel panel,
javax.swing.JComponent comp,
java.awt.GridBagLayout gbLayout,
java.awt.GridBagConstraints gbConstraints,
int col,
int row,
int w,
int h)
The multi-panel is laid out with a GridBagLayout in order to make the layout more attractive (so that the form controls don't have as odd sizes as before when GraphPaperLayout was used). |
void |
createBooleanField()
Creates check box controls for the <param> elements whose types are GSXML.PARAM_TYPE_BOOLEAN. |
void |
createEnumListing(org.w3c.dom.Element param)
Creates combo boxes/drop-downs for the <param> elements whose types are GSXML.PARAM_TYPE_ENUM_SINGLE and listboxes for those whose types are GSXML.PARAM_TYPE_ENUM_MULTI. |
void |
createMultiPanel(org.w3c.dom.Element param,
javax.swing.JPanel parentPanel)
A multi-panel is created for a *set* of controls that occur more than once. |
void |
createTextField()
Creates text fields for the <param> elements whose types are GSXML.PARAM_TYPE_STRING or GSXML.PARAM_TYPE_INTEGER). |
void |
createWidget(org.w3c.dom.Element param)
Creates the appropriate form control for the <param> element, based on its type. |
void |
setSelectedValue(java.util.HashMap nameValsMap)
If called after the form containing these param controls has been displayed and the user has entered/selected values (i.e. |
Methods inherited from class org.greenstone.gs3client.data.QueryFormData.QueryFormParam |
---|
getSubElements, show |
Methods inherited from class org.greenstone.gs3client.data.QueryFormData |
---|
extractDisplayItem, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JComponent ref
int width
Constructor Detail |
---|
public QueryFormControl(org.w3c.dom.Element param)
param
- - a <param> element in a Query Service's describe
response XML messagepublic QueryFormControl(org.w3c.dom.Element param, javax.swing.JPanel parentPanel)
param
- - a <param> element in a Query Service's describe
response XML messageparentPanel
- - the panel inside which this QueryFormControl is to
display itself.Method Detail |
---|
public void createWidget(org.w3c.dom.Element param)
param
- - a <param> element in a Query Service's describe
response XML messagepublic void createBooleanField()
public void createTextField()
public void createEnumListing(org.w3c.dom.Element param)
param
- - a <param> element in a Query Service's describe
response XML messagepublic void createMultiPanel(org.w3c.dom.Element param, javax.swing.JPanel parentPanel)
param
- - a <param> element in a Query Service's describe
response XML messageparentPanel
- - the panel inside which the multipanel is to display
itself.protected void addGridBagComponent(javax.swing.JPanel panel, javax.swing.JComponent comp, java.awt.GridBagLayout gbLayout, java.awt.GridBagConstraints gbConstraints, int col, int row, int w, int h)
panel
- is the panel to add the control (or heading label) to.comp
- is the Query Form control or heading JLabel to be laid out.gbLayout
- is the GridBagLayout object used to lay out the panel.gbConstraints
- is the GridBagConstraints object for the panel's
GridBagLayout.col
- is the column value of the top-left of the control (for
setting the GridBagLayout's gridx value).row
- is the row value of the top-left of the control (for
setting the GridBagLayout's gridy value).w
- is the number of columns spanned by the control (for setting
the GridBagLayout's gridwidth value).h
- is the number of rows spanned by the control (for setting
the GridBagLayout's gridheight value).public void setSelectedValue(java.util.HashMap nameValsMap)
nameValsMap
- - a non-null HashMap. At the end of this method,
the nameValsMap HashMap will contain mappings from query parameter field
names to their user-entered values (for the field's associated
form controls).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |