jaron.pde
Class Display

java.lang.Object
  extended by jaron.gui.Panel
      extended by 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

Field Summary
 
Fields inherited from class jaron.gui.Panel
content, frame, labelBottom, labelLeft, labelRight, labelTop
 
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
 

Constructor Detail

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 environment
left - the component's position from the left
top - the component's position from top
height - the component's height including the labels
width - 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 environment
left - the component's position from the left
top - the component's position from top
Method Detail

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