jaron.pde
Class Label

java.lang.Object
  extended by jaron.pde.Label

public class Label
extends java.lang.Object

The Label class provides the functionality for displaying a line of Text in the Processing Development Environment.

Since:
1.2
Version:
1.2
Author:
jarontec gmail com

Field Summary
static int HORIZONTAL
          Text alignment.
static int VERTICAL
          Text alignment.
 
Constructor Summary
Label(processing.core.PApplet applet, java.lang.String text, int left, int top)
          Creates a new Label object for the Processing Development Environment (PDE) at a certain position.
Label(processing.core.PApplet applet, java.lang.String text, int left, int top, int width, int height)
          Creates a new Label object for the Processing Development Environment (PDE) at a certain position and with a certain width and height.
 
Method Summary
 void draw()
          Draws the label to the screen.
 void setColorBackground(int colorBackground)
          Sets the label's background color.
 void setColorFrame(int colorFrame)
          Sets the color of the label's outer frame.
 void setColorText(int colorText)
          Sets the label's text color.
 void setTextOrientation(int textOrientation)
          Sets the text orientation.
 void setThicknessFrame(int thicknessFrame)
          Sets the thickness of the label's outer frame.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
Text alignment.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Text alignment.

See Also:
Constant Field Values
Constructor Detail

Label

public Label(processing.core.PApplet applet,
             java.lang.String text,
             int left,
             int top,
             int width,
             int height)
Creates a new Label object for the Processing Development Environment (PDE) at a certain position and with a certain width and height.

Parameters:
applet - a reference to the PDE applet that provides the drawing environment
text - the text to be displayed
left - the component's position from the left
top - the component's position from top
height - the component's height
width - the component's width

Label

public Label(processing.core.PApplet applet,
             java.lang.String text,
             int left,
             int top)
Creates a new Label object for the Processing Development Environment (PDE) at a certain position.

Parameters:
applet - a reference to the PDE applet that provides the drawing environment
text - the text to be displayed
left - the component's position from the left
top - the component's position from top
Method Detail

setColorBackground

public void setColorBackground(int colorBackground)
Sets the label's background color.

Parameters:
colorBackground - the background color
See Also:
Colors

setColorFrame

public void setColorFrame(int colorFrame)
Sets the color of the label's outer frame.

Parameters:
colorFrame - the frame color
See Also:
Colors

setColorText

public void setColorText(int colorText)
Sets the label's text color.

Parameters:
colorText - the text color
See Also:
Colors

setTextOrientation

public void setTextOrientation(int textOrientation)
Sets the text orientation. Possible orientations are horizontal (default) or vertical.

Parameters:
textOrientation - vertical or horizontal orientation
See Also:
HORIZONTAL, VERTICAL

setThicknessFrame

public void setThicknessFrame(int thicknessFrame)
Sets the thickness of the label's outer frame.

Parameters:
thicknessFrame - frame thickness in pixels

draw

public void draw()
Draws the label to the screen. This method should usually be called from the draw method of the Processing Development Environment.