echopointng
Class CalculatorField
java.lang.Object
nextapp.echo2.app.Component
echopointng.ComponentEx
echopointng.AbleComponent
echopointng.PopUp
echopointng.DropDown
echopointng.CalculatorField
- All Implemented Interfaces:
- AccessKeyable, Attributeable, Borderable, Delegateable, Expandable, Heightable, Insetable, MouseCursorable, Sizeable, ToolTipable, Widthable, java.io.Serializable, RenderIdSupport
public class CalculatorField
- extends DropDown
CalculatorField is a drop down component that contains a text
field and a drop down Calculator. The text field is updated with the contents
of the calculator when the Transfer button is pressed or other server
interactions happen.
The TextField and the Calculator shared the same underlying Document.
- See Also:
- Serialized Form
| Fields inherited from class echopointng.PopUp |
DEFAULT_TOGGLE_ICON, DEFAULT_TOGGLE_PRESSED_ICON, DEFAULT_TOGGLE_ROLLOVER_ICON, PROPERTY_POPUP, PROPERTY_POPUP_ALIGNMENT, PROPERTY_POPUP_ALWAYS_ON_TOP, PROPERTY_POPUP_BACKGROUND, PROPERTY_POPUP_BORDER, PROPERTY_POPUP_INSETS, PROPERTY_POPUP_LEFT_OFFSET, PROPERTY_POPUP_NEXT_TO_TOGGLE, PROPERTY_POPUP_ON_ROLLOVER, PROPERTY_POPUP_OUTSETS, PROPERTY_POPUP_TOP_OFFSET, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BORDER, PROPERTY_ROLLOVER_ENABLED, PROPERTY_TARGET, PROPERTY_TARGET_BACKGROUND, PROPERTY_TARGET_BORDER, PROPERTY_TARGET_INSETS, PROPERTY_TARGET_ROLLOVER_BACKGROUND, PROPERTY_TARGET_ROLLOVER_BORDER, PROPERTY_TOGGLE_BACKGROUND, PROPERTY_TOGGLE_BORDER, PROPERTY_TOGGLE_ICON, PROPERTY_TOGGLE_INSETS, PROPERTY_TOGGLE_PRESSED_BACKGROUND, PROPERTY_TOGGLE_PRESSED_BORDER, PROPERTY_TOGGLE_PRESSED_ENABLED, PROPERTY_TOGGLE_PRESSED_ICON, PROPERTY_TOGGLE_ROLLOVER_BACKGROUND, PROPERTY_TOGGLE_ROLLOVER_BORDER, PROPERTY_TOGGLE_ROLLOVER_ICON |
| Fields inherited from class nextapp.echo2.app.Component |
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY |
| Fields inherited from interface echopointng.able.MouseCursorable |
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI |
|
Constructor Summary |
CalculatorField()
Constructs a CalculatorField with a
value of zero. |
CalculatorField(double value)
Constructs a CalculatorField with the
specified value |
| Methods inherited from class echopointng.PopUp |
getExpansionGroup, getExpansionModel, getPopUp, getPopUpAlignment, getPopUpAlwaysOnTop, getPopUpBackground, getPopUpBorder, getPopUpInsets, getPopUpLeftOffset, getPopUpOutsets, getPopUpTopOffset, getRolloverBackground, getRolloverBorder, getTarget, getTargetBackground, getTargetBorder, getTargetInsets, getTargetRolloverBackground, getTargetRolloverBorder, getToggleBackground, getToggleBorder, getToggleIcon, getToggleInsets, getTogglePressedBackground, getTogglePressedBorder, getTogglePressedIcon, getToggleRolloverBackground, getToggleRolloverBorder, getToggleRolloverIcon, isExpanded, isPopUpNextToToggle, isPopUpOnRollover, isRolloverEnabled, isTogglePressedEnabled, processInput, setExpanded, setExpansionGroup, setExpansionModel, setPopUp, setPopUpAlignment, setPopUpAlwaysOnTop, setPopUpBackground, setPopUpBorder, setPopUpInsets, setPopUpLeftOffset, setPopUpNextToToggle, setPopUpOnRollover, setPopUpOutsets, setPopUpTopOffset, setRolloverBackground, setRolloverBorder, setRolloverEnabled, setTarget, setTargetBackground, setTargetBorder, setTargetInsets, setTargetRolloverBackground, setTargetRolloverBorder, setToggleBackground, setToggleBorder, setToggleIcon, setToggleInsets, setTogglePressedBackground, setTogglePressedBorder, setTogglePressedEnabled, setTogglePressedIcon, setToggleRolloverBackground, setToggleRolloverBorder, setToggleRolloverIcon, validate |
| Methods inherited from class echopointng.AbleComponent |
getAccessKey, getBorder, getHeight, getInsets, getMouseCursor, getMouseCursorURI, getOutsets, getToolTipText, getWidth, setAccessKey, setBorder, setHeight, setInsets, setMouseCursor, setMouseCursorURI, setOutsets, setToolTipText, setWidth |
| Methods inherited from class echopointng.ComponentEx |
getAttribute, getAttributeNames, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, setAttribute, setHidden, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty |
| Methods inherited from class nextapp.echo2.app.Component |
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, verifyInput, visibleIndexOf |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TEXT_FIELD_STYLE
public static final Style DEFAULT_TEXT_FIELD_STYLE
- The default appearance of the TextField component with the CalculatorField
DEFAULT_CALCULATOR_FIELD_STYLE
public static final Style DEFAULT_CALCULATOR_FIELD_STYLE
- The default appearance of the Calculator component with the CalculatorField
DEFAULT_STYLE
public static final Style DEFAULT_STYLE
- The default appearance of the Calculator
CalculatorField
public CalculatorField()
- Constructs a
CalculatorField with a
value of zero.
CalculatorField
public CalculatorField(double value)
- Constructs a
CalculatorField with the
specified value
getValue
public double getValue()
- Returns:
- returns the value of the
CalculatorField.
- Throws:
java.lang.NumberFormatException - if the string does not contain a parsable
double.
setValue
public void setValue(double newValue)
- Sets the value of the
CalculatorField to be the given
double. The Calculator precision rules will apply.
- Parameters:
newValue - -
the new value
getTextField
public TextField getTextField()
- Returns:
- Returns the underlying TextField.
getCalculator
public Calculator getCalculator()
- Returns:
- Returns the underlying Calculator.
setTextField
public void setTextField(TextField newValue)
- Sets the underlying TextField
- Parameters:
newValue - -
The textField to set.
setCalculator
public void setCalculator(Calculator newValue)
- Sets the underlying TextField
- Parameters:
newValue - -
The textField to set.
getDocument
public Document getDocument()
- Returns the underlying Document of the CalculatorField
- Returns:
- the underlying Document of the CalculatorField
setDocument
public void setDocument(Document newValue)
- Sets the the underlying Document of the CalculatorField. This will change the
document on the underlying TextField and Calculator
- Parameters:
newValue - -
the new underlying Document of the CalculatorField
- Throws:
java.lang.IllegalArgumentException - - if the new Document is null