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 voidprotected BasicButtonListenerstatic ComponentUIintprotected Colorprotected Colorprotected Iconprotected Stringprotected intprotected voidprotected voidprotected voidvoidprotected booleanvoidpaint(Graphics g, JComponent c) protected voidprotected voidpaintIcon(AbstractButton b, Graphics g) protected voidpaintText(Graphics g, AbstractButton b, Rectangle textRect, String text) Method which renders the text of the current button.protected voidpaintText(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 voidstatic booleanChecks if we should wrap text on a button.protected voidprotected voidprotected voidvoidprotected voidMethods 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:
installUIin classComponentUI
-
installDefaults
-
installListeners
-
installKeyboardActions
-
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
uninstallKeyboardActions
-
uninstallListeners
-
uninstallDefaults
-
createButtonListener
-
getDefaultTextIconGap
-
getFocusColor
-
paint
- Overrides:
paintin 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:
getMinimumSizein classComponentUI
-
getPreferredSize
- Overrides:
getPreferredSizein classComponentUI
-
getMaximumSize
- Overrides:
getMaximumSizein 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.
-