sub_arctic.lib
Class cgraph_sem_draw
java.lang.Object
|
+--sub_arctic.lib.nametag_sem_draw
|
+--sub_arctic.lib.cgraph_sem_draw
- public class cgraph_sem_draw
- extends nametag_sem_draw
- implements interactor_pred, interactor_consts
An interface_pred predicate class that performs a semantic redraw action
for a semantic lens. In this case the object draws debugging information
about the constraint dependency graph of each object (along with a class
name tag and bounding box). This predicate expects a sem_draw_context
object as its parameters argument. This predicate is executed for its
side effect only and always returns false.
- See Also:
base_interactor.traverse_and_collect(int, int, sub_arctic.lib.interactor_pred, sub_arctic.lib.interactor_pred, sub_arctic.lib.traversal_xform, java.lang.Object, sub_arctic.input.pick_collector)
Field Summary |
static int |
id
Unique id for this drawing traversal |
Constructor Summary |
cgraph_sem_draw()
Constructor using default font and tag color. |
cgraph_sem_draw(java.awt.Font fnt,
java.awt.Color c)
Full constructor. |
Method Summary |
protected void |
draw_constraint(drawable surf,
interactor obj,
int enc,
int orient,
int xpos,
int ypos)
Draw the dependency lines for a given encoded constraint (which is attached
to the given object and uses the given orientation). |
boolean |
test(interactor obj,
java.lang.Object parameters)
Perform the predicate test. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
id
public static final int id
- Unique id for this drawing traversal
cgraph_sem_draw
public cgraph_sem_draw(java.awt.Font fnt,
java.awt.Color c)
- Full constructor.
- Parameters:
Font
- fnt the font to draw tags in.Color
- c the color to draw tags and borders in.
cgraph_sem_draw
public cgraph_sem_draw()
- Constructor using default font and tag color.
test
public boolean test(interactor obj,
java.lang.Object parameters)
- Perform the predicate test.
- Specified by:
- test in interface interactor_pred
- Parameters:
obj
- the interactor the predicate is drawing.parameters
- a sem_draw_context object containing the a drawable
object and other bookkeeping needed for drawing.- Returns:
- false in all cases.
- Overrides:
- test in class nametag_sem_draw
draw_constraint
protected void draw_constraint(drawable surf,
interactor obj,
int enc,
int orient,
int xpos,
int ypos)
- Draw the dependency lines for a given encoded constraint (which is attached
to the given object and uses the given orientation). The lines start at
locations indicated by the dependencies of the encoded constraint, and
end at the given position.
- Parameters:
drawable
- surf where the drawing takes placeinteractor
- obj object the constraint is attached to (hence where * dependencies are relative to).int
- enc encoding of the constraint.int
- orient orientation of the constraint.int
- xpos x position of edge end pointsint
- ypos y position of edge end points