public class VTextIcon
extends java.lang.Object
implements javax.swing.Icon, java.beans.PropertyChangeListener
ATTENTION: This class has been taken from the tutorial web pages from O'Reilly called macdevCenter.com. The original author and creator of this class was Lee Ann Rucker. Currently you will find the web page under http://www.oreillynet.com/pub/a/mac/2002/03/22/vertical_text.html. For further information you should refer to this page.
Modifier and Type | Class and Description |
---|---|
static class |
VTextIcon.POSITION |
static class |
VTextIcon.ROTATION |
Constructor and Description |
---|
VTextIcon(java.awt.Component component_,
java.lang.String label_)
Creates a
VTextIcon for the specified component
with the specified label . |
VTextIcon(java.awt.Component component_,
java.lang.String label_,
VTextIcon.ROTATION rotateHint_)
Creates a
VTextIcon for the specified component
with the specified label . |
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight()
Returns the icon's height.
|
int |
getIconWidth()
Returns the icon's width.
|
void |
paintIcon(java.awt.Component component_,
java.awt.Graphics graphics_,
int x_,
int y_)
Draw the icon at the specified location.
|
void |
propertyChange(java.beans.PropertyChangeEvent event_)
Checks for changes to the font on the fComponent
so that it can invalidate the layout if the size changes.
|
void |
setLabel(java.lang.String label)
Sets the label to the given string, updating the orientation as needed
and invalidating the layout if the size changes
|
public VTextIcon(java.awt.Component component_, java.lang.String label_)
VTextIcon
for the specified component
with the specified label
.
It sets the orientation to the default for the string.component_
- label_
- verifyRotation(java.lang.String, de.desy.mst.libs.accelerator.view.thirdParty.VTextIcon.ROTATION)
public VTextIcon(java.awt.Component component_, java.lang.String label_, VTextIcon.ROTATION rotateHint_)
VTextIcon
for the specified component
with the specified label
.
It sets the orientation to the provided value if it's legal for the string.component_
- label_
- rotateHint_
- verifyRotation(java.lang.String, de.desy.mst.libs.accelerator.view.thirdParty.VTextIcon.ROTATION)
public void setLabel(java.lang.String label)
label
- verifyRotation(java.lang.String, de.desy.mst.libs.accelerator.view.thirdParty.VTextIcon.ROTATION)
public void propertyChange(java.beans.PropertyChangeEvent event_)
propertyChange
in interface java.beans.PropertyChangeListener
event_
- public void paintIcon(java.awt.Component component_, java.awt.Graphics graphics_, int x_, int y_)
paintIcon
in interface javax.swing.Icon
component_
- graphics_
- x_
- y_
- paintIcon(Component, Graphics, int, int)
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft