Package com.jidesoft.plaf.basic
Class BasicJideButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
com.jidesoft.plaf.JideButtonUI
com.jidesoft.plaf.basic.BasicJideButtonUI
JideButtonUI implementation
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected BasicButtonListener
static ComponentUI
int
protected Color
protected Color
protected Icon
protected String
protected int
protected void
protected void
protected void
void
protected boolean
void
paint
(Graphics g, JComponent c) protected void
protected void
paintIcon
(AbstractButton b, Graphics g) protected void
paintText
(Graphics g, AbstractButton b, Rectangle textRect, String text) Method which renders the text of the current button.protected void
paintText
(Graphics g, JComponent c, Rectangle textRect, String text) As of Java 2 platform v 1.4 this method should not be used or overridden.protected void
static boolean
Checks if we should wrap text on a button.protected void
protected void
protected void
void
protected void
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
-
Field Details
-
defaultTextIconGap
protected int defaultTextIconGap -
defaultTextShiftOffset
protected int defaultTextShiftOffset -
_painter
-
_shadowColor
-
_darkShadowColor
-
_highlight
-
_lightHighlightColor
-
_focusColor
-
_isFloatingIcon
protected boolean _isFloatingIcon -
viewRect
-
textRect
-
iconRect
-
-
Constructor Details
-
BasicJideButtonUI
public BasicJideButtonUI()
-
-
Method Details
-
createUI
-
getPropertyPrefix
-
installUI
- Overrides:
installUI
in classComponentUI
-
installDefaults
-
installListeners
-
installKeyboardActions
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
uninstallKeyboardActions
-
uninstallListeners
-
uninstallDefaults
-
createButtonListener
-
getDefaultTextIconGap
-
getFocusColor
-
paint
- Overrides:
paint
in classComponentUI
-
paintIcon
-
getIcon
-
isFloatingIcon
protected boolean isFloatingIcon() -
paintText
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.- Parameters:
g
- the Graphics instancec
- the componenttextRect
- the rectangle of the texttext
- the text to paint
-
getForegroundOfState
-
paintText
Method which renders the text of the current button.- Parameters:
g
- Graphics contextb
- Current button to rendertextRect
- Bounding rectangle to render the text.text
- String to render- Since:
- 1.4
-
paintBackground
-
clearTextShiftOffset
protected void clearTextShiftOffset() -
setTextShiftOffset
protected void setTextShiftOffset() -
getTextShiftOffset
protected int getTextShiftOffset() -
getMinimumSize
- Overrides:
getMinimumSize
in classComponentUI
-
getPreferredSize
- Overrides:
getPreferredSize
in classComponentUI
-
getMaximumSize
- Overrides:
getMaximumSize
in classComponentUI
-
getPainter
-
updateMargin
-
shouldWrapText
Checks if we should wrap text on a button. If the vertical text position is bottom and horizontal text position is center, we will wrap the text.- Parameters:
c
- the component- Returns:
- true or false.
-