com.norbl.cbp.ppe.gui.networkspec
Class Choice

java.lang.Object
  extended by com.norbl.cbp.ppe.gui.networkspec.Choice
Direct Known Subclasses:
AmiChoice, AvailabilityZoneChoice, InstanceTypeChoice, KeyPairChoice, NetworkNameChoice, NInstancesChoice, SecurityGroupChoice, SlotsPerHostChoice, SpotPriceChoice

public abstract class Choice
extends java.lang.Object

One of the possible choices for a variable that is specified via NetworkSpecFrame.


Field Summary
 java.lang.String ID
           
 ChoiceSet parentChoiceSet
           
 
Constructor Summary
Choice()
           
 
Method Summary
abstract  void createCC()
          Creates a choice Component that can be added to a JPanel.
abstract  java.lang.String getChoiceType()
           
 java.lang.String getColumnName(int iCol)
          Default implementation: returns getLabel()
 double getColumnWeight(int iCol)
          Default implementation: returns 1.0
 javax.swing.JComponent getComponent()
           
 javax.swing.JComponent getComponent(int iCol)
          Default implementation: returns ChoiceComponent.getComponent()
 int getGridBagAnchor(int iCol)
          Default implementation: returns GridBagConstraints.BASELINE_LEADING.
 java.awt.Insets getInsets(int iCol)
          Default implementation: all zeros.
abstract  java.lang.String getLabel()
           
 int getNColumns()
          Default implementation: returns 1.
 java.lang.String getToolTip()
           
abstract  java.lang.Object getValue()
           
 java.lang.Object getValue(int iCol)
          Default implementation: returns getValue()
 void load()
           
 void setColumnHeaderToolTip(int iCol, javax.swing.JComponent c)
           
 void setEnabled(boolean enabled)
           
 void setID(java.lang.String ID)
           
 void setParentChoiceSet(ChoiceSet parentChoiceSet)
           
 void setSelected(boolean selected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public java.lang.String ID

parentChoiceSet

public ChoiceSet parentChoiceSet
Constructor Detail

Choice

public Choice()
Method Detail

createCC

public abstract void createCC()
Creates a choice Component that can be added to a JPanel. If the component is itself a JPanel, its components are created but not loaded. That's the responsibility of the load() method.


load

public void load()

getValue

public abstract java.lang.Object getValue()

getLabel

public abstract java.lang.String getLabel()

getChoiceType

public abstract java.lang.String getChoiceType()

setID

public void setID(java.lang.String ID)

setParentChoiceSet

public void setParentChoiceSet(ChoiceSet parentChoiceSet)

setSelected

public void setSelected(boolean selected)

setEnabled

public void setEnabled(boolean enabled)

getNColumns

public int getNColumns()
Default implementation: returns 1.

Returns:

getColumnName

public java.lang.String getColumnName(int iCol)
Default implementation: returns getLabel()

Returns:

getValue

public java.lang.Object getValue(int iCol)
Default implementation: returns getValue()

Returns:

getComponent

public javax.swing.JComponent getComponent()

getComponent

public javax.swing.JComponent getComponent(int iCol)
Default implementation: returns ChoiceComponent.getComponent()

Returns:

getColumnWeight

public double getColumnWeight(int iCol)
Default implementation: returns 1.0

Returns:

getGridBagAnchor

public int getGridBagAnchor(int iCol)
Default implementation: returns GridBagConstraints.BASELINE_LEADING.

Returns:

getInsets

public java.awt.Insets getInsets(int iCol)
Default implementation: all zeros.

Parameters:
iCol -
Returns:

getToolTip

public java.lang.String getToolTip()

setColumnHeaderToolTip

public void setColumnHeaderToolTip(int iCol,
                                   javax.swing.JComponent c)