com.alee.extended.panel
Class WebButtonGroup
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.alee.laf.panel.WebPanel
com.alee.extended.panel.WebButtonGroup
- All Implemented Interfaces:
- PartialDecoration, LanguageContainerMethods, ShapeProvider, Styleable, SizeMethods<WebPanel>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class WebButtonGroup
- extends WebPanel
- implements javax.swing.SwingConstants
This component allows quick visual web-styled buttons grouping. It also contains all UI methods from the buttons.
Those methods apply specific value to all sub-buttons and sub-groups when called. Also this component groups buttons by default.
- Author:
- Mikle Garin
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
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 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 |
WebButtonGroup(boolean group,
javax.swing.JComponent... component)
|
WebButtonGroup(int orientation,
boolean group,
javax.swing.JComponent... components)
|
WebButtonGroup(int orientation,
javax.swing.JComponent... components)
|
WebButtonGroup(javax.swing.JComponent... component)
|
Method Summary |
UnselectableButtonGroup |
getButtonGroup()
|
int |
getOrientation()
|
WebButton |
getWebButton(int index)
|
WebButton |
getWebButton(java.lang.String name)
|
protected void |
groupButtons(java.awt.Component component)
|
boolean |
isAnySelected()
|
protected boolean |
isButton(java.awt.Component component)
|
boolean |
isGroup()
|
boolean |
isUnselectable()
|
protected boolean |
isWebButtonGroup(java.awt.Component component)
|
protected boolean |
isWebStyledButton(java.awt.Component component)
|
void |
setButtonsDrawBottom(boolean drawBottom)
|
void |
setButtonsDrawFocus(boolean drawFocus)
|
void |
setButtonsDrawLeft(boolean drawLeft)
|
void |
setButtonsDrawRight(boolean drawRight)
|
void |
setButtonsDrawSides(boolean top,
boolean left,
boolean bottom,
boolean right)
|
void |
setButtonsDrawTop(boolean drawTop)
|
void |
setButtonsFocusable(boolean focusable)
Multi-update methods for some of WebButtonUI properties |
void |
setButtonsForeground(java.awt.Color foreground)
|
void |
setButtonsInnerShadeColor(java.awt.Color innerShadeColor)
|
void |
setButtonsInnerShadeWidth(int innerShadeWidth)
|
void |
setButtonsLeftRightSpacing(int leftRightSpacing)
|
void |
setButtonsMargin(java.awt.Insets margin)
|
void |
setButtonsMargin(int spacing)
|
void |
setButtonsMargin(int top,
int left,
int bottom,
int right)
|
void |
setButtonsMoveIconOnPress(boolean moveIconOnPress)
|
void |
setButtonsPainter(Painter painter)
|
void |
setButtonsRolloverDarkBorderOnly(boolean rolloverDarkBorderOnly)
|
void |
setButtonsRolloverDecoratedOnly(boolean rolloverDecoratedOnly)
|
void |
setButtonsRolloverShadeOnly(boolean rolloverShadeOnly)
|
void |
setButtonsRolloverShine(boolean rolloverShine)
|
void |
setButtonsRound(int round)
|
void |
setButtonsSelectedForeground(java.awt.Color selectedForeground)
|
void |
setButtonsShadeColor(java.awt.Color shadeColor)
|
void |
setButtonsShadeWidth(int shadeWidth)
|
void |
setButtonsShineColor(java.awt.Color shineColor)
|
void |
setButtonsUndecorated(boolean undecorated)
|
protected void |
setDrawBottom(java.awt.Component component,
boolean drawBottom)
|
protected void |
setDrawBottom(WebButtonGroup group,
boolean drawBottom)
|
protected void |
setDrawFocus(WebButtonGroup group,
boolean drawFocus)
|
protected void |
setDrawLeft(java.awt.Component component,
boolean drawLeft)
|
protected void |
setDrawLeft(WebButtonGroup group,
boolean drawLeft)
|
protected void |
setDrawRight(java.awt.Component component,
boolean drawRight)
|
protected void |
setDrawRight(WebButtonGroup group,
boolean drawRight)
|
protected void |
setDrawTop(java.awt.Component component,
boolean drawTop)
|
protected void |
setDrawTop(WebButtonGroup group,
boolean drawTop)
|
void |
setEnabled(boolean enabled)
|
protected void |
setFocusable(WebButtonGroup group,
boolean focusable)
|
protected void |
setForeground(WebButtonGroup group,
java.awt.Color foreground)
|
void |
setGroup(boolean group)
|
protected void |
setInnerShadeColor(WebButtonGroup group,
java.awt.Color innerShadeColor)
|
protected void |
setInnerShadeWidth(WebButtonGroup group,
int innerShadeWidth)
|
protected void |
setLeftRightSpacing(WebButtonGroup group,
int leftRightSpacing)
|
protected void |
setMargin(WebButtonGroup group,
java.awt.Insets margin)
|
protected void |
setMoveIconOnPress(WebButtonGroup group,
boolean moveIconOnPress)
|
void |
setOrientation(int orientation)
|
protected void |
setPainter(WebButtonGroup group,
Painter painter)
|
protected void |
setRolloverDarkBorderOnly(WebButtonGroup group,
boolean rolloverDarkBorderOnly)
|
protected void |
setRolloverDecoratedOnly(WebButtonGroup group,
boolean rolloverDecoratedOnly)
|
protected void |
setRolloverShadeOnly(WebButtonGroup group,
boolean rolloverShadeOnly)
|
protected void |
setRolloverShine(WebButtonGroup group,
boolean rolloverShine)
|
protected void |
setRound(WebButtonGroup group,
int round)
|
protected void |
setSelectedForeground(WebButtonGroup group,
java.awt.Color selectedForeground)
|
protected void |
setShadeColor(WebButtonGroup group,
java.awt.Color shadeColor)
|
protected void |
setShadeWidth(WebButtonGroup group,
int shadeWidth)
|
protected void |
setShineColor(WebButtonGroup group,
java.awt.Color shineColor)
|
protected void |
setUndecorated(WebButtonGroup group,
boolean undecorated)
|
void |
setUnselectable(boolean unselectable)
|
protected void |
ungroupButtons(java.awt.Component component)
|
protected void |
updateButtonsStyling()
|
Methods inherited from class com.alee.laf.panel.WebPanel |
add, add, add, add, add, add, getBorderColor, getBorderStroke, getDisabledBorderColor, getFirstComponent, getLanguageContainerKey, getLastComponent, getMargin, getMinimumHeight, getMinimumWidth, getPainter, getPreferredHeight, getPreferredSize, getPreferredWidth, getRound, getShadeTransparency, getShadeWidth, getStyleId, getWebUI, isPaintBackground, isPaintBottom, isPaintBottomLine, isPaintFocus, isPaintLeft, isPaintLeftLine, isPaintRight, isPaintRightLine, isPaintTop, isPaintTopLine, isUndecorated, isWebColoredBackground, provideShape, removeLanguageContainerKey, setBorderColor, setBorderStroke, setDisabledBorderColor, setLanguageContainerKey, setMargin, setMargin, setMargin, setMinimumHeight, setMinimumWidth, setPaintBackground, setPaintBottom, setPaintBottomLine, setPainter, setPaintFocus, setPaintLeft, setPaintLeftLine, setPaintRight, setPaintRightLine, setPaintSideLines, setPaintSides, setPaintTop, setPaintTopLine, setPreferredHeight, setPreferredWidth, setRound, setShadeTransparency, setShadeWidth, setStyleId, setUndecorated, setWebColoredBackground, updateUI |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, imageUpdate, 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, setComponentOrientation, 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 |
orientation
protected int orientation
- Settings.
group
protected boolean group
buttonGroup
protected UnselectableButtonGroup buttonGroup
- Runtime variables.
WebButtonGroup
public WebButtonGroup(javax.swing.JComponent... component)
WebButtonGroup
public WebButtonGroup(boolean group,
javax.swing.JComponent... component)
WebButtonGroup
public WebButtonGroup(int orientation,
javax.swing.JComponent... components)
WebButtonGroup
public WebButtonGroup(int orientation,
boolean group,
javax.swing.JComponent... components)
getWebButton
public WebButton getWebButton(int index)
getWebButton
public WebButton getWebButton(java.lang.String name)
isAnySelected
public boolean isAnySelected()
isGroup
public boolean isGroup()
setGroup
public void setGroup(boolean group)
getButtonGroup
public UnselectableButtonGroup getButtonGroup()
groupButtons
protected void groupButtons(java.awt.Component component)
ungroupButtons
protected void ungroupButtons(java.awt.Component component)
isUnselectable
public boolean isUnselectable()
setUnselectable
public void setUnselectable(boolean unselectable)
getOrientation
public int getOrientation()
setOrientation
public void setOrientation(int orientation)
updateButtonsStyling
protected void updateButtonsStyling()
isButton
protected boolean isButton(java.awt.Component component)
isWebStyledButton
protected boolean isWebStyledButton(java.awt.Component component)
isWebButtonGroup
protected boolean isWebButtonGroup(java.awt.Component component)
setButtonsFocusable
public void setButtonsFocusable(boolean focusable)
- Multi-update methods for some of WebButtonUI properties
setFocusable
protected void setFocusable(WebButtonGroup group,
boolean focusable)
setButtonsForeground
public void setButtonsForeground(java.awt.Color foreground)
setForeground
protected void setForeground(WebButtonGroup group,
java.awt.Color foreground)
setButtonsSelectedForeground
public void setButtonsSelectedForeground(java.awt.Color selectedForeground)
setSelectedForeground
protected void setSelectedForeground(WebButtonGroup group,
java.awt.Color selectedForeground)
setButtonsDrawTop
public void setButtonsDrawTop(boolean drawTop)
setDrawTop
protected void setDrawTop(WebButtonGroup group,
boolean drawTop)
setDrawTop
protected void setDrawTop(java.awt.Component component,
boolean drawTop)
setButtonsDrawLeft
public void setButtonsDrawLeft(boolean drawLeft)
setDrawLeft
protected void setDrawLeft(WebButtonGroup group,
boolean drawLeft)
setDrawLeft
protected void setDrawLeft(java.awt.Component component,
boolean drawLeft)
setButtonsDrawBottom
public void setButtonsDrawBottom(boolean drawBottom)
setDrawBottom
protected void setDrawBottom(WebButtonGroup group,
boolean drawBottom)
setDrawBottom
protected void setDrawBottom(java.awt.Component component,
boolean drawBottom)
setButtonsDrawRight
public void setButtonsDrawRight(boolean drawRight)
setDrawRight
protected void setDrawRight(WebButtonGroup group,
boolean drawRight)
setDrawRight
protected void setDrawRight(java.awt.Component component,
boolean drawRight)
setButtonsDrawSides
public void setButtonsDrawSides(boolean top,
boolean left,
boolean bottom,
boolean right)
setButtonsRolloverDarkBorderOnly
public void setButtonsRolloverDarkBorderOnly(boolean rolloverDarkBorderOnly)
setRolloverDarkBorderOnly
protected void setRolloverDarkBorderOnly(WebButtonGroup group,
boolean rolloverDarkBorderOnly)
setButtonsRolloverShine
public void setButtonsRolloverShine(boolean rolloverShine)
setRolloverShine
protected void setRolloverShine(WebButtonGroup group,
boolean rolloverShine)
setButtonsShineColor
public void setButtonsShineColor(java.awt.Color shineColor)
setShineColor
protected void setShineColor(WebButtonGroup group,
java.awt.Color shineColor)
setButtonsRound
public void setButtonsRound(int round)
setRound
protected void setRound(WebButtonGroup group,
int round)
setButtonsRolloverShadeOnly
public void setButtonsRolloverShadeOnly(boolean rolloverShadeOnly)
setRolloverShadeOnly
protected void setRolloverShadeOnly(WebButtonGroup group,
boolean rolloverShadeOnly)
setButtonsShadeWidth
public void setButtonsShadeWidth(int shadeWidth)
setShadeWidth
protected void setShadeWidth(WebButtonGroup group,
int shadeWidth)
setButtonsShadeColor
public void setButtonsShadeColor(java.awt.Color shadeColor)
setShadeColor
protected void setShadeColor(WebButtonGroup group,
java.awt.Color shadeColor)
setButtonsInnerShadeWidth
public void setButtonsInnerShadeWidth(int innerShadeWidth)
setInnerShadeWidth
protected void setInnerShadeWidth(WebButtonGroup group,
int innerShadeWidth)
setButtonsInnerShadeColor
public void setButtonsInnerShadeColor(java.awt.Color innerShadeColor)
setInnerShadeColor
protected void setInnerShadeColor(WebButtonGroup group,
java.awt.Color innerShadeColor)
setButtonsLeftRightSpacing
public void setButtonsLeftRightSpacing(int leftRightSpacing)
setLeftRightSpacing
protected void setLeftRightSpacing(WebButtonGroup group,
int leftRightSpacing)
setButtonsRolloverDecoratedOnly
public void setButtonsRolloverDecoratedOnly(boolean rolloverDecoratedOnly)
setRolloverDecoratedOnly
protected void setRolloverDecoratedOnly(WebButtonGroup group,
boolean rolloverDecoratedOnly)
setButtonsUndecorated
public void setButtonsUndecorated(boolean undecorated)
setUndecorated
protected void setUndecorated(WebButtonGroup group,
boolean undecorated)
setButtonsPainter
public void setButtonsPainter(Painter painter)
setPainter
protected void setPainter(WebButtonGroup group,
Painter painter)
setButtonsMoveIconOnPress
public void setButtonsMoveIconOnPress(boolean moveIconOnPress)
setMoveIconOnPress
protected void setMoveIconOnPress(WebButtonGroup group,
boolean moveIconOnPress)
setButtonsDrawFocus
public void setButtonsDrawFocus(boolean drawFocus)
setDrawFocus
protected void setDrawFocus(WebButtonGroup group,
boolean drawFocus)
setButtonsMargin
public void setButtonsMargin(java.awt.Insets margin)
setButtonsMargin
public void setButtonsMargin(int top,
int left,
int bottom,
int right)
setButtonsMargin
public void setButtonsMargin(int spacing)
setMargin
protected void setMargin(WebButtonGroup group,
java.awt.Insets margin)
setEnabled
public void setEnabled(boolean enabled)
- Overrides:
setEnabled
in class javax.swing.JComponent