Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet Class Reference
Inheritance diagram for edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void clearHighlight ()
void draw ()
boolean highlightAction (Action a, boolean expand)
boolean highlightAction (String identifier, boolean expand)
void loadPrologPlan (String identifier)
void mouseClicked (MouseEvent e)
void mouseDragged (MouseEvent e)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void mouseMoved (MouseEvent e)
void mousePressed (MouseEvent e)
void mouseReleased (MouseEvent e)
void mouseWheelMoved (MouseWheelEvent e)
 PlanVisApplet ()
void setMainAction (Action action)
void setup ()

Static Public Member Functions

static void arrow (PApplet applet, float x, float y, float width, float height)
static void arrowFromTo (PApplet applet, Vector2f from, Vector2f to, float lineWidth, float blockLength)

Private Member Functions

void drawCurrAction ()
void drawHistory ()
int getHistoryHover (float x, float y)
Action loadPrologPlanRecursive (String iri)
void updateHistoryPosition ()

Private Attributes

ArrayList
< ActionSelectHistoryInfo
clickHistory = new ArrayList<ActionSelectHistoryInfo>()
Action currAction
PFont dejavuFont
Vector2f draggingStart = new Vector2f(0,0)
Vector2f drawOffset = new Vector2f(0,0)
long lastClickTime = 0

Static Private Attributes

static final Cursor handCursor = new Cursor(Cursor.HAND_CURSOR)
static final Cursor moveCursor = new Cursor(Cursor.MOVE_CURSOR)
static final Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR)
static final long serialVersionUID = 7695328948788620463L

Detailed Description

Visualization applet for action plans/sequences.

Author:
Stefan Profanter
See also:
edu.tum.cs.ias.knowrob.vis.actions.Action

Definition at line 31 of file PlanVisApplet.java.


Constructor & Destructor Documentation

Constructor

Definition at line 85 of file PlanVisApplet.java.


Member Function Documentation

static void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.arrow ( PApplet  applet,
float  x,
float  y,
float  width,
float  height 
) [inline, static]

Draw an arrow pointing right at given position.

Parameters:
appletApplet to draw on
xx position of the arrow bounding box.
yy position of the arrow bounding box
widthwidth of the arrow
heightheight of the arrow

Definition at line 324 of file PlanVisApplet.java.

static void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.arrowFromTo ( PApplet  applet,
Vector2f  from,
Vector2f  to,
float  lineWidth,
float  blockLength 
) [inline, static]

Draw an arrow between the given two points with current stroke and fill settings.

Parameters:
appletApplet to draw on
fromStart position of arrow
toEnd position of arrow
lineWidthWidth of arrow line (not the stroke).

Definition at line 253 of file PlanVisApplet.java.

Clear all highlighted actions so that none is highlighted.

Definition at line 561 of file PlanVisApplet.java.

Definition at line 111 of file PlanVisApplet.java.

Draw the current selected action

Definition at line 390 of file PlanVisApplet.java.

Draw the current history in the upper area of the window

Definition at line 377 of file PlanVisApplet.java.

int edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.getHistoryHover ( float  x,
float  y 
) [inline, private]

Get index of history object under current mouse position. If mouse isn't on history, -1 will be returned.

Parameters:
xmouse x position
ymouse y position
Returns:
index of history object in clickHistory array or -1 if none

Definition at line 512 of file PlanVisApplet.java.

boolean edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.highlightAction ( Action  a,
boolean  expand 
) [inline]

Highlight the action referenced by a

Parameters:
aaction to highlight
expandExpand all the parents of a so that a is visible
Returns:
true if action found and highlighted

Definition at line 536 of file PlanVisApplet.java.

boolean edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.highlightAction ( String  identifier,
boolean  expand 
) [inline]

Highlight the action referenced by identifier

Parameters:
identifieraction identified by identifier to highlight
expandExpand all the parents of identifier so that identifier is visible
Returns:
true if action found and highlighted

Definition at line 550 of file PlanVisApplet.java.

Load a plan by starting with the given identifier and load all it's referenced actions recursively.

Parameters:
identifierSomething like 'http://www.roboearth.org/kb/serve_drink.owl#ServeADrink'

Definition at line 225 of file PlanVisApplet.java.

Load a plan with the given prolog identifier and all it's subactions.

Parameters:
iriSomething like 'http://www.roboearth.org/kb/serve_drink.owl#ServeADrink'
Returns:
The main action initialized by the identifier

Definition at line 130 of file PlanVisApplet.java.

Definition at line 460 of file PlanVisApplet.java.

Definition at line 418 of file PlanVisApplet.java.

Definition at line 452 of file PlanVisApplet.java.

Definition at line 456 of file PlanVisApplet.java.

Definition at line 399 of file PlanVisApplet.java.

Definition at line 436 of file PlanVisApplet.java.

Definition at line 447 of file PlanVisApplet.java.

Definition at line 569 of file PlanVisApplet.java.

Sets the action which should be selected at the beginning. If none set, nothing will be drawn.

Parameters:
actionaction to set as start action

Definition at line 238 of file PlanVisApplet.java.

Definition at line 91 of file PlanVisApplet.java.

Update position for each ActionSelectHistoryInfo object in the clickHistory array. Needed for example if a new history object is added/deleted.

Definition at line 346 of file PlanVisApplet.java.


Member Data Documentation

history of selected actions. It's used like a breadcrumbs menu. If you select an action it will be added to this arrray. If you go back to a certain action in the history all remaining actions after the selected will be removed from history.

Definition at line 71 of file PlanVisApplet.java.

Current selected action

Definition at line 43 of file PlanVisApplet.java.

Font for drawing text

Definition at line 38 of file PlanVisApplet.java.

Used in MouseDragging for calculating the dragging distance

Definition at line 80 of file PlanVisApplet.java.

Vector2f edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.drawOffset = new Vector2f(0,0) [private]

Draw offset. Used when image moved/dragged.

Definition at line 76 of file PlanVisApplet.java.

final Cursor edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.handCursor = new Cursor(Cursor.HAND_CURSOR) [static, private]

Hand cursor

Definition at line 53 of file PlanVisApplet.java.

mouseClicked has a bug so that for each click it is called two times. Prevent it by time measure

Definition at line 64 of file PlanVisApplet.java.

final Cursor edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.moveCursor = new Cursor(Cursor.MOVE_CURSOR) [static, private]

Move cursor

Definition at line 58 of file PlanVisApplet.java.

final Cursor edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.normalCursor = new Cursor(Cursor.DEFAULT_CURSOR) [static, private]

Normal cursor (arrow)

Definition at line 48 of file PlanVisApplet.java.

final long edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.serialVersionUID = 7695328948788620463L [static, private]

Definition at line 33 of file PlanVisApplet.java.


The documentation for this class was generated from the following file:


mod_vis
Author(s): Moritz Tenorth, Jakob Engel
autogenerated on Sat Dec 28 2013 17:09:50