public class JToggleGroup
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static int |
CHECKBOX |
protected int |
m_axis |
protected javax.swing.ListModel |
m_data |
protected javax.swing.ButtonGroup |
m_group |
protected java.lang.String[] |
m_labels |
protected int |
m_margin |
protected javax.swing.ListSelectionModel |
m_sel |
protected int |
m_spacing |
protected int |
m_type |
static int |
RADIO |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
JToggleGroup(int type,
javax.swing.ListModel data)
Create a new JToggleGroup.
|
JToggleGroup(int type,
javax.swing.ListModel data,
javax.swing.ListSelectionModel selection)
Create a new JToggleGroup.
|
JToggleGroup(int type,
java.lang.Object[] data)
Create a new JToggleGroup.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAxisType()
Get the Box axis type used to orient the toggle group component.
|
int |
getMargin()
Get the margin, in pixels, used at the ends of the JToggleGroup.
|
javax.swing.ListModel |
getModel()
Get the ListModel backing this component.
|
javax.swing.ListSelectionModel |
getSelectionModel()
Get the ListSelectionModel used by this component.
|
int |
getSpacing()
Get the spacing between toggle group components.
|
protected void |
initUI()
Initialize the UI.
|
void |
setAxisType(int axis)
Set the Box axis type used to orient the toggle group component.
|
void |
setBackground(java.awt.Color background)
Set the background color of this toggle group.
|
void |
setFont(java.awt.Font font)
Set the font used by this toggle group.
|
void |
setForeground(java.awt.Color foreground)
Set the foreground color of this toggle group.
|
void |
setGroupFocusable(boolean b)
Sets if the various toggle buttons can receive the keyboard focus.
|
void |
setLabels(java.lang.String[] labels)
Set the labels to use for the Objects contained in the list model.
|
void |
setMargin(int margin)
Set the margin, in pixels, to use at the ends of the JToggleGroup.
|
void |
setModel(javax.swing.ListModel model)
Set the ListModel backing this component.
|
void |
setSelectionModel(javax.swing.ListSelectionModel sel)
Set the ListSelectionModel used by this component.
|
void |
setSpacing(int spacing)
Set the spacing between toggle group components.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, 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, transferFocusBackward, transferFocusUpCyclepublic static final int CHECKBOX
public static final int RADIO
protected final int m_type
protected int m_margin
protected int m_spacing
protected int m_axis
protected javax.swing.ListModel m_data
protected javax.swing.ListSelectionModel m_sel
protected java.lang.String[] m_labels
protected javax.swing.ButtonGroup m_group
public JToggleGroup(int type,
java.lang.Object[] data)
public JToggleGroup(int type,
javax.swing.ListModel data)
public JToggleGroup(int type,
javax.swing.ListModel data,
javax.swing.ListSelectionModel selection)
protected void initUI()
public void setAxisType(int axis)
axis - the axis type, one of
BoxLayout.X_AXIS,
BoxLayout.Y_AXIS,
BoxLayout.LINE_AXIS, or
BoxLayout.PAGE_AXIS.public int getAxisType()
BoxLayout.X_AXIS,
BoxLayout.Y_AXIS,
BoxLayout.LINE_AXIS, or
BoxLayout.PAGE_AXIS.public void setMargin(int margin)
margin - the margin in pixelspublic int getMargin()
public void setSpacing(int spacing)
spacing - the spacing, in pixels, to use between componentspublic int getSpacing()
public void setModel(javax.swing.ListModel model)
model - the list model to usepublic javax.swing.ListModel getModel()
public void setSelectionModel(javax.swing.ListSelectionModel sel)
sel - the list selection model to usepublic javax.swing.ListSelectionModel getSelectionModel()
public void setLabels(java.lang.String[] labels)
labels - the display labels to use in the interface componentpublic void setBackground(java.awt.Color background)
setBackground in class javax.swing.JComponentComponent.setBackground(java.awt.Color)public void setForeground(java.awt.Color foreground)
setForeground in class javax.swing.JComponentComponent.setBackground(java.awt.Color)public void setFont(java.awt.Font font)
setFont in class javax.swing.JComponentComponent.setFont(java.awt.Font)public void setGroupFocusable(boolean b)
b - true to set toggle buttons keyboard accessible, false to
set them unaccessible.