Package games.stendhal.client.gui.styled
Class StyledButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
games.stendhal.client.gui.styled.StyledButtonUI
ButtonUI implementation for drawing PixmapStyle buttons.
-
Field Summary
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
createUI(JComponent button)
Required by UIManager.getPreferredSize(JComponent button)
void
installUI(JComponent button)
void
paint(Graphics graphics, JComponent button)
protected void
paintButtonPressed(Graphics graphics, AbstractButton button)
protected void
paintFocus(Graphics graphics, AbstractButton button, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void
paintText(Graphics graphics, AbstractButton button, Rectangle textRect, String text)
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installDefaults, installKeyboardActions, installListeners, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Constructor Details
-
StyledButtonUI
Create a new StyledButtonUI.- Parameters:
style
- used pixmap style
-
-
Method Details
-
createUI
Required by UIManager.- Parameters:
button
- component to create UI for- Returns:
- UI delegate
-
paint
- Overrides:
paint
in classBasicButtonUI
-
paintButtonPressed
- Overrides:
paintButtonPressed
in classBasicButtonUI
-
paintText
protected void paintText(Graphics graphics, AbstractButton button, Rectangle textRect, String text)- Overrides:
paintText
in classBasicButtonUI
-
paintFocus
protected void paintFocus(Graphics graphics, AbstractButton button, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)- Overrides:
paintFocus
in classBasicButtonUI
-
getPreferredSize
- Overrides:
getPreferredSize
in classBasicButtonUI
-
installUI
- Overrides:
installUI
in classBasicButtonUI
-