at.tuwien.ifs.somtoolbox.util
Class LabelPNodeGenerator
java.lang.Object
at.tuwien.ifs.somtoolbox.util.LabelPNodeGenerator
public class LabelPNodeGenerator
- extends Object
Convenience class for creating new labels. (cluster and manual)
- Version:
- $Id: LabelPNodeGenerator.java 3589 2010-05-21 10:42:01Z mayer $
- Author:
- Angela Roiger
Method Summary |
static void |
addTextToLabel(edu.umd.cs.piccolo.PNode labelNode,
String text,
int fontSize,
double xOffset,
double yOffset)
Adds an additional line of text to the label. |
static void |
changeColor(edu.umd.cs.piccolo.nodes.PText label,
Color c)
|
static void |
changeRotation(edu.umd.cs.piccolo.PNode labelNode,
double rotation)
Set the rotation of the PNode in radians |
static edu.umd.cs.piccolo.PNode |
newLabel(edu.umd.cs.piccolo.nodes.PText textNode)
|
static edu.umd.cs.piccolo.PNode |
newLabel(String text,
int fontSize)
|
static edu.umd.cs.piccolo.PNode |
newLabel(String text,
int fontSize,
double xPos,
double yPos,
double xOffset,
double yOffset)
|
static edu.umd.cs.piccolo.PNode |
newLabelNode(double xOffset,
double yOffset,
double rotation)
|
static edu.umd.cs.piccolo.nodes.PText |
newLabelText(String text,
float fontSize)
|
static edu.umd.cs.piccolo.nodes.PText |
newLabelText(String text,
float fontSize,
double xOffset,
double yOffset)
|
static edu.umd.cs.piccolo.nodes.PText |
newLabelTextLocation(String text,
float fontSize,
double x,
double y)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
labelListener
private static EditLabelEventListener labelListener
LabelPNodeGenerator
public LabelPNodeGenerator()
addTextToLabel
public static void addTextToLabel(edu.umd.cs.piccolo.PNode labelNode,
String text,
int fontSize,
double xOffset,
double yOffset)
- Adds an additional line of text to the label.
- Parameters:
labelNode
- The node to add the text totext
- the text stringfontSize
- the desired font sizexOffset
- unusedyOffset
- unused
changeColor
public static void changeColor(edu.umd.cs.piccolo.nodes.PText label,
Color c)
changeRotation
public static void changeRotation(edu.umd.cs.piccolo.PNode labelNode,
double rotation)
- Set the rotation of the PNode in radians
- Parameters:
labelNode
- the node to be rotatedrotation
- the rotation in radians
newLabel
public static edu.umd.cs.piccolo.PNode newLabel(edu.umd.cs.piccolo.nodes.PText textNode)
newLabel
public static edu.umd.cs.piccolo.PNode newLabel(String text,
int fontSize)
newLabel
public static edu.umd.cs.piccolo.PNode newLabel(String text,
int fontSize,
double xPos,
double yPos,
double xOffset,
double yOffset)
newLabelNode
public static edu.umd.cs.piccolo.PNode newLabelNode(double xOffset,
double yOffset,
double rotation)
newLabelText
public static edu.umd.cs.piccolo.nodes.PText newLabelText(String text,
float fontSize)
newLabelText
public static edu.umd.cs.piccolo.nodes.PText newLabelText(String text,
float fontSize,
double xOffset,
double yOffset)
newLabelTextLocation
public static edu.umd.cs.piccolo.nodes.PText newLabelTextLocation(String text,
float fontSize,
double x,
double y)