JIDE 3.5.15

com.jidesoft.swing
Class JideToggleSplitButton

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JMenuItem
                      extended by javax.swing.JMenu
                          extended by com.jidesoft.swing.JideMenu
                              extended by com.jidesoft.swing.JideSplitButton
                                  extended by com.jidesoft.swing.JideToggleSplitButton
All Implemented Interfaces:
Alignable, ButtonStyle, ComponentStateSupport, ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants

public class JideToggleSplitButton
extends JideSplitButton
implements Accessible

An implementation of a two-state JideButton.

Warning: SplitButtonGroup has to be used in place of ButtonGroup for JideToggleSplitButtons.

See Also:
Serialized Form

Nested Class Summary
protected  class JideToggleSplitButton.AccessibleJToggleButton
          This class implements accessibility support for the JToggleButton class.
static class JideToggleSplitButton.ToggleSplitButtonModel
          The ToggleButton model

Warning: Serialized objects of this class will not be compatible with future Swing releases.

 
Nested classes/interfaces inherited from class com.jidesoft.swing.JideMenu
JideMenu.MenuCreator, JideMenu.PopupMenuCustomizer, JideMenu.PopupMenuOriginCalculator
 
Nested classes/interfaces inherited from class javax.swing.JMenu
JMenu.AccessibleJMenu, JMenu.WinListener
 
Nested classes/interfaces inherited from class javax.swing.JMenuItem
JMenuItem.AccessibleJMenuItem
 
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.jidesoft.swing.JideSplitButton
ACTION_PROPERTY_SPLIT_BUTTON_ENABLED, PROPERTY_ALWAYS_DROPDOWN
 
Fields inherited from class com.jidesoft.swing.JideMenu
DELAY
 
Fields inherited from class javax.swing.JMenu
popupListener
 
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_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 com.jidesoft.swing.ButtonStyle
BUTTON_STYLE_PROPERTY, CLIENT_PROPERTY_SEGMENT_POSITION, FLAT_STYLE, HYPERLINK_STYLE, SEGMENT_POSITION_FIRST, SEGMENT_POSITION_LAST, SEGMENT_POSITION_MIDDLE, SEGMENT_POSITION_ONLY, TOOLBAR_STYLE, TOOLBOX_STYLE
 
Fields inherited from interface com.jidesoft.swing.Alignable
PROPERTY_ORIENTATION
 
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
JideToggleSplitButton()
          Creates an initially unselected toggle button without setting the text or image.
JideToggleSplitButton(Action a)
          Creates a toggle button where properties are taken from the Action supplied.
JideToggleSplitButton(Icon icon)
          Creates an initially unselected toggle button with the specified image but no text.
JideToggleSplitButton(Icon icon, boolean selected)
          Creates a toggle button with the specified image and selection state, but no text.
JideToggleSplitButton(String text)
          Creates an unselected toggle button with the specified text.
JideToggleSplitButton(String text, boolean selected)
          Creates a toggle button with the specified text and selection state.
JideToggleSplitButton(String text, Icon icon)
          Creates a toggle button that has the specified text and image, and that is initially unselected.
JideToggleSplitButton(String text, Icon icon, boolean selected)
          Creates a toggle button with the specified text, image, and selection state.
 
Method Summary
protected  void actionPropertyChanged(Action action, String propertyName)
           
protected  void configurePropertiesFromAction(Action action)
           
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this JToggleButton.
 
Methods inherited from class com.jidesoft.swing.JideSplitButton
doClick, doClickOnMenu, getBackgroundOfState, getButtonStyle, getDefaultForeground, getForegroundOfState, getUI, getUIClassID, initComponent, isAlwaysDropdown, isButtonEnabled, isButtonSelected, isSplitButtonEnabled, setAlwaysDropdown, setBackgroundOfState, setButtonEnabled, setButtonSelected, setButtonStyle, setDefaultForeground, setForegroundOfState, setIconFromAction, setText, setUI, updateUI
 
Methods inherited from class com.jidesoft.swing.JideMenu
getMenuCreator, getOrientation, getOriginCalculator, getPopupMenuCustomizer, getPopupMenuOrigin, getPreferredPopupHorizontalAlignment, getPreferredPopupVerticalAlignment, hideMenu, initMenu, isOpaque, isTopLevelMenu, originalIsOpaque, setMenuCreator, setOrientation, setOriginCalculator, setPopupMenuCustomizer, setPopupMenuVisible, setPreferredPopupHorizontalAlignment, setPreferredPopupVerticalAlignment, shouldHidePopupMenu, supportHorizontalOrientation, supportVerticalOrientation
 
Methods inherited from class javax.swing.JMenu
add, add, add, add, add, addMenuListener, addSeparator, applyComponentOrientation, createActionChangeListener, createActionComponent, createWinListener, doClick, fireMenuCanceled, fireMenuDeselected, fireMenuSelected, getComponent, getDelay, getItem, getItemCount, getMenuComponent, getMenuComponentCount, getMenuComponents, getMenuListeners, getPopupMenu, getSubElements, insert, insert, insert, insertSeparator, isMenuComponent, isPopupMenuVisible, isSelected, isTearOff, menuSelectionChanged, paramString, processKeyEvent, remove, remove, remove, removeAll, removeMenuListener, setAccelerator, setComponentOrientation, setDelay, setMenuLocation, setModel, setSelected
 
Methods inherited from class javax.swing.JMenuItem
addMenuDragMouseListener, addMenuKeyListener, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, getMenuDragMouseListeners, getMenuKeyListeners, init, isArmed, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setArmed, setEnabled, setUI
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.MenuElement
processKeyEvent, processMouseEvent
 

Constructor Detail

JideToggleSplitButton

public JideToggleSplitButton()
Creates an initially unselected toggle button without setting the text or image.


JideToggleSplitButton

public JideToggleSplitButton(Icon icon)
Creates an initially unselected toggle button with the specified image but no text.

Parameters:
icon - the image that the button should display

JideToggleSplitButton

public JideToggleSplitButton(Icon icon,
                             boolean selected)
Creates a toggle button with the specified image and selection state, but no text.

Parameters:
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JideToggleSplitButton

public JideToggleSplitButton(String text)
Creates an unselected toggle button with the specified text.

Parameters:
text - the string displayed on the toggle button

JideToggleSplitButton

public JideToggleSplitButton(String text,
                             boolean selected)
Creates a toggle button with the specified text and selection state.

Parameters:
text - the string displayed on the toggle button
selected - if true, the button is initially selected; otherwise, the button is initially unselected

JideToggleSplitButton

public JideToggleSplitButton(Action a)
Creates a toggle button where properties are taken from the Action supplied.

Since:
1.3

JideToggleSplitButton

public JideToggleSplitButton(String text,
                             Icon icon)
Creates a toggle button that has the specified text and image, and that is initially unselected.

Parameters:
text - the string displayed on the button
icon - the image that the button should display

JideToggleSplitButton

public JideToggleSplitButton(String text,
                             Icon icon,
                             boolean selected)
Creates a toggle button with the specified text, image, and selection state.

Parameters:
text - the text of the toggle button
icon - the image that the button should display
selected - if true, the button is initially selected; otherwise, the button is initially unselected
Method Detail

configurePropertiesFromAction

protected void configurePropertiesFromAction(Action action)
Overrides:
configurePropertiesFromAction in class JideSplitButton

actionPropertyChanged

protected void actionPropertyChanged(Action action,
                                     String propertyName)
Overrides:
actionPropertyChanged in class JideSplitButton

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JToggleButton. For toggle buttons, the AccessibleContext takes the form of an AccessibleJToggleButton. A new AccessibleJToggleButton instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JMenu
Returns:
an AccessibleJToggleButton that serves as the AccessibleContext of this JToggleButton

JIDE 3.5.15