|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
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
com.citra.component.TristateCheckBox
public class TristateCheckBox
TristateCheckBox adds a 'partial selection state' to JCheckBox.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JCheckBox |
---|
JCheckBox.AccessibleJCheckBox |
Nested classes/interfaces inherited from class javax.swing.JToggleButton |
---|
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel |
Nested classes/interfaces inherited from class javax.swing.AbstractButton |
---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Icon |
partialIcon
the icon to show for partial selections |
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.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 | |
---|---|
TristateCheckBox()
Creates a TristateCheckBox. |
|
TristateCheckBox(String text)
Creates a TristateCheckBox. |
|
TristateCheckBox(String text,
Icon icon)
Creates a TristateCheckBox. |
|
TristateCheckBox(String text,
Icon icon,
int state)
Creates a TristateCheckBox. |
|
TristateCheckBox(String text,
int state)
Creates a TristateCheckBox. |
Method Summary | |
---|---|
protected Icon |
createPartialIcon()
Creates and returns an icon used for partial selections. |
Icon |
getPartialIcon()
Returns the icon to be used for partial selections. |
int |
getState()
Returns the state of the checkbox, taken from the model. |
protected void |
init(String text,
Icon icon)
|
void |
nextState()
Rotates between the checkbox's selection states: UNCHECKED -> CHECKED -> PARTIALLY_CHECKED |
void |
setModel(ButtonModel newModel)
Sets the model that this button represents. |
void |
setPartialIcon(Icon partialIcon)
Assigns the icon to be used for partial selections. |
void |
setState(int state)
Assigns the state of the checkbox to the model. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
Methods inherited from class javax.swing.JCheckBox |
---|
configurePropertiesFromAction, createActionPropertyChangeListener, getAccessibleContext, getUIClassID, isBorderPaintedFlat, paramString, setBorderPaintedFlat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Icon partialIcon
Constructor Detail |
---|
public TristateCheckBox()
public TristateCheckBox(String text)
public TristateCheckBox(String text, int state)
public TristateCheckBox(String text, Icon icon)
public TristateCheckBox(String text, Icon icon, int state)
Method Detail |
---|
protected Icon createPartialIcon()
public Icon getPartialIcon()
public int getState()
protected void init(String text, Icon icon)
init
in class AbstractButton
public void nextState()
public void setModel(ButtonModel newModel)
setModel
in class AbstractButton
newModel
- the new ButtonModel
AbstractButton.getModel()
public void setPartialIcon(Icon partialIcon)
partialIcon
- the partial selection icon to assignpublic void setState(int state)
state
- the state of the checkboxpublic void updateUI()
updateUI
in class JCheckBox
JComponent.updateUI()
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |