|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.AbstractButton | +--javax.swing.JToggleButton | +--com.sssw.rt.jform.AgcJToggleButton
A lightweight button component that displays an image and has two states: normal and selected. AgcJToggleButton can be bound to a database column.
You can assign icon images to show the normal and selected states, as well as other conditions, such as pressed, disabled, and rollover (when the mouse is over the button).
A toggle button control has a boolean value indicating whether it is selected. It also has an Object value that is stored in the database when the control is bound to a database column. You can specify source values for the storage value by setting the control's checked and unchecked values. When the control changes its selected state, the appropriate source value (checked or unchecked) becomes the current value.
To get or change the boolean state of the control, call
AbstractButton.isSelected()
or AbstractButton.setSelected(boolean)
.
To get or change the Object values, call:
AgcJToggleButton.getCheckedValue()
or AgcJToggleButton.setCheckedValue(Object)
AgcJToggleButton.getUncheckedValue()
or AgcJToggleButton.setUncheckedValue(Object)
AgcJToggleButton.getValue()
or AgcJToggleButton.setValue(Object)
Inner classes inherited from class javax.swing.JToggleButton |
JToggleButton.AccessibleJToggleButton,
JToggleButton.ToggleButtonModel |
Inner classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton,
AbstractButton.ButtonChangeListener |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
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.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcJToggleButton()
Creates an initially unselected toggle button with no text or image. |
|
AgcJToggleButton(Icon icon)
Creates an initially unselected toggle button with the specified image but no text. |
|
AgcJToggleButton(Icon icon,
boolean selected)
Creates a toggle button with the specified image and selection state, but no text. |
|
AgcJToggleButton(String text)
Creates an unselected toggle button with the specified text. |
|
AgcJToggleButton(String text,
boolean selected)
Creates a toggle button with the specified text and selection state. |
|
AgcJToggleButton(String text,
Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected. |
|
AgcJToggleButton(String text,
Icon icon,
boolean selected)
Creates a toggle button with the specified text, image, and selection state. |
Method Summary | |
Object |
getCheckedValue()
Gets the button's "checked value" - the value of the button when it is selected. |
boolean |
getState()
Deprecated. use isSelected(). |
Object |
getUncheckedValue()
Gets the button's "unchecked value" - the value of the button when it is not selected. |
Object |
getValue()
Gets the user-specified Object mapped to the current button state. |
void |
setCheckedValue(Object value)
Sets the button's "checked value" - the value of the button when it is selected. |
void |
setState(boolean state)
Deprecated. use setSelected(). |
void |
setUncheckedValue(Object value)
Sets the button's "unchecked value" - the value of the button when it is not selected. |
void |
setValue(Object value)
Sets the button's state, based on the value. |
Methods inherited from class javax.swing.JToggleButton |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiHelpInfo |
getHelpInfo,
setHelpInfo |
Constructor Detail |
public AgcJToggleButton()
public AgcJToggleButton(Icon icon)
icon
- the image displayed on the buttonpublic AgcJToggleButton(Icon icon, boolean selected)
icon
- the image displayed on the buttonselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedpublic AgcJToggleButton(String text)
text
- the text label displayed on the toggle buttonpublic AgcJToggleButton(String text, boolean selected)
text
- the text label displayed on the toggle buttonselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedpublic AgcJToggleButton(String text, Icon icon)
text
- the text label displayed on the toggle buttonicon
- the image displayed on the buttonpublic AgcJToggleButton(String text, Icon icon, boolean selected)
text
- the text label displayed on the toggle buttonicon
- the image displayed on the buttonselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedMethod Detail |
public void setCheckedValue(Object value)
value
- an Object that becomes the button's value when it is
selectedAbstractButton.setModel(ButtonModel)
method.AgcJToggleButton.getCheckedValue()
,
AgcJToggleButton.getValue()
,
AgcJToggleButton.setValue(Object)
public Object getCheckedValue()
AbstractButton.setModel(ButtonModel)
method.AgcJToggleButton.setCheckedValue(Object)
,
AgcJToggleButton.getValue()
,
AgcJToggleButton.setValue(Object)
public void setUncheckedValue(Object value)
value
- an Object that becomes the button's value when it is not
selectedAbstractButton.setModel(ButtonModel)
method.AgcJToggleButton.getUncheckedValue()
,
AgcJToggleButton.setCheckedValue(Object)
public Object getUncheckedValue()
AbstractButton.setModel(ButtonModel)
method.AgcJToggleButton.setUncheckedValue(Object)
,
AgcJToggleButton.getCheckedValue()
public void setValue(Object value)
value
- an Object that will be the button's valueAgcJToggleButton.getValue()
,
AgcJToggleButton.setCheckedValue(Object)
public Object getValue()
AbstractButton.setModel(ButtonModel)
method.AgcJToggleButton.getCheckedValue()
,
AgcJToggleButton.getUncheckedValue()
public void setState(boolean state)
AbstractButton.setSelected(boolean)
public boolean getState()
AbstractButton.isSelected()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |