public class LabelPNodeGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static EditLabelEventListener |
labelListener |
Constructor and Description |
---|
LabelPNodeGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
addTextToLabel(edu.umd.cs.piccolo.PNode labelNode,
java.lang.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,
java.awt.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(java.lang.String text,
int fontSize) |
static edu.umd.cs.piccolo.PNode |
newLabel(java.lang.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(java.lang.String text,
float fontSize) |
static edu.umd.cs.piccolo.nodes.PText |
newLabelText(java.lang.String text,
float fontSize,
double xOffset,
double yOffset) |
static edu.umd.cs.piccolo.nodes.PText |
newLabelTextLocation(java.lang.String text,
float fontSize,
double x,
double y) |
private static EditLabelEventListener labelListener
public static void addTextToLabel(edu.umd.cs.piccolo.PNode labelNode, java.lang.String text, int fontSize, double xOffset, double yOffset)
labelNode
- The node to add the text totext
- the text stringfontSize
- the desired font sizexOffset
- unusedyOffset
- unusedpublic static void changeColor(edu.umd.cs.piccolo.nodes.PText label, java.awt.Color c)
public static void changeRotation(edu.umd.cs.piccolo.PNode labelNode, double rotation)
labelNode
- the node to be rotatedrotation
- the rotation in radianspublic static edu.umd.cs.piccolo.PNode newLabel(edu.umd.cs.piccolo.nodes.PText textNode)
public static edu.umd.cs.piccolo.PNode newLabel(java.lang.String text, int fontSize)
public static edu.umd.cs.piccolo.PNode newLabel(java.lang.String text, int fontSize, double xPos, double yPos, double xOffset, double yOffset)
public static edu.umd.cs.piccolo.PNode newLabelNode(double xOffset, double yOffset, double rotation)
public static edu.umd.cs.piccolo.nodes.PText newLabelText(java.lang.String text, float fontSize)
public static edu.umd.cs.piccolo.nodes.PText newLabelText(java.lang.String text, float fontSize, double xOffset, double yOffset)
public static edu.umd.cs.piccolo.nodes.PText newLabelTextLocation(java.lang.String text, float fontSize, double x, double y)