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

List of all members.

Classes

class  ActionEditorWindow

Public Member Functions

void addAction (Action a)
void clearHighlight ()
void controlEvent (ControlEvent ev)
void draw ()
void drawActionsTreeLayout ()
synchronized void drawTransitions (PApplet app)
Frame findFrame ()
Action getCurrTask ()
boolean highlightAction (Action a, boolean expand)
boolean highlightAction (String identifier, boolean expand)
void keyPressed (KeyEvent e)
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 setTask (Action action)
void setup ()
void syncWithProlog ()

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)
static Vector< Vector2f > getArrowVertices (PApplet applet, Vector2f from, Vector2f to, float lineWidth, float blockLength)

Public Attributes

ControlP5 controlP5

Private Member Functions

void drawActions ()
void drawHistory ()
int getHistoryHover (float x, float y)
void initControlP5 ()
void updateHistoryPosition ()

Private Attributes

ActionTransition activeTransition
Textfield base_iri = null
ArrayList
< ActionSelectHistoryInfo
clickHistory = new ArrayList<ActionSelectHistoryInfo>()
Action currTask = null
PFont dejavuFont
Action draggedAction
Vector2f draggingStart = new Vector2f(0,0)
Textfield end_action
Vector2f globalPosOffset = new Vector2f(0,0)
long lastClickTime = 0
Textfield new_recipe_label = null
Textfield new_recipe_shortname = null
Action newTransitionFromAction
Vector2f newTransitionToLocation = new Vector2f()
boolean select_end = false
boolean select_start = false
Action selectedAction
Textfield start_action

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 as sequences or state machines.

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

Definition at line 43 of file PlanVisAppletFsm.java.


Member Function Documentation

static void edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.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 309 of file PlanVisAppletFsm.java.

static void edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.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 231 of file PlanVisAppletFsm.java.

Clear all highlighted actions so that none is highlighted.

Definition at line 1016 of file PlanVisAppletFsm.java.

Handle control events from controlP5

Parameters:
evThe ControlEvent generated by controlP5

Definition at line 907 of file PlanVisAppletFsm.java.

Definition at line 153 of file PlanVisAppletFsm.java.

Definition at line 433 of file PlanVisAppletFsm.java.

Draw the current selected action

Definition at line 375 of file PlanVisAppletFsm.java.

Draw the current history in the upper area of the window

Definition at line 362 of file PlanVisAppletFsm.java.

synchronized void edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.drawTransitions ( PApplet  app) [inline]

Definition at line 451 of file PlanVisAppletFsm.java.

Definition at line 1035 of file PlanVisAppletFsm.java.

static Vector<Vector2f> edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.getArrowVertices ( PApplet  applet,
Vector2f  from,
Vector2f  to,
float  lineWidth,
float  blockLength 
) [inline, static]

Definition at line 245 of file PlanVisAppletFsm.java.

Definition at line 1043 of file PlanVisAppletFsm.java.

int edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.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 955 of file PlanVisAppletFsm.java.

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 979 of file PlanVisAppletFsm.java.

boolean edu.tum.cs.ias.knowrob.vis.applets.PlanVisAppletFsm.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 993 of file PlanVisAppletFsm.java.

Definition at line 465 of file PlanVisAppletFsm.java.

Definition at line 862 of file PlanVisAppletFsm.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 185 of file PlanVisAppletFsm.java.

Definition at line 625 of file PlanVisAppletFsm.java.

Definition at line 544 of file PlanVisAppletFsm.java.

Definition at line 848 of file PlanVisAppletFsm.java.

Definition at line 855 of file PlanVisAppletFsm.java.

Definition at line 511 of file PlanVisAppletFsm.java.

Definition at line 575 of file PlanVisAppletFsm.java.

Definition at line 611 of file PlanVisAppletFsm.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 214 of file PlanVisAppletFsm.java.

Definition at line 131 of file PlanVisAppletFsm.java.

Synchronize all changes that have been made with the underlying Prolog engine

Definition at line 941 of file PlanVisAppletFsm.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 331 of file PlanVisAppletFsm.java.


Member Data Documentation

Definition at line 115 of file PlanVisAppletFsm.java.

Definition at line 120 of file PlanVisAppletFsm.java.

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 104 of file PlanVisAppletFsm.java.

Definition at line 118 of file PlanVisAppletFsm.java.

Currently loaded task structure

Definition at line 60 of file PlanVisAppletFsm.java.

Font for drawing text

Definition at line 50 of file PlanVisAppletFsm.java.

Currently dragged action

Definition at line 66 of file PlanVisAppletFsm.java.

Used in MouseDragging for calculating the dragging distance

Definition at line 113 of file PlanVisAppletFsm.java.

Definition at line 124 of file PlanVisAppletFsm.java.

Draw offset. Used when image moved/dragged.

Definition at line 109 of file PlanVisAppletFsm.java.

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

Hand cursor

Definition at line 86 of file PlanVisAppletFsm.java.

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

Definition at line 97 of file PlanVisAppletFsm.java.

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

Move cursor

Definition at line 91 of file PlanVisAppletFsm.java.

Definition at line 122 of file PlanVisAppletFsm.java.

Definition at line 121 of file PlanVisAppletFsm.java.

Buffer storing the action from which a new transition is being created (user clicked on its outbound connector)

Definition at line 72 of file PlanVisAppletFsm.java.

Definition at line 74 of file PlanVisAppletFsm.java.

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

Normal cursor (arrow)

Definition at line 81 of file PlanVisAppletFsm.java.

Definition at line 127 of file PlanVisAppletFsm.java.

Definition at line 126 of file PlanVisAppletFsm.java.

Currently selected action

Definition at line 55 of file PlanVisAppletFsm.java.

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

Definition at line 45 of file PlanVisAppletFsm.java.

Definition at line 123 of file PlanVisAppletFsm.java.


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


mod_vis
Author(s): Moritz Tenorth, Jakob Engel
autogenerated on Mon Oct 6 2014 01:30:01