| Modifier and Type | Class and Description |
|---|---|
| private class | BasicButtonUI.
ButtonGroupInfo, used to get related info in button group for given toggle button |
| private class | BasicButtonUI.
Togglebutton KeyListener |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| protected int | defaultTextIconGap
The default gap between a text and an icon. |
| protected int | defaultTextShiftOffset
The default offset of a text. |
| private static Rectangle | |
| private KeyListener | |
| private static final String | |
| private int | |
| private static Rectangle | |
| private static final ComponentUI | |
| private static Rectangle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected BasicButtonListener | Returns: a new instance ofBasicButtonListeneran abstract button b)Returns a new instance of |
| private KeyListener | |
| public static ComponentUI | Returns: an instance ofBasicButtonUIa component c)Hides javax. Returns an instance of |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| public Component. | getBaselineResizeBehavior(JComponent c)
Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes. |
| private BasicButtonListener | getButtonListener(AbstractButton b)
Returns the ButtonListener for the passed in Button, or null if one could not be found. |
| public int | Returns: the default gap between text and an iconan abstract button b)Returns the default gap between a text and an icon. |
| public Dimension | getMaximumSize(JComponent c)
Overrides javax. Returns the specified component's maximum size appropriate for the look and feel. |
| public Dimension | getMinimumSize(JComponent c)
Overrides javax. Returns the specified component's minimum size appropriate for the look and feel. |
| public Dimension | getPreferredSize(JComponent c)
Overrides javax. Returns the specified component's preferred size appropriate for the look and feel. |
| protected String | |
| protected int | |
| protected void | |
| protected void | |
| protected void | |
| public void | installUI(JComponent c)
Overrides javax. Configures the specified component appropriately for the look and feel. |
| private boolean | |
| private String | |
| public void | paint(Graphics g, JComponent c)
Overrides javax. Paints the specified component appropriately for the look and feel. |
| protected void | paintButtonPressed(Graphics
an instance of g, AbstractButton Graphicsan abstract button b)Paints a pressed button. |
| protected void | paintFocus(Graphics
an instance of g, AbstractButton Graphicsan abstract button b, Rectangle a bounding rectangle to render the button viewRect, Rectangle a bounding rectangle to render the text textRect, Rectangle a bounding rectangle to render the icon iconRect)Paints a focused button. |
| protected void | paintIcon(Graphics
an instance of g, JComponent Graphicsa component c, Rectangle a bounding rectangle to render the icon iconRect)Paints an icon of the current button. |
| protected void | paintText(Graphics
an instance of g, JComponent Graphicsa component c, Rectangle a bounding rectangle to render the text textRect, String a string to render text)Method which renders the text of the current button. |
| protected void | paintText(Graphics
Graphics context g, AbstractButton Current button to render b, Rectangle Bounding rectangle to render the text textRect, String String to render text)Method which renders the text of the current button. |
| private void | selectToggleButton(ActionEvent event, boolean next)
Select toggle button based on "Previous" or "Next" operation |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | uninstallUI(JComponent c)
Overrides javax. Reverses configuration which was done on the specified component during
|
| defaultTextIconGap | back to summary |
|---|---|
| protected int defaultTextIconGap The default gap between a text and an icon. | |
| defaultTextShiftOffset | back to summary |
|---|---|
| protected int defaultTextShiftOffset The default offset of a text. | |
| iconRect | back to summary |
|---|---|
| private static Rectangle iconRect | |
| keyListener | back to summary |
|---|---|
| private KeyListener keyListener | |
| propertyPrefix | back to summary |
|---|---|
| private static final String propertyPrefix | |
| shiftOffset | back to summary |
|---|---|
| private int shiftOffset | |
| textRect | back to summary |
|---|---|
| private static Rectangle textRect | |
| UI | back to summary |
|---|---|
| private static final ComponentUI UI | |
| viewRect | back to summary |
|---|---|
| private static Rectangle viewRect | |
| BasicButtonUI | back to summary |
|---|---|
| public BasicButtonUI() Constructs a | |
| clearTextShiftOffset | back to summary |
|---|---|
| protected void clearTextShiftOffset() Clears the offset of the text. | |
| createButtonListener | back to summary |
|---|---|
| protected BasicButtonListener createButtonListener(AbstractButton b) Returns a new instance of
| |
| createKeyListener | back to summary |
|---|---|
| private KeyListener createKeyListener() Creates the key listener to handle tab navigation in JToggleButton Group. | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Returns an instance of
| |
| getBaseline | back to summary |
|---|---|
| public int getBaseline(JComponent c, int width, int height) Overrides javax. Returns the baseline.
| |
| getBaselineResizeBehavior | back to summary |
|---|---|
| public Component. Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes.
| |
| getButtonListener | back to summary |
|---|---|
| private BasicButtonListener getButtonListener(AbstractButton b) Returns the ButtonListener for the passed in Button, or null if one could not be found. | |
| getDefaultTextIconGap | back to summary |
|---|---|
| public int getDefaultTextIconGap(AbstractButton b) Returns the default gap between a text and an icon.
| |
| getMaximumSize | back to summary |
|---|---|
| public Dimension getMaximumSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's maximum size appropriate for
the look and feel. If | |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's minimum size appropriate for
the look and feel. If | |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize(JComponent c) Overrides javax. Doc from javax. Returns the specified component's preferred size appropriate for
the look and feel. If | |
| getPropertyPrefix | back to summary |
|---|---|
| protected String getPropertyPrefix() Returns the property prefix.
| |
| getTextShiftOffset | back to summary |
|---|---|
| protected int getTextShiftOffset() Returns the offset of the text.
| |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults(AbstractButton b) Installs default properties.
| |
| installKeyboardActions | back to summary |
|---|---|
| protected void installKeyboardActions(AbstractButton b) Registers keyboard actions.
| |
| installListeners | back to summary |
|---|---|
| protected void installListeners(AbstractButton b) Registers listeners.
| |
| installUI | back to summary |
|---|---|
| public void installUI(JComponent c) Overrides javax. Doc from javax. Configures the specified component appropriately for the look and feel.
This method is invoked when the
| |
| isValidToggleButtonObj | back to summary |
|---|---|
| private boolean isValidToggleButtonObj(Object obj) | |
| layout | back to summary |
|---|---|
| private String layout(AbstractButton b, FontMetrics fm, int width, int height) | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Doc from javax. Paints the specified component appropriately for the look and feel.
This method is invoked from the | |
| paintButtonPressed | back to summary |
|---|---|
| protected void paintButtonPressed(Graphics g, AbstractButton b) Paints a pressed button.
| |
| paintFocus | back to summary |
|---|---|
| protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) Paints a focused button.
| |
| paintIcon | back to summary |
|---|---|
| protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect) Paints an icon of the current button.
| |
| paintText | back to summary |
|---|---|
| protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) Method which renders the text of the current button. As of Java 2 platform v 1.4 this method should not be used or overridden. Use the paintText method which takes the AbstractButton argument.
| |
| paintText | back to summary |
|---|---|
| protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) Method which renders the text of the current button.
| |
| selectToggleButton | back to summary |
|---|---|
| private void selectToggleButton(ActionEvent event, boolean next) Select toggle button based on "Previous" or "Next" operation | |
| setTextShiftOffset | back to summary |
|---|---|
| protected void setTextShiftOffset() Sets the offset of the text. | |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults(AbstractButton b) Uninstalls default properties.
| |
| uninstallKeyboardActions | back to summary |
|---|---|
| protected void uninstallKeyboardActions(AbstractButton b) Unregisters keyboard actions.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners(AbstractButton b) Unregisters listeners.
| |
| uninstallUI | back to summary |
|---|---|
| public void uninstallUI(JComponent c) Overrides javax. Doc from javax. Reverses configuration which was done on the specified component during
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv JToggleButton | |
| pack-priv HashSet | |
| pack-priv JToggleButton | |
| pack-priv JToggleButton | |
| pack-priv JToggleButton | |
| pack-priv JToggleButton | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv Component | |
| pack-priv void | jumpToNextComponent(boolean next)
Find the button group the passed in JToggleButton belongs to, and move focus to next component of the last button in the group or previous component of first button |
| pack-priv void | selectNewButton(boolean next)
Find the new toggle/radio button that focus needs to be moved to in the group, select the button In case of radio button, setPressed and setArmed is called on the button model, so that Action set on button is performed on selecting the button |
| activeBtn | back to summary |
|---|---|
| pack-priv JToggleButton activeBtn | |
| btnsInGroup | back to summary |
|---|---|
| pack-priv HashSet<JToggleButton> btnsInGroup | |
| firstBtn | back to summary |
|---|---|
| pack-priv JToggleButton firstBtn | |
| lastBtn | back to summary |
|---|---|
| pack-priv JToggleButton lastBtn | |
| nextBtn | back to summary |
|---|---|
| pack-priv JToggleButton nextBtn | |
| previousBtn | back to summary |
|---|---|
| pack-priv JToggleButton previousBtn | |
| srcFound | back to summary |
|---|---|
| pack-priv boolean srcFound | |
| ButtonGroupInfo | back to summary |
|---|---|
| public ButtonGroupInfo(JToggleButton btn) | |
| containsInGroup | back to summary |
|---|---|
| pack-priv boolean containsInGroup(Object obj) | |
| getButtonGroupInfo | back to summary |
|---|---|
| pack-priv boolean getButtonGroupInfo() | |
| getFocusTransferBaseComponent | back to summary |
|---|---|
| pack-priv Component getFocusTransferBaseComponent(boolean next) | |
| jumpToNextComponent | back to summary |
|---|---|
| pack-priv void jumpToNextComponent(boolean next) Find the button group the passed in JToggleButton belongs to, and move focus to next component of the last button in the group or previous component of first button | |
| selectNewButton | back to summary |
|---|---|
| pack-priv void selectNewButton(boolean next) Find the new toggle/radio button that focus needs to be moved to in the group, select the button In case of radio button, setPressed and setArmed is called on the button model, so that Action set on button is performed on selecting the button | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public void | keyPressed(KeyEvent e)
Implements java. Invoked when a key has been pressed. |
| public void | keyReleased(KeyEvent e)
Implements java. Invoked when a key has been released. |
| public void | keyTyped(KeyEvent e)
Implements java. Invoked when a key has been typed. |
| KeyHandler | back to summary |
|---|---|
| private KeyHandler() | |
| isFocusTraversalKey | back to summary |
|---|---|
| private boolean isFocusTraversalKey(JComponent c, int id, AWTKeyStroke stroke) | |
| keyPressed | back to summary |
|---|---|
| public void keyPressed(KeyEvent e) Implements java. Doc from java. Invoked when a key has been pressed.
See the class description for | |
| keyReleased | back to summary |
|---|---|
| public void keyReleased(KeyEvent e) Implements java. Doc from java. Invoked when a key has been released.
See the class description for | |
| keyTyped | back to summary |
|---|---|
| public void keyTyped(KeyEvent e) Implements java. Doc from java. Invoked when a key has been typed.
See the class description for | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| SelectNextBtn | back to summary |
|---|---|
| public SelectNextBtn() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | actionPerformed(ActionEvent e)
Implements java. Invoked when an action occurs. |
| SelectPreviousBtn | back to summary |
|---|---|
| public SelectPreviousBtn() | |
| actionPerformed | back to summary |
|---|---|
| public void actionPerformed(ActionEvent e) Implements java. Doc from java. Invoked when an action occurs. | |