jaron.pde
Class Display
java.lang.Object
jaron.gui.Panel
jaron.pde.Display
public class Display
- extends Panel
The Display
class provides a graphical component for the Processing Development
Environment (PDE). Depending on its selected height it can display n lines of data. A line
consists of a label, describing the data, an the data (double
) itself. New lines
are added via createTextLine
which returns an object of type Signal
. The
signal can be hooked to other signals via the EventListener
mechanism.
Have a look at the example of the UAVsim
for the usage of the
Display
.
- Since:
- 1.0
- Version:
- 1.2
- Author:
- jarontec gmail com
Constructor Summary |
Display(processing.core.PApplet applet,
int left,
int top)
Creates a new Display object for the Processing Development Environment
(PDE) at a certain position. |
Display(processing.core.PApplet applet,
int left,
int top,
int width,
int height)
Creates a new Display object for the Processing Development Environment
(PDE) at a certain position and with a certain width and height. |
Method Summary |
Signal |
createTextLine(java.lang.String label)
Creates and returns a new line. |
void |
draw()
Draws the Display to the screen. |
Methods inherited from class jaron.gui.Panel |
getContent, getFrame, getLabelBottom, getLabelLeft, getLabelRight, getLabelTop, setContent, setFrame, setLabelBottomHeight, setLabelLeftWidth, setLabelRightWidth, setLabelTopHeight |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Display
public Display(processing.core.PApplet applet,
int left,
int top,
int width,
int height)
- Creates a new
Display
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 environmentleft
- the component's position from the lefttop
- the component's position from topheight
- the component's height including the labelswidth
- the component's width including the labels
Display
public Display(processing.core.PApplet applet,
int left,
int top)
- Creates a new
Display
object for the Processing Development Environment
(PDE) at a certain position.
- Parameters:
applet
- a reference to the PDE applet that provides the drawing environmentleft
- the component's position from the lefttop
- the component's position from top
draw
public void draw()
- Draws the Display to the screen. All the lines that have been added with
createTextLine
are listed from top to bottom in alphabetical
order.
createTextLine
public Signal createTextLine(java.lang.String label)
- Creates and returns a new line. The line is of type
Signal
and is
later used to display a line of text.
- Parameters:
label
- the label of the line's value
- Returns:
- a new
Signal
object representing a line's value