|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.GraphicalCheckBox
public class GraphicalCheckBox
A GraphicalCheckBox is a ToggleButton with a predefined set of images.
Creating a GraphicalCheckBox:
GraphicalCheckBox graphicalCheckBox1 = new GraphicalCheckBox();
graphicalCheckBox1.setImageSet (GraphicalCheckBox.LIGHT_SWITCH);
myPanel.add (graphicalCheckBox1);
Usage:
The GraphicalCheckBox class supports a number of predefined image sets for common things like a light switch, a light bulb, a traffic light, and a lock. It provides a property for choosing which of the predefined sets of images to use (imageSet).
Field Summary | |
---|---|
static int |
CHECK
CHECK image value id |
static int |
CHECK_INVALID
CHECK_X image value id |
static int |
COLOR_CHECK
COLOR_CHECK image value id |
protected int |
imageSet
|
static int |
LAMP
LAMP image value id |
static int |
LIGHT_BULB
LIGHT_BULB image value id |
static int |
LOCK
LOCK image value id |
static int |
MAILBOX
MAILBOX image value id |
static int |
MOON_SUN
MOON_SUN image value id |
protected ImageView |
offImageView
|
protected ImageView |
onImageView
|
static int |
STOP_GO
STOP_GO image value id |
static int |
TRAFFIC_LIGHT
TRAFFIC_LIGHT image value id |
static int |
TRASH
TRASH image value id |
static int |
XBOX
XBOX image value id |
Fields inherited from class com.sas.visuals.ToggleButton |
---|
contentShift, label, textBounds |
Fields inherited from class com.sas.visuals.BaseButton |
---|
actionCommand, actionListenerList, borderPainted, BOTTOM, buttonListener, buttonModel, currentInsets, defaultIcon, disabledIcon, displayTransform, focusGap, focusPainted, gap, hasFocus, horizontalAlignment, horizontalTextAlignment, item, itemListenerList, LEFT, pressedIcon, resizeToFit, RIGHT, rolloverIcon, selectedIcon, text, textPosition, TOP, updateItem, updateText, verticalAlignment, verticalTextAlignment |
Fields inherited from interface com.sas.visuals.Alignment |
---|
BEGIN, CENTER, END |
Constructor Summary | |
---|---|
GraphicalCheckBox()
Constructor creates a GraphicalCheckBox with default image and text, "CheckBox". |
|
GraphicalCheckBox(int imageSetIn)
Constructor that sets the images to use in the GraphicalCheckBox. |
Method Summary | |
---|---|
static int |
getDefaultHeight()
Gets the default height of the GraphicalCheckBox in pixels |
static int |
getDefaultWidth()
Gets the default width of the GraphicalCheckBox in pixels |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns property information about the GraphicalCheckBox. |
int |
getImageSet()
Gets the image value ids for the images displayed in the GraphicalCheckBox. |
protected void |
paintFocus(java.awt.Graphics g)
Overridden to paint the focus rectangle around the text and not around the entire RadioButton. |
static void |
setDefaultHeight(int newDefaultHeight)
Sets the default height of the GraphicalCheckBox |
static void |
setDefaultWidth(int newDefaultWidth)
Sets the default width of the GraphicalCheckBox |
void |
setImageSet(int imageSetIn)
Sets the images displayed in the GraphicalCheckBox. |
Methods inherited from class com.sas.visuals.ToggleButton |
---|
buttonModelArmed, buttonModelPressed, buttonModelSelected, clone, contentShift, getContentShift, getMinimumSize, getSelectionGroup, getSource, getTextBounds, paint, paintBackground, setContentShift, setFont, setHorizontalTextAlignment, setSelected, setSelectionGroup, setSource, setText, setVerticalTextAlignment |
Methods inherited from interface com.sas.visuals.SelectableInterface |
---|
getButtonModel, getDisplayTransform, getItem, setDisplayTransform, setItem |
Methods inherited from interface com.sas.awt.ContainerInterface |
---|
getComponents, getLayout, invalidate, setLayout, validate |
Field Detail |
---|
public static final int CHECK
public static final int LAMP
public static final int LIGHT_BULB
public static final int CHECK_INVALID
public static final int STOP_GO
public static final int TRAFFIC_LIGHT
public static final int MAILBOX
public static final int TRASH
public static final int LOCK
public static final int MOON_SUN
public static final int COLOR_CHECK
public static final int XBOX
protected ImageView offImageView
protected ImageView onImageView
protected int imageSet
Constructor Detail |
---|
public GraphicalCheckBox()
public GraphicalCheckBox(int imageSetIn)
imageSetIn
- one of the image value ids.Method Detail |
---|
public static int getDefaultWidth()
setDefaultWidth(int)
public static void setDefaultWidth(int newDefaultWidth)
newDefaultWidth
- desired default width in pixelsgetDefaultWidth()
public static int getDefaultHeight()
setDefaultHeight(int)
public static void setDefaultHeight(int newDefaultHeight)
newDefaultHeight
- desired default height in pixelsgetDefaultHeight()
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
protected void paintFocus(java.awt.Graphics g)
paintFocus
in class ToggleButton
g
- the Graphics contextpublic void setImageSet(int imageSetIn)
imageSetIn
- one of the image value ids descibing which images to display.getImageSet()
public int getImageSet()
setImageSet(int)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |