|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.lwuit.Component
com.sun.lwuit.Label
com.sun.lwuit.Button
com.sun.lwuit.CheckBox
public class CheckBox
Checkbox is a button that can be selected or deselected, and which displays its state to the user.
Field Summary |
---|
Fields inherited from class com.sun.lwuit.Button |
---|
STATE_DEFAULT, STATE_PRESSED, STATE_ROLLOVER |
Fields inherited from class com.sun.lwuit.Component |
---|
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Constructor Summary | |
---|---|
CheckBox()
Constructs a checkbox with no text |
|
CheckBox(Image icon)
Constructs a checkbox with the given icon |
|
CheckBox(java.lang.String text)
Constructs a checkbox with the given text |
|
CheckBox(java.lang.String text,
Image icon)
Constructs a checkbox with the given text and icon |
Method Summary | |
---|---|
protected Dimension |
calcPreferredSize()
Calculates the preferred size based on component content. |
boolean |
isSelected()
Return true if the checkbox is selected |
void |
paint(Graphics g)
This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering. |
protected java.lang.String |
paramString()
Returns a string representing the state of this component. |
void |
released(int x,
int y)
Invoked to change the state of the button to the released state |
void |
setSelected(boolean selected)
Selects the current checkbox |
Methods inherited from class com.sun.lwuit.Button |
---|
addActionListener, animate, dragInitiated, fireClicked, getBorder, getCommand, getDisabledIcon, getIconFromState, getPressedIcon, getRolloverIcon, getState, isSelectableInteraction, isToggle, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerHover, pointerHoverReleased, pointerPressed, pointerReleased, pressed, released, removeActionListener, setAlignment, setCommand, setDisabledIcon, setPressedIcon, setRolloverIcon, setToggle |
Methods inherited from class com.sun.lwuit.Label |
---|
getAlignment, getBaselineResizeBehavior, getGap, getIcon, getShiftText, getText, getTextPosition, getVerticalAlignment, isDefaultTickerEnabled, isEndsWith3Points, isTickerEnabled, isTickerRunning, setDefaultTickerEnabled, setEndsWith3Points, setGap, setIcon, setShiftText, setText, setTextPosition, setTickerEnabled, setVerticalAlignment, shouldTickerStart, startTicker, startTicker, stopTicker |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CheckBox(java.lang.String text)
text
- to display next to the checkboxpublic CheckBox()
public CheckBox(Image icon)
icon
- icon to display next to the checkboxpublic CheckBox(java.lang.String text, Image icon)
text
- to display next to the checkboxicon
- icon to display next to the textMethod Detail |
---|
public boolean isSelected()
isSelected
in class Button
public void setSelected(boolean selected)
selected
- value for selectionpublic void released(int x, int y)
Button
released
in class Button
x
- the x position if a touch event triggered this, -1 if this isn't relevanty
- the y position if a touch event triggered this, -1 if this isn't relevantpublic void paint(Graphics g)
Component
paint
in interface Animation
paint
in class Button
g
- the component graphicsprotected Dimension calcPreferredSize()
Component
calcPreferredSize
in class Button
protected java.lang.String paramString()
Component
null
.
paramString
in class Label
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |