Figure.FigureIterator, Figure.IdentitySearch
IFigure.NoInsets
Modifier and Type | Field and Description |
---|---|
protected Label |
label
This ToggleButton's Label
|
DEFAULT_FIRING, MAX_FLAG, REPEAT_FIRING, STYLE_BUTTON, STYLE_TOGGLE
bgColor, border, bounds, fgColor, flags, font, maxSize, minSize, NO_MANAGER, prefSize, toolTip
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
Constructor and Description |
---|
ToggleButton()
Constructs a new ToggleButton with no initial contents.
|
ToggleButton(IFigure contents)
Constructs a ToggleButton with the passed IFigure as its contents.
|
ToggleButton(java.lang.String text)
Constructs a ToggleButton with the passed string as its text.
|
ToggleButton(java.lang.String text,
Image normalIcon)
Constructs a ToggleButton with a Label containing the passed text and
icon.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fillCheckeredRectangle(Graphics graphics)
Draws a checkered pattern to emulate a toggle button that is in the
selected state.
|
protected void |
paintFigure(Graphics graphics)
Paints this Figure's primary representation, or background.
|
addActionListener, addChangeListener, createDefaultModel, createEventHandler, createModelObserver, doClick, fireActionPerformed, fireStateChanged, getModel, hookEventHandler, init, isRolloverEnabled, isSelected, isStyle, paintBorder, paintClientArea, removeActionListener, removeChangeListener, setContents, setEnabled, setEventHandler, setFiringMethod, setModel, setRolloverEnabled, setSelected, setStyle, unhookEventHandler
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintChildren, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
protected Label label
public ToggleButton()
public ToggleButton(IFigure contents)
contents
- the contents of the toggle buttonpublic ToggleButton(java.lang.String text)
text
- the text to be displayed on the buttonpublic ToggleButton(java.lang.String text, Image normalIcon)
text
- the textnormalIcon
- the iconprotected void paintFigure(Graphics graphics)
Figure
Figure.paintClientArea(Graphics)
and
Figure.paintBorder(Graphics)
. Furthermore, it is safe to call
graphics.restoreState()
within this method, and doing so
will restore the graphics to its original state upon entry.paintFigure
in class Figure
graphics
- The Graphics used to paintFigure.paintFigure(Graphics)
protected void fillCheckeredRectangle(Graphics graphics)
graphics
- The Graphics object used to paintCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.