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 |
Visualization applet for action plans/sequences.
Definition at line 31 of file PlanVisApplet.java.
Constructor
Definition at line 85 of file PlanVisApplet.java.
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.
applet | Applet to draw on |
x | x position of the arrow bounding box. |
y | y position of the arrow bounding box |
width | width of the arrow |
height | height 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.
applet | Applet to draw on |
from | Start position of arrow |
to | End position of arrow |
lineWidth | Width of arrow line (not the stroke). |
Definition at line 253 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.clearHighlight | ( | ) | [inline] |
Clear all highlighted actions so that none is highlighted.
Definition at line 561 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.draw | ( | ) | [inline] |
Definition at line 111 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.drawCurrAction | ( | ) | [inline, private] |
Draw the current selected action
Definition at line 390 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.drawHistory | ( | ) | [inline, private] |
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.
x | mouse x position |
y | mouse y position |
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
a | action to highlight |
expand | Expand all the parents of a so that a is visible |
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
identifier | action identified by identifier to highlight |
expand | Expand all the parents of identifier so that identifier is visible |
Definition at line 550 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.loadPrologPlan | ( | String | identifier | ) | [inline] |
Load a plan by starting with the given identifier and load all it's referenced actions recursively.
identifier | Something like 'http://www.roboearth.org/kb/serve_drink.owl#ServeADrink' |
Definition at line 225 of file PlanVisApplet.java.
Action edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.loadPrologPlanRecursive | ( | String | iri | ) | [inline, private] |
Load a plan with the given prolog identifier and all it's subactions.
iri | Something like 'http://www.roboearth.org/kb/serve_drink.owl#ServeADrink' |
Definition at line 130 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseClicked | ( | MouseEvent | e | ) | [inline] |
Definition at line 460 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseDragged | ( | MouseEvent | e | ) | [inline] |
Definition at line 418 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseEntered | ( | MouseEvent | e | ) | [inline] |
Definition at line 452 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseExited | ( | MouseEvent | e | ) | [inline] |
Definition at line 456 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseMoved | ( | MouseEvent | e | ) | [inline] |
Definition at line 399 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mousePressed | ( | MouseEvent | e | ) | [inline] |
Definition at line 436 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseReleased | ( | MouseEvent | e | ) | [inline] |
Definition at line 447 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.mouseWheelMoved | ( | MouseWheelEvent | e | ) | [inline] |
Definition at line 569 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.setMainAction | ( | Action | action | ) | [inline] |
Sets the action which should be selected at the beginning. If none set, nothing will be drawn.
action | action to set as start action |
Definition at line 238 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.setup | ( | ) | [inline] |
Definition at line 91 of file PlanVisApplet.java.
void edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.updateHistoryPosition | ( | ) | [inline, private] |
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.
ArrayList<ActionSelectHistoryInfo> edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.clickHistory = new ArrayList<ActionSelectHistoryInfo>() [private] |
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.
PFont edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.dejavuFont [private] |
Font for drawing text
Definition at line 38 of file PlanVisApplet.java.
Vector2f edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.draggingStart = new Vector2f(0,0) [private] |
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.
long edu.tum.cs.ias.knowrob.vis.applets.PlanVisApplet.lastClickTime = 0 [private] |
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.