Class VerticalLabelUI

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.util.EventListener

    public class VerticalLabelUI
    extends javax.swing.plaf.basic.BasicLabelUI
    VerticalLabelUI - used to replace the UI on a JLabel to make it vertical
    Version:
    1.0
    Author:
    Created by Jasper Potts (10-Jun-2004)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean clockwise  
      • Fields inherited from class javax.swing.plaf.basic.BasicLabelUI

        labelUI
    • Constructor Summary

      Constructors 
      Constructor Description
      VerticalLabelUI​(boolean clockwise)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)  
      boolean isRotateIcon()
      Gets the flag indicating if the icon should be rotated.
      void paint​(java.awt.Graphics i_oGraphics, javax.swing.JComponent i_oComponent)  
      void setRotateIcon​(boolean rotateIcon)
      Sets the flag indicating if the icon should be rotated.
      • Methods inherited from class javax.swing.plaf.basic.BasicLabelUI

        createUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, layoutCL, paintDisabledText, paintEnabledText, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • clockwise

        protected boolean clockwise
    • Constructor Detail

      • VerticalLabelUI

        public VerticalLabelUI​(boolean clockwise)
    • Method Detail

      • getPreferredSize

        public java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)
        Overrides:
        getPreferredSize in class javax.swing.plaf.basic.BasicLabelUI
      • paint

        public void paint​(java.awt.Graphics i_oGraphics,
                          javax.swing.JComponent i_oComponent)
        Overrides:
        paint in class javax.swing.plaf.basic.BasicLabelUI
      • isRotateIcon

        public boolean isRotateIcon()
        Gets the flag indicating if the icon should be rotated.
        Returns:
        true if the icon should be rotated with the text. Otherwise false.
        Since:
        3.5.5
      • setRotateIcon

        public void setRotateIcon​(boolean rotateIcon)
        Sets the flag indicating if the icon should be rotated.

        By default the value is true.

        Parameters:
        rotateIcon - the flag
        Since:
        3.5.5