com::cosylab::gui::components::r2::JDoubleTextField Class Reference

Collaboration diagram for com::cosylab::gui::components::r2::JDoubleTextField:
Collaboration graph
[legend]

List of all members.

Classes

class  DoubleDocument

Public Member Functions

 JDoubleTextField ()
 JDoubleTextField (double value)
 JDoubleTextField (String text)
double getDoubleValue ()
void setDoubleValue (double newDoubleValue)

Protected Member Functions

Document createDefaultModel ()
void internalSet (double value)

Private Attributes

double doubleValue = 0.0
FloatingPointParser fpParser = new FloatingPointParser()

Detailed Description

Descendant of JTextField which only allows input of real-typed values. Stores value internally as double. Provides accessors and fires property change event on each valid value change. Creation date: (10/28/01 21:22:31)

Author:
:

Constructor & Destructor Documentation

com::cosylab::gui::components::r2::JDoubleTextField::JDoubleTextField (  )  [inline]

Default constructor for JDoubleTextField.

com::cosylab::gui::components::r2::JDoubleTextField::JDoubleTextField ( double  value  )  [inline]

Constructs the new JDoubleTextField and sets the default value.

Parameters:
text java.lang.String

References setDoubleValue().

com::cosylab::gui::components::r2::JDoubleTextField::JDoubleTextField ( String  text  )  [inline]

Constructs a new JDoubleTextField and sets the text property. If the text does not specify a valid double value, nothing will happen.

Parameters:
text java.lang.String

Member Function Documentation

Document com::cosylab::gui::components::r2::JDoubleTextField::createDefaultModel (  )  [inline, protected]

Overrides the default function to create DoubleDocument instead of the default one.

double com::cosylab::gui::components::r2::JDoubleTextField::getDoubleValue (  )  [inline]

Returns value represented by this component or zero if not valid. Creation date: (29-Oct-01 1:44:45 PM)

Returns:
double

References doubleValue.

void com::cosylab::gui::components::r2::JDoubleTextField::internalSet ( double  value  )  [inline, protected]

Sets the value and triggers the property change event. Creation date: (12/16/2001 17:57:14)

Parameters:
value double

References doubleValue.

Referenced by com::cosylab::gui::components::r2::JDoubleTextField::DoubleDocument::insertString(), com::cosylab::gui::components::r2::JDoubleTextField::DoubleDocument::remove(), and setDoubleValue().

void com::cosylab::gui::components::r2::JDoubleTextField::setDoubleValue ( double  newDoubleValue  )  [inline]

Sets the double value of this component. Creation date: (29-Oct-01 1:44:45 PM)

Parameters:
newDoubleValue double

References internalSet().

Referenced by JDoubleTextField().


Member Data Documentation

Referenced by getDoubleValue(), and internalSet().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2