giny.view
Interface Label


public interface Label


Field Summary
static int CENTER
           
static int EAST
           
static int NORTH
           
static int NORTHEAST
           
static int NORTHWEST
           
static int SOURCE_BOUND
           
static int SOUTH
           
static int SOUTHEAST
           
static int SOUTHWEST
           
static int TARGET_BOUND
           
static int WEST
           
 
Method Summary
 java.awt.Font getFont()
          Returns the font of this PText.
 double getGreekThreshold()
          Returns the current greek threshold.
 java.lang.String getText()
           
 java.awt.Paint getTextPaint()
          Get the paint used to paint this nodes text.
 void setFont(java.awt.Font aFont)
          Set the font of this PText.
 void setGreekThreshold(double threshold)
          Sets the current greek threshold.
 void setPositionHint(int position)
          Give the Label a hint on where to draw itself.
 void setText(java.lang.String aText)
          Set the text for this node.
 void setTextPaint(java.awt.Paint textPaint)
          Set the paint used to paint this nodes text.
 

Field Detail

CENTER

public static final int CENTER
See Also:
Constant Field Values

NORTH

public static final int NORTH
See Also:
Constant Field Values

SOUTH

public static final int SOUTH
See Also:
Constant Field Values

WEST

public static final int WEST
See Also:
Constant Field Values

EAST

public static final int EAST
See Also:
Constant Field Values

NORTHWEST

public static final int NORTHWEST
See Also:
Constant Field Values

NORTHEAST

public static final int NORTHEAST
See Also:
Constant Field Values

SOUTHEAST

public static final int SOUTHEAST
See Also:
Constant Field Values

SOUTHWEST

public static final int SOUTHWEST
See Also:
Constant Field Values

SOURCE_BOUND

public static final int SOURCE_BOUND
See Also:
Constant Field Values

TARGET_BOUND

public static final int TARGET_BOUND
See Also:
Constant Field Values
Method Detail

setPositionHint

public void setPositionHint(int position)
Give the Label a hint on where to draw itself. NOTE: This should be thought of as a hint only, not all labels will support all positions


getTextPaint

public java.awt.Paint getTextPaint()
Get the paint used to paint this nodes text.

Returns:
Paint

setTextPaint

public void setTextPaint(java.awt.Paint textPaint)
Set the paint used to paint this nodes text.

Parameters:
textPaint -

getGreekThreshold

public double getGreekThreshold()
Returns the current greek threshold. When the screen font size will be below this threshold the text is rendered as 'greek' instead of drawing the text glyphs.


setGreekThreshold

public void setGreekThreshold(double threshold)
Sets the current greek threshold. When the screen font size will be below this threshold the text is rendered as 'greek' instead of drawing the text glyphs.


getText

public java.lang.String getText()

setText

public void setText(java.lang.String aText)
Set the text for this node. The text will be broken up into multiple lines based on the size of the text and the bounds width of this node.


getFont

public java.awt.Font getFont()
Returns the font of this PText.

Returns:
the font of this PText.

setFont

public void setFont(java.awt.Font aFont)
Set the font of this PText. Note that in Piccolo if you want to change the size of a text object it's often a better idea to scale the PText node instead of changing the font size to get that same effect. Using very large font sizes can slow performance.