java.awt.event.ItemListener, java.io.Serializable, java.util.EventListener, javax.swing.JComboBox.KeySelectionManagerpublic class DimensionedDoubleEditor
extends java.beans.PropertyEditorSupport
implements java.awt.event.ItemListener, java.io.Serializable, javax.swing.JComboBox.KeySelectionManager
| Constructor | Description |
|---|---|
DimensionedDoubleEditor(Dimension dimension) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getAsText() |
Returns the value in the editor's units, formatted as a text string.
|
java.lang.String |
getJavaInitializationString() |
Returns value in simulation units.
|
Unit |
getUnit() |
|
java.lang.Object |
getValue() |
Returns the value in simulation units.
|
void |
itemStateChanged(java.awt.event.ItemEvent evt) |
ItemListener interface implementation.
|
int |
selectionForKey(char aKey,
javax.swing.ComboBoxModel aModel) |
Implementation of KeySelectionManager interface that uses key press to
select a unit prefix (instead of selecting a combo box item).
|
void |
setAsText(java.lang.String s) |
Sets the value, interpreted as being in the editor's units, from a text string.
|
void |
setValue(double value) |
Sets the value to the given value, which is taken to be in simulation units.
|
void |
setValue(java.lang.Object obj) |
Sets the value to the given value, which is taken to be in simulation units.
|
javax.swing.JComboBox |
unitSelector() |
Returns a combo box that can be used to select the unit.
|
java.beans.PropertyEditor |
valueEditor() |
public DimensionedDoubleEditor(Dimension dimension)
public Unit getUnit()
public void itemStateChanged(java.awt.event.ItemEvent evt)
itemStateChanged in interface java.awt.event.ItemListenerpublic int selectionForKey(char aKey,
javax.swing.ComboBoxModel aModel)
selectionForKey in interface javax.swing.JComboBox.KeySelectionManagerpublic javax.swing.JComboBox unitSelector()
public java.beans.PropertyEditor valueEditor()
public java.lang.String getAsText()
getAsText in class java.beans.PropertyEditorSupportpublic void setAsText(java.lang.String s)
setAsText in class java.beans.PropertyEditorSupportpublic java.lang.Object getValue()
getValue in class java.beans.PropertyEditorSupportpublic void setValue(java.lang.Object obj)
setValue in class java.beans.PropertyEditorSupportpublic void setValue(double value)
public java.lang.String getJavaInitializationString()
getJavaInitializationString in class java.beans.PropertyEditorSupport