|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
dods.clients.importwizard.VariableSelector
public abstract class VariableSelector
This is the base class for the classes used by CEGenerator to make a form to allow the user to constrain the data.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static RE |
extractName
|
protected static RE |
splitVars
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
VariableSelector()
Creates a new instance of VariableSelector |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent actionEvent)
|
void |
addActionListener(ActionListener a)
Add an action listener |
void |
addChild(VariableSelector child)
Add a child to the VariableSelector. |
protected void |
addVariables(Enumeration variables,
JPanel panel)
For an Enumeration of BaseType 's, this
function creates the appropriate Swing objects to select parts of the
variables which it both places in panel and returns as a
Vector . |
void |
applyCE(String ce)
Update the components on the screen to match a given constraint expression. |
void |
connectButton(JRadioButton button)
Connect a radio button to the VariableSelector. |
void |
deselectAll()
Deselect this variable selector and all it's children. |
protected void |
fireActionEvent()
Send an action event to all the classes that have been added as listeners. |
String |
generateCE(String prefix)
Generate a DODS constraint expression for the variable. |
JRadioButton |
getButton()
Return the radiobutton connected to the VariableSelector |
VariableSelector |
getChild(String name)
Get child name if it exists. |
Enumeration |
getChildren()
|
String |
getName()
|
boolean |
isEnabled()
|
boolean |
isSelected()
|
void |
reset()
Reset the everything in this VariableSelector and
all it's children. |
void |
selectAll()
Select this variable and all it's children |
void |
setActionCommand(String command)
Set the action command. |
void |
setEnabled(boolean enable)
Enable or disable the VariableSelector and any selected children. |
void |
setName(String newName)
Set the name of the VariableSelector (this is usually set to the name of the BaseType it's being used to
constrain. |
void |
setSelected(boolean select)
Select or deselect the VariableSelector. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static RE splitVars
protected static RE extractName
Constructor Detail |
---|
public VariableSelector()
Method Detail |
---|
public void addActionListener(ActionListener a)
a
- The ActionListenerprotected void addVariables(Enumeration variables, JPanel panel)
Enumeration
of BaseType
's, this
function creates the appropriate Swing objects to select parts of the
variables which it both places in panel
and returns as a
Vector
.
variables
- The DODS variables to create Selectors for.panel
- The panel to put these Selectors inpublic void actionPerformed(ActionEvent actionEvent)
actionPerformed
in interface ActionListener
public void addChild(VariableSelector child)
child
- The child.public void applyCE(String ce)
ce
- The constraint expression.public void connectButton(JRadioButton button)
button
- The button to connect to it.public void deselectAll()
public void selectAll()
public void reset()
VariableSelector
and
all it's children.
protected void fireActionEvent()
public JRadioButton getButton()
public VariableSelector getChild(String name)
name
if it exists. If not, return null.
name
- The name of the child
VariableSelector
) if it exists.public Enumeration getChildren()
Enumeration
.public String getName()
getName
in class Component
public String generateCE(String prefix)
prefix
- Anything that needs to come before the constraint
expression. This is usually a Structure, Sequence,
or other container class. If a '.' is needed between
the prefix and the part of the CE this class generates,
it must be included at the end of the prefix.
public boolean isEnabled()
isEnabled
in class Component
public boolean isSelected()
public void setActionCommand(String command)
command
- The action command.public void setEnabled(boolean enable)
setEnabled
in class JComponent
enable
- Enable (true) or Disable (false).public void setName(String newName)
BaseType
it's being used to
constrain.
setName
in class Component
newName
- The name.public void setSelected(boolean select)
select
- Select(true) or Deselect(false).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |