javax.swing.JButton .
| Modifier and Type | Field and Description |
|---|---|
| private SynthStyle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ComponentUI | Returns: the UI objectcomponent to create UI object for c)Hides javax. Creates a new UI object for the given component. |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| private int | |
| public SynthContext | getContext(JComponent c)
Implements javax. Returns the Context for the specified component. |
| pack-priv SynthContext | |
| protected Icon | Returns: default iconbutton the icon is associated with b)Returns the default icon. |
| private Icon | |
| protected Icon | Returns: an iconbutton the icon is associated with b)Returns the Icon to use for painting the button. |
| private Icon | getIcon(AbstractButton
button b, Icon icon returned from the button for the specific state specificIcon, Icon fallback icon defaultIcon, int the synth state of the button state)This method will return the icon that should be used for a button. |
| 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. |
| private Icon | |
| private Icon | |
| private Icon | |
| protected Icon | Returns: the Icon used in calculating the preferred/minimum/maximum size.specifies the b)AbstractButton
used when calculating the preferred/minimum/maximum
size.Returns the Icon used in calculating the preferred/minimum/maximum size. |
| private Icon | getSpecificIcon(AbstractButton b, Icon specificSelectedIcon, Icon specificIcon, Icon defaultIcon, int state)
|
| private Icon | |
| private Icon | |
| private int | |
| protected void | installDefaults(AbstractButton b)
Overrides javax. Installs default properties. |
| protected void | installListeners(AbstractButton b)
Overrides javax. Registers listeners. |
| public void | paint(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Paints the specified component according to the Look and Feel. |
| protected void | paint(SynthContext
context for the component being painted context, Graphics the g)Graphics object used for paintingPaints the specified component. |
| pack-priv void | |
| public void | paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the border. |
| public void | propertyChange(PropertyChangeEvent e)
Implements java. This method gets called when a bound property is changed. |
| protected void | uninstallDefaults(AbstractButton b)
Overrides javax. Uninstalls default properties. |
| protected void | uninstallListeners(AbstractButton b)
Overrides javax. Unregisters listeners. |
| public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Notifies this UI delegate to repaint the specified component. |
| pack-priv void |
| style | back to summary |
|---|---|
| private SynthStyle style | |
| SynthButtonUI | back to summary |
|---|---|
| public SynthButtonUI() Constructs a | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Creates a new UI object for the given component.
| |
| getBaseline | back to summary |
|---|---|
| public int getBaseline(JComponent c, int width, int height) Overrides javax. Doc from javax. Returns the baseline.
| |
| getComponentState | back to summary |
|---|---|
| private int getComponentState(JComponent c) Returns the current state of the passed in | |
| getContext | back to summary |
|---|---|
| public SynthContext getContext(JComponent c) Implements javax. Doc from javax. Returns the Context for the specified component.
| |
| getContext | back to summary |
|---|---|
| pack-priv SynthContext getContext(JComponent c, int state) | |
| getDefaultIcon | back to summary |
|---|---|
| protected Icon getDefaultIcon(AbstractButton b) Returns the default icon. This should not callback to the JComponent.
| |
| getEnabledIcon | back to summary |
|---|---|
| private Icon getEnabledIcon(AbstractButton b, Icon defaultIcon) | |
| getIcon | back to summary |
|---|---|
| protected Icon getIcon(AbstractButton b) Returns the Icon to use for painting the button. The icon is chosen with respect to the current state of the button.
| |
| getIcon | back to summary |
|---|---|
| private Icon getIcon(AbstractButton b, Icon specificIcon, Icon defaultIcon, int state) This method will return the icon that should be used for a button. We
only want to use the synth icon defined by the style if the specific
icon has not been defined for the button state and the backup icon is a
UIResource (we set it, not the developer) or
| |
| 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
| |
| getPressedIcon | back to summary |
|---|---|
| private Icon getPressedIcon(AbstractButton b, Icon defaultIcon) | |
| getRolloverIcon | back to summary |
|---|---|
| private Icon getRolloverIcon(AbstractButton b, Icon defaultIcon) | |
| getSelectedIcon | back to summary |
|---|---|
| private Icon getSelectedIcon(AbstractButton b, Icon defaultIcon) | |
| getSizingIcon | back to summary |
|---|---|
| protected Icon getSizingIcon(AbstractButton b) Returns the Icon used in calculating the preferred/minimum/maximum size.
| |
| getSpecificIcon | back to summary |
|---|---|
| private Icon getSpecificIcon(AbstractButton b, Icon specificSelectedIcon, Icon specificIcon, Icon defaultIcon, int state) | |
| getSynthDisabledIcon | back to summary |
|---|---|
| private Icon getSynthDisabledIcon(AbstractButton b, Icon defaultIcon) | |
| getSynthIcon | back to summary |
|---|---|
| private Icon getSynthIcon(AbstractButton b, int synthConstant) | |
| getTextShiftOffset | back to summary |
|---|---|
| private int getTextShiftOffset(SynthContext state) Returns the amount to shift the text/icon when painting. | |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults(AbstractButton b) Overrides javax. Doc from javax. Installs default properties.
| |
| installListeners | back to summary |
|---|---|
| protected void installListeners(AbstractButton b) Overrides javax. Doc from javax. Registers listeners.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Paints the specified component according to the Look and Feel. This method is not used by Synth Look and Feel.
Painting is handled by the
| |
| paint | back to summary |
|---|---|
| protected void paint(SynthContext context, Graphics g) Paints the specified component.
| |
| paintBackground | back to summary |
|---|---|
| pack-priv void paintBackground(SynthContext context, Graphics g, JComponent c) | |
| paintBorder | back to summary |
|---|---|
| public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the border.
| |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent e) Implements java. Doc from java. This method gets called when a bound property is changed.
| |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults(AbstractButton b) Overrides javax. Doc from javax. Uninstalls default properties.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners(AbstractButton b) Overrides javax. Doc from javax. Unregisters listeners.
| |
| update | back to summary |
|---|---|
| public void update(Graphics g, JComponent c) Overrides javax. Notifies this UI delegate to repaint the specified component.
This method paints the component background, then calls
the In general, this method does not need to be overridden by subclasses.
All Look and Feel rendering code should reside in the
| |
| updateStyle | back to summary |
|---|---|
| pack-priv void updateStyle(AbstractButton b) | |