public class DeviceSelector extends Device
Device.ActionSet
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,IAction> |
actionHash |
controller, unit
Constructor and Description |
---|
DeviceSelector(IController controller) |
Modifier and Type | Method and Description |
---|---|
void |
addOption(java.lang.String actionText,
IAction action) |
javax.swing.JLabel |
getLabel() |
javax.swing.JComboBox |
getSelector() |
java.awt.Component |
graphic(java.lang.Object obj)
Returns the GUI element for display in the simulation.
|
void |
removeOption(java.lang.String actionText) |
void |
setLabel(java.lang.String newLabel) |
void |
setSelected(int i)
Sets the i-th item (counting from 0) in the list as the one currently selected.
|
doAction, getController, getDimension, getPostAction, getPreAction, getUnit, graphic, setController, setPostAction, setPreAction, setUnit
protected final java.util.HashMap<java.lang.String,IAction> actionHash
public DeviceSelector(IController controller)
public javax.swing.JComboBox getSelector()
public javax.swing.JLabel getLabel()
public void setLabel(java.lang.String newLabel)
public void addOption(java.lang.String actionText, IAction action)
public void removeOption(java.lang.String actionText)
public void setSelected(int i)
public java.awt.Component graphic(java.lang.Object obj)
graphic
in interface GraphicalElement
graphic
in class Device
obj
- An object that might be used to specify the graphic that the GraphicalElement is to return.
In most cases the GraphicalElement ignores this parameter, and it can be set to null.Device
,
Display