|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.lib.min_interactor | +--sub_arctic.lib.base_interactor | +--sub_arctic.lib.base_parent_interactor | +--sub_arctic.lib.top_level | +--sub_arctic.lib.debug_lens_top_level
This class is a special subclass of top_level that provides support for a semantic_lens object providing debugging information about the interactors installed under it. To support a semantic lens it does extra damage declarations similar to those done by semantic_lens_parent.
The lens is initially disabled (debugging turned off) and can be brought up (and removed) by a mouse click with certain modifier keys held down (this defaults to control-shift, but can be reset). When debugging_mode is turned on this object works by forcing its last child to be a semantic lens (the configure() for this object moves the lens to be last if it is not already last). The semantic lens does a debug output traversal that displays information about each interactor that it is over.
This top_level is typically used with a fake_top_level child to keep subtrees from being disturbed by the addition of the lens as the last child (this can wreck layout constraints). This is done in debug_interactor_applet, for example.
semantic_lens_parent
,
sub_arctic.lib.semantic
,
debug_interactor_applet
Field Summary | |
protected semantic_lens |
_debug_lens
The debugging lens object. |
protected boolean |
_debugging
Are we currently showing the debug lens? |
protected int |
_signal_modifiers
The set of modifier keys that must be down for a mouse button press to toggle debugging mode on/off. |
Fields inherited from class sub_arctic.lib.top_level |
_awt_parent,
_damage_area,
_offscreen_graphics,
_offscreen_image,
_offscreen_size |
Fields inherited from class sub_arctic.lib.base_interactor |
_child_index,
_child_list,
_clip_bounds,
_constraint_flags,
_enabled_constraint,
_flags,
_h,
_h_constraint,
_parent,
_part_a_constraint,
_part_b_constraint,
_user_data,
_visible_constraint,
_w,
_w_constraint,
_x,
_x_constraint,
_y,
_y_constraint,
default_child_hint |
Constructor Summary | |
debug_lens_top_level()
Construct a debug_lens_top_level and give it default values for x,y, width and height. |
|
debug_lens_top_level(int x_v,
int y_v,
int w_v,
int h_v)
Construct a debug_lens_top_level object with know x,y, width and height. |
Method Summary | |
void |
configure()
Override configure to force our lens child to be last (when enabled) |
void |
damage_from_child(interactor originator,
java.lang.Object user_info,
java.awt.Point top_left,
java.awt.Dimension sz)
Catch damage from children and expand it to include damage from our lens if it overlaps any of that damage. |
boolean |
debugging()
Are we currently showing the debug lens? |
void |
handle(dispatch_result dr)
Event dispatch handler. |
boolean |
lens_is_parent(interactor i)
This function returns true if the interactor supplied is either our debugging lens or a child (at any level) of our lens. |
void |
set_debugging(boolean setting)
Programmatically turn debugging lens on or off |
void |
set_signal_modifiers(int msk)
Change the set of modifier keys that must be down for a mouse button press to toggle debugging mode on/off. |
protected void |
setup_lens()
Initialize the debug lens |
int |
signal_modifiers()
The set of modifier keys that must be down for a mouse button press to toggle debugging mode on/off. |
boolean |
track_click(event evt,
java.lang.Object user_info)
Listen for mouse button press input somewhere in the interface. |
Methods inherited from class sub_arctic.lib.top_level |
awt_parent,
damage_fixed,
damage_self,
draw_self,
set_awt_parent,
setup_offscreen |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean _debugging
protected semantic_lens _debug_lens
protected int _signal_modifiers
Constructor Detail |
public debug_lens_top_level(int x_v, int y_v, int w_v, int h_v)
int
- x_v the x coordinate of this interactor (should be zero
unless you want this interactor to not cover all of its
hosting AWT parent).int
- y_v the y coordinate of this interactor (should be zero
unless you want this interactor to not cover all of its
hosting AWT parent).int
- w_v the width of this top_level (this is also tied to the
size of the AWT component).int
- h_v the height of this top_level (this is also tied to the
size of the AWT component).public debug_lens_top_level()
Method Detail |
public void damage_from_child(interactor originator, java.lang.Object user_info, java.awt.Point top_left, java.awt.Dimension sz)
interactor
- originator the interactor that caused the damage.Object
- user_info uninterpreted information supplied by
the originator at damage time.Point
- top_left top-left corner of child's damage area
(in our coordinate system).Dimension
- sz size of the damage area.public boolean debugging()
public void set_debugging(boolean setting)
protected void setup_lens()
public void configure()
public int signal_modifiers()
public void set_signal_modifiers(int msk)
int
- msk the modifiers required to toggle the lens.public boolean track_click(event evt, java.lang.Object user_info)
event
- evt the click event we receive.Object
- user_info (ignored here).click_tracking
public void handle(dispatch_result dr)
public boolean lens_is_parent(interactor i)
interactor
- i the object being tested
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |