|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.LabelUI
javax.swing.plaf.basic.BasicLabelUI
jmri.util.swing.VerticalLabelUI
public class VerticalLabelUI
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));
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 Summary | |
|---|---|
static int |
ANTICLOCKWISE
Define Anti-Clockwise rotation (-90 degrees from horizontal) |
static int |
CLOCKWISE
Define Clockwise rotation (+90 degrees from horizontal) |
| Fields inherited from class javax.swing.plaf.basic.BasicLabelUI |
|---|
labelUI |
| Constructor Summary | |
|---|---|
VerticalLabelUI()
Default constructor which provides a vertical label with anti-clockwise orientation |
|
VerticalLabelUI(int rotation)
Constructor used to provide a vertical label of the specified orientation |
|
| Method Summary | |
|---|---|
static ComponentUI |
createUI(JComponent component)
Return default VerticalLabelUI instance |
Dimension |
getPreferredSize(JComponent component)
|
void |
paint(Graphics graphics,
JComponent component)
|
| Methods inherited from class javax.swing.plaf.basic.BasicLabelUI |
|---|
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 |
|---|
public static final int CLOCKWISE
public static final int ANTICLOCKWISE
| Constructor Detail |
|---|
public VerticalLabelUI()
public VerticalLabelUI(int rotation)
rotation - defines the rotation:
CLOCKWISE or
ANTICLOCKWISE| Method Detail |
|---|
public Dimension getPreferredSize(JComponent component)
getPreferredSize in class BasicLabelUI
public void paint(Graphics graphics,
JComponent component)
paint in class BasicLabelUIpublic static ComponentUI createUI(JComponent component)
component -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||