public class TimeLengthField
extends java.lang.Object
| Constructor and Description |
|---|
TimeLengthField(java.lang.String name)
ctor
|
TimeLengthField(java.lang.String name,
boolean isPositiveOnly)
ctor
|
TimeLengthField(java.lang.String name,
boolean isPositiveOnly,
boolean showYearsFld)
ctor
|
TimeLengthField(java.lang.String name,
double minutes)
ctor
|
TimeLengthField(java.lang.String name,
double minutes,
boolean isPositiveOnly,
boolean showYearsFld)
ctor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
boolean |
applyFields(boolean allFields)
Apply the fields to the internal state
|
javax.swing.JComponent |
getContents()
Get the gui contents
|
javax.swing.JComponent |
getFieldsComponent(boolean allFields)
Get the gui component
|
double |
getTime()
Current time interval as minutes
|
void |
setTime(double minutes)
set the time as minutes
|
boolean |
showDialog()
Show the dialog
|
boolean |
showDialog(java.lang.String topMsg)
Show the dialog
|
void |
timeChanged()
Signal that the time changed
|
java.lang.String |
toString()
to string
|
public TimeLengthField(java.lang.String name)
name - The name we usepublic TimeLengthField(java.lang.String name,
boolean isPositiveOnly)
name - The name we useisPositiveOnly - Only show positive numberspublic TimeLengthField(java.lang.String name,
double minutes)
name - The name we useminutes - minutespublic TimeLengthField(java.lang.String name,
boolean isPositiveOnly,
boolean showYearsFld)
name - The nameisPositiveOnly - only have positive valuesshowYearsFld - Also show the years fieldpublic TimeLengthField(java.lang.String name,
double minutes,
boolean isPositiveOnly,
boolean showYearsFld)
name - The nameminutes - Number of initial minutesisPositiveOnly - only have positive valuesshowYearsFld - Also show the years fieldpublic boolean showDialog()
public javax.swing.JComponent getFieldsComponent(boolean allFields)
allFields - ignoredpublic boolean showDialog(java.lang.String topMsg)
topMsg - If non-null show this in the dialog as a labelpublic boolean applyFields(boolean allFields)
allFields - ignoredpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to add.public javax.swing.JComponent getContents()
public double getTime()
public void setTime(double minutes)
minutes - minutespublic void timeChanged()
public java.lang.String toString()
toString in class java.lang.Object