swingwtx.swing
Class JToggleButton
java.lang.Object
swingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.AbstractButton
swingwtx.swing.JToggleButton
- All Implemented Interfaces:
- ButtonModel, ImageObserver, ItemSelectable, MenuContainer, SwingConstants
- public class JToggleButton
- extends AbstractButton
- implements ButtonModel, SwingConstants
Fields inherited from class swingwtx.swing.AbstractButton |
changeListeners, itemListeners, pAction, pGroup, pHAlign, pHTextPosition, pIcon, pMnemonic, pModel, ppeer, pSelection, pText, pVAlign, pVTextPosition |
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Component |
actionCommand, actionListeners, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, peer, pEnabled, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT |
Fields inherited from interface swingwtx.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 |
Methods inherited from class swingwtx.swing.AbstractButton |
addChangeListener, addItemListener, getAction, getActionCommand, getHorizontalAlignment, getHorizontalTextPosition, getMnemonic, getModel, getText, getVerticalAlignment, getVerticalTextPosition, processActionEvent, processItemEvent, registerActionEvents, removeChangeListener, removeItemListener, setAction, setAction, setBorderPainted, setContentAreaFilled, setDisabledIcon, setFocusPainted, setGroup, setHorizontalAlignment, setHorizontalTextPosition, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setText, setToolTipText, setVerticalAlignment, setVerticalTextPosition, showMnemonic |
Methods inherited from class swingwtx.swing.JComponent |
add, add, add, add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, dispose, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setBorder, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled |
Methods inherited from class swingwt.awt.Container |
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComponents, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate |
Methods inherited from class swingwt.awt.Component |
add, addActionListener, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, calculatePreferredSize, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSize, getSWTPeer, getToolkit, getToolTipText, getTreeLock, getWidth, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isEnabled, isFocusable, isMinimumSizeSet, isShowing, isVisible, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerComponentEvents, registerEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeActionListener, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, requestFocus, setActionCommand, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setCachedProperties, setComponentOrientation, setComponentRemoved, setCursor, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface swingwtx.swing.ButtonModel |
addActionListener, addChangeListener, addItemListener, getActionCommand, getMnemonic, isEnabled, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setEnabled, setGroup, setMnemonic |
pImage
protected Icon pImage
customStyle
protected int customStyle
JToggleButton
public JToggleButton()
JToggleButton
public JToggleButton(java.lang.String text)
JToggleButton
public JToggleButton(java.lang.String text,
Icon icon)
setIcon
public void setIcon(Icon icon)
- Overrides:
setIcon
in class AbstractButton
processMouseEvent
public void processMouseEvent(MouseEvent e)
- Sends mouse events to component listeners
Overriden from Component to handle ItemEvents
- Overrides:
processMouseEvent
in class Component
processKeyEvent
public void processKeyEvent(KeyEvent e)
- Sends KeyEvents to component listeners
Overriden from Component to handle ItemEvents
- Overrides:
processKeyEvent
in class Component
setCustomSWTStyle
public void setCustomSWTStyle(int style)
setSwingWTParent
public void setSwingWTParent(Container parent)
throws java.lang.Exception
- Once a parent component receives an "add" call for a child, this being
the child, this should be called to tell us to instantiate the peer
and load in any cached properties.
- Overrides:
setSwingWTParent
in class JComponent
- Throws:
java.lang.Exception
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interface ButtonModel
- Specified by:
isSelected
in class AbstractButton
setSelected
public void setSelected(boolean b)
- Specified by:
setSelected
in interface ButtonModel
- Specified by:
setSelected
in class AbstractButton
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
- Specified by:
getSelectedObjects
in interface ItemSelectable
isArmed
public boolean isArmed()
- Specified by:
isArmed
in interface ButtonModel
isPressed
public boolean isPressed()
- Specified by:
isPressed
in interface ButtonModel
isRollover
public boolean isRollover()
- Specified by:
isRollover
in interface ButtonModel
setArmed
public void setArmed(boolean b)
- Specified by:
setArmed
in interface ButtonModel
setPressed
public void setPressed(boolean b)
- Specified by:
setPressed
in interface ButtonModel
setRollover
public void setRollover(boolean b)
- Specified by:
setRollover
in interface ButtonModel