|
|||||||||
| Home >> All >> org >> maloi >> evolvo >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.maloi.evolvo.gui
Class UnboundPositiveDoubleField

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
org.maloi.evolvo.gui.UnboundPositiveDoubleField
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable, javax.swing.SwingConstants
- public class UnboundPositiveDoubleField
- extends javax.swing.JTextField
- implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.FocusListener
- extends javax.swing.JTextField
Extends JTextField, allowing only numbers to be entered. These numbers may be floating point (double, specifically), but are restricted to a specified range.
| Nested Class Summary | |
(package private) static class |
UnboundPositiveDoubleField.DoubleDocument
Defines a document model that restricts input to characters which may be used to define a double. |
| Nested classes inherited from class javax.swing.JTextField |
javax.swing.JTextField.AccessibleJTextField |
| Nested classes inherited from class javax.swing.text.JTextComponent |
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
(package private) int |
precision
precision determines how many decimals are displayed - the value is stored as a double, at it's full precision |
(package private) double |
value
Stores the current value of the field |
| Fields inherited from class javax.swing.JTextField |
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| 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.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
UnboundPositiveDoubleField()
Default constructor. |
|
UnboundPositiveDoubleField(double value)
|
|
UnboundPositiveDoubleField(double value,
int precision)
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handles all recieved ActionEvents. |
void |
focusGained(java.awt.event.FocusEvent e)
This method is called when a component gains the keyboard focus. |
void |
focusLost(java.awt.event.FocusEvent e)
This method is invoked when a component loses the keyboard focus. |
double |
getValue()
Returns the current value of the text field as a double. |
void |
setFieldText(java.lang.String s)
|
void |
setPrecision(int p)
|
void |
setValue(double newValue)
Sets the value of the text field from a double. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Handles all recieved ChangeEvents. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
precision
int precision
- precision determines how many decimals are displayed - the value is
stored as a double, at it's full precision
value
double value
- Stores the current value of the field
| Constructor Detail |
UnboundPositiveDoubleField
public UnboundPositiveDoubleField()
- Default constructor.
UnboundPositiveDoubleField
public UnboundPositiveDoubleField(double value)
UnboundPositiveDoubleField
public UnboundPositiveDoubleField(double value,
int precision)
| Method Detail |
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Handles all recieved ActionEvents.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
setFieldText
public void setFieldText(java.lang.String s)
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Handles all recieved ChangeEvents.
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
getValue
public double getValue()
- Returns the current value of the text field as a double.
setValue
public void setValue(double newValue)
- Sets the value of the text field from a double.
setPrecision
public void setPrecision(int p)
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Description copied from interface:
java.awt.event.FocusListener - This method is called when a component gains the keyboard focus.
- Specified by:
focusGainedin interfacejava.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Description copied from interface:
java.awt.event.FocusListener - This method is invoked when a component loses the keyboard focus.
- Specified by:
focusLostin interfacejava.awt.event.FocusListener
|
|||||||||
| Home >> All >> org >> maloi >> evolvo >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC