Package jmri.util.swing
Class VerticalLabelUI
- java.lang.Object
- 
- javax.swing.plaf.ComponentUI
- 
- javax.swing.plaf.LabelUI
- 
- javax.swing.plaf.basic.BasicLabelUI
- 
- jmri.util.swing.VerticalLabelUI
 
 
 
 
- 
- All Implemented Interfaces:
- java.beans.PropertyChangeListener,- java.util.EventListener
 
 public class VerticalLabelUI extends javax.swing.plaf.basic.BasicLabelUI Allows a JLabel to be displayed vertically, with a defined orientation. Usage (for a vertical label with anti-clockwise orientation):
 JLabel label = new JLabel("Vertical Label");
 label.setUI(new VerticalLabelUI(VerticalLabelUI.ANTICLOCKWISE));
 This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license. JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 
- 
- 
Field SummaryFields Modifier and Type Field Description static intANTICLOCKWISEDefine Anti-Clockwise rotation (-90 degrees from horizontal)static intCLOCKWISEDefine Clockwise rotation (+90 degrees from horizontal)
 - 
Constructor SummaryConstructors Constructor Description VerticalLabelUI()Default constructor which provides a vertical label with anti-clockwise orientationVerticalLabelUI(int rotation)Constructor used to provide a vertical label of the specified orientation
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.DimensiongetPreferredSize(javax.swing.JComponent component)voidpaint(java.awt.Graphics graphics, javax.swing.JComponent component)- 
Methods inherited from class javax.swing.plaf.basic.BasicLabelUIcreateUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, layoutCL, paintDisabledText, paintEnabledText, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
- 
 
- 
- 
- 
Field Detail- 
CLOCKWISEpublic static final int CLOCKWISE Define Clockwise rotation (+90 degrees from horizontal)- See Also:
- Constant Field Values
 
 - 
ANTICLOCKWISEpublic static final int ANTICLOCKWISE Define Anti-Clockwise rotation (-90 degrees from horizontal)- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
VerticalLabelUIpublic VerticalLabelUI() Default constructor which provides a vertical label with anti-clockwise orientation
 - 
VerticalLabelUIpublic VerticalLabelUI(int rotation) Constructor used to provide a vertical label of the specified orientation- Parameters:
- rotation- defines the rotation:- CLOCKWISEor- ANTICLOCKWISE
 
 
- 
 - 
Method Detail- 
getPreferredSizepublic java.awt.Dimension getPreferredSize(javax.swing.JComponent component) - Overrides:
- getPreferredSizein class- javax.swing.plaf.basic.BasicLabelUI
 
 - 
paintpublic void paint(java.awt.Graphics graphics, javax.swing.JComponent component) - Overrides:
- paintin class- javax.swing.plaf.basic.BasicLabelUI
 
 
- 
 
-