|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
javax.swing.JCheckBox
edu.neu.ccs.gui.BooleanView
A
for the input of a TypedViewboolean value.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JCheckBox |
JCheckBox.AccessibleJCheckBox |
| Nested classes inherited from class javax.swing.JToggleButton |
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel |
| Nested classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
static String |
BOOLEAN_VALUE
Bound property name for the boolean value property. |
protected boolean |
defaultValue
The default value for this input object. |
protected InputProperties |
properties
Property list for this view object. |
| Fields inherited from class javax.swing.JCheckBox |
BORDER_PAINTED_FLAT_CHANGED_PROPERTY |
| 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 edu.neu.ccs.gui.TypedView |
DATA_TYPE |
| Fields inherited from interface edu.neu.ccs.gui.Displayable |
DEFAULT_VIEW_STATE, VIEW_STATE |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| 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 | |
BooleanView(String labelText)
Constructs a view with the given label and a default value of true. |
|
BooleanView(String labelText,
Action action)
Constructs a view with the given label and a default value of true
that will execute the given action when clicked. |
|
BooleanView(String labelText,
Action action,
boolean b)
Constructs a view with the given label and the given default value that will execute the given action when clicked. |
|
BooleanView(String labelText,
boolean b)
Constructs a view with the given label and the given default value. |
|
| Method Summary | |
Stringable |
demandObject()
Returns an XBoolean object
whose state is set to the view state of this view. |
boolean |
getBooleanValue()
Returns the boolean value
that is the model for this view. |
Class |
getDataType()
Returns the XBoolean class object. |
static Font |
getDefaultFont()
Returns the default font for a JCheckBox. |
String |
getDefaultViewState()
Returns the String "true"
or the String "false"
corresponding with the default view state of this object. |
InputProperties |
getInputProperties()
Returns the input properties for this view. |
String |
getViewState()
Returns the String "true"
or the String "false",
corresponding with the view state of this object. |
protected static boolean |
parseBoolean(String data,
String caller)
Returns the boolean value
represented by the given String data. |
void |
refreshComponent()
Refreshes the component by repacking the parent window. |
Stringable |
requestObject()
Returns an XBoolean object
whose state is set to the view state of this view. |
void |
reset()
Resets the view state of this object to the default view state for this object. |
void |
setBooleanValue(boolean b)
Sets the boolean value that is the model
for this view to the given value. |
void |
setDefaultViewState(String data)
Sets the default view state for this view to the boolean value represented
by the given String data. |
void |
setFont(Font font)
Sets the font for this component. |
void |
setInputProperties(InputProperties p)
Sets the input properties for this view to the provided input properties. |
void |
setViewState(String data)
Sets the view state for this view to the boolean value represented
by the given String data. |
| Methods inherited from class javax.swing.JCheckBox |
configurePropertiesFromAction, createActionPropertyChangeListener, getAccessibleContext, getUIClassID, isBorderPaintedFlat, paramString, setBorderPaintedFlat, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.neu.ccs.gui.Displayable |
setEnabled |
| Field Detail |
public static final String BOOLEAN_VALUE
protected boolean defaultValue
protected InputProperties properties
| Constructor Detail |
public BooleanView(String labelText)
true.
labelText - the text for the labelBooleanView(String, boolean),
BooleanView(String, Action),
BooleanView(String, Action, boolean)
public BooleanView(String labelText,
boolean b)
labelText - the text for the labelb - the default valueBooleanView(String),
BooleanView(String, Action),
BooleanView(String, Action, boolean)
public BooleanView(String labelText,
Action action)
true
that will execute the given action when clicked.
labelText - the text for the labelaction - the action to execute when the button is clickedBooleanView(String),
BooleanView(String, boolean),
BooleanView(String, Action, boolean)
public BooleanView(String labelText,
Action action,
boolean b)
labelText - the text for the labelaction - the action to execute when the button is clickedb - the default valueBooleanView(String),
BooleanView(String, boolean),
BooleanView(String, Action)| Method Detail |
public Stringable demandObject()
XBoolean object
whose state is set to the view state of this view.
demandObject in interface TypedViewStringable model objectrequestObject(),
TypedViewpublic Stringable requestObject()
XBoolean object
whose state is set to the view state of this view.
requestObject in interface TypedViewStringable model objectdemandObject(),
TypedViewpublic void setInputProperties(InputProperties p)
TypedViewSets the input properties for this view to the provided input properties.
If the given input properties list is null, the
property list for this view is set to the base property list
containing default property values.
setInputProperties in interface TypedViewp - the new input properties for the viewTypedView.getInputProperties()public InputProperties getInputProperties()
TypedView
getInputProperties in interface TypedViewTypedView.setInputProperties(InputProperties)public Class getDataType()
XBoolean class object.
getDataType in interface TypedViewTypedViewpublic void setViewState(String data)
boolean value represented
by the given String data.
setViewState in interface Displayabledata - the new view stategetViewState(),
Displayablepublic String getViewState()
String "true"
or the String "false",
corresponding with the view state of this object.
getViewState in interface DisplayableStringsetViewState(String),
Displayablepublic void setDefaultViewState(String data)
boolean value represented
by the given String data.
setDefaultViewState in interface Displayabledata - the new default view statereset(),
Displayablepublic String getDefaultViewState()
String "true"
or the String "false"
corresponding with the default view state of this object.
getDefaultViewState in interface DisplayableStringsetDefaultViewState(String),
reset()public void reset()
DisplayableResets the view state of this object to the default view state for this object.
Equivalent to: setViewState(getDefaultViewState()).
reset in interface DisplayableDisplayable.setViewState(String),
Displayable.getDefaultViewState()public void setBooleanValue(boolean b)
Sets the boolean value that is the model
for this view to the given value.
Fires property change BOOLEAN_VALUE.
b - the new valuegetBooleanValue()public boolean getBooleanValue()
boolean value
that is the model for this view.
setBooleanValue(boolean)public void setFont(Font font)
Sets the font for this component.
If the given font is null then it is set to
getDefaultFont().
Calls the super setFont method and
then refreshes the component in its parent view.
Fires property change FONT.
font - the font to set for this viewpublic static Font getDefaultFont()
public void refreshComponent()
protected static boolean parseBoolean(String data,
String caller)
boolean value
represented by the given String data.
data - the data String to be parsedcaller - the name of the method that requires parsing
JPTError - if there is an error parsing the data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||