Class BasicJideButtonUI


  • public class BasicJideButtonUI
    extends JideButtonUI
    JideButtonUI implementation
    • Field Detail

      • defaultTextIconGap

        protected int defaultTextIconGap
      • defaultTextShiftOffset

        protected int defaultTextShiftOffset
      • _shadowColor

        protected java.awt.Color _shadowColor
      • _darkShadowColor

        protected java.awt.Color _darkShadowColor
      • _highlight

        protected java.awt.Color _highlight
      • _lightHighlightColor

        protected java.awt.Color _lightHighlightColor
      • _focusColor

        protected java.awt.Color _focusColor
      • _isFloatingIcon

        protected boolean _isFloatingIcon
      • viewRect

        protected static java.awt.Rectangle viewRect
      • textRect

        protected static java.awt.Rectangle textRect
      • iconRect

        protected static java.awt.Rectangle iconRect
    • Constructor Detail

      • BasicJideButtonUI

        public BasicJideButtonUI()
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • getPropertyPrefix

        protected java.lang.String getPropertyPrefix()
      • installUI

        public void installUI​(javax.swing.JComponent c)
        Overrides:
        installUI in class javax.swing.plaf.ComponentUI
      • installDefaults

        protected void installDefaults​(javax.swing.AbstractButton b)
      • installListeners

        protected void installListeners​(javax.swing.AbstractButton b)
      • installKeyboardActions

        protected void installKeyboardActions​(javax.swing.AbstractButton b)
      • uninstallUI

        public void uninstallUI​(javax.swing.JComponent c)
        Overrides:
        uninstallUI in class javax.swing.plaf.ComponentUI
      • uninstallKeyboardActions

        protected void uninstallKeyboardActions​(javax.swing.AbstractButton b)
      • uninstallListeners

        protected void uninstallListeners​(javax.swing.AbstractButton b)
      • uninstallDefaults

        protected void uninstallDefaults​(javax.swing.AbstractButton b)
      • createButtonListener

        protected javax.swing.plaf.basic.BasicButtonListener createButtonListener​(javax.swing.AbstractButton b)
      • getDefaultTextIconGap

        public int getDefaultTextIconGap​(javax.swing.AbstractButton b)
      • getFocusColor

        protected java.awt.Color getFocusColor()
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Overrides:
        paint in class javax.swing.plaf.ComponentUI
      • paintIcon

        protected void paintIcon​(javax.swing.AbstractButton b,
                                 java.awt.Graphics g)
      • getIcon

        protected javax.swing.Icon getIcon​(javax.swing.AbstractButton b)
      • isFloatingIcon

        protected boolean isFloatingIcon()
      • paintText

        protected void paintText​(java.awt.Graphics g,
                                 javax.swing.JComponent c,
                                 java.awt.Rectangle textRect,
                                 java.lang.String text)
        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 instance
        c - the component
        textRect - the rectangle of the text
        text - the text to paint
      • getForegroundOfState

        protected java.awt.Color getForegroundOfState​(javax.swing.AbstractButton b)
      • paintText

        protected void paintText​(java.awt.Graphics g,
                                 javax.swing.AbstractButton b,
                                 java.awt.Rectangle textRect,
                                 java.lang.String text)
        Method which renders the text of the current button.

        Parameters:
        g - Graphics context
        b - Current button to render
        textRect - Bounding rectangle to render the text.
        text - String to render
        Since:
        1.4
      • paintBackground

        protected void paintBackground​(java.awt.Graphics g,
                                       javax.swing.AbstractButton b)
      • clearTextShiftOffset

        protected void clearTextShiftOffset()
      • setTextShiftOffset

        protected void setTextShiftOffset()
      • getTextShiftOffset

        protected int getTextShiftOffset()
      • getMinimumSize

        public java.awt.Dimension getMinimumSize​(javax.swing.JComponent c)
        Overrides:
        getMinimumSize in class javax.swing.plaf.ComponentUI
      • getPreferredSize

        public java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)
        Overrides:
        getPreferredSize in class javax.swing.plaf.ComponentUI
      • getMaximumSize

        public java.awt.Dimension getMaximumSize​(javax.swing.JComponent c)
        Overrides:
        getMaximumSize in class javax.swing.plaf.ComponentUI
      • updateMargin

        protected void updateMargin​(javax.swing.AbstractButton b)
      • shouldWrapText

        public static boolean shouldWrapText​(java.awt.Component c)
        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.