|
|||||||||
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.point_snap_target
This Class implements a point snap target. The target point is defined to lie in the center of the object. It does no drawing nor does it limit the class of drag objects that snap to it, or do anything when the snap occurs (all these additional behaviors would normally be added in a subclass). See the documentation in the snap-drag agent for full details of how snapping works.
snap_drag_agent
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 | |
point_snap_target(int x,
int y)
Constructor. |
Method Summary | |
boolean |
anti_snap_feedback(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object anti_snap_info,
java.lang.Object user_info)
|
java.lang.Object |
anti_snap_from_ok(java.awt.Point pt,
snap_draggable drag_obj,
int feature_pt_indx)
Determine if a geometrically accepted snap which has been semantically rejected (by snap_from_obj()) should provide anti-snap feedback. |
boolean |
anti_snap_from(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object anti_snap_info,
java.lang.Object user_info)
Do anti-snap feedback corresponding to an anti-snap from the given drag object. |
boolean |
point_snaps(java.awt.Point pt,
int_holder return_dist2,
java.awt.Point return_snap_pt)
Determine if the given point (in local coordinates) is close enough to snap to the point (and return the square of its distance, and the point snapped to). |
boolean |
snap_feedback(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object user_info)
Do feedback while a snap is active. |
boolean |
snap_from_ok(java.awt.Point pt,
snap_draggable drag_obj,
int feature_pt_indx)
Determine if a geometrically accepted snap should be semantically accepted. |
boolean |
snap_from(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object user_info)
Do the feedback corresponding to a snap from the given drag object. |
boolean |
unanti_snap_from(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object anti_snap_info,
java.lang.Object user_info)
Remove anti-snap feedback for an anti-snap that is now being broken. |
boolean |
unsnap_from(event evt,
java.awt.Point orig_pt,
java.awt.Point snap_pt,
snap_draggable drag_obj,
int feature_pt_indx,
java.lang.Object user_info)
Remove feedback for a snap that is now being broken. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public point_snap_target(int x, int y)
int
- x the x coordinate of the snap target point.int
- y the y coordinate of the snap target point.Method Detail |
public boolean point_snaps(java.awt.Point pt, int_holder return_dist2, java.awt.Point return_snap_pt)
pt
- the point being tested (in local coordinates).return_dist2
- modified to contain the square of the distance
to the point.return_snap_pt
- modified to contain the snap target point location
in local coordinates (i.e., 0,0).public boolean snap_from_ok(java.awt.Point pt, snap_draggable drag_obj, int feature_pt_indx)
pt
- the pre-snap location of the feature point being
tested.drag_obj
- the drag object being tested.feature_pt_indx
- the index of the feature point (within drag_obj)
being tested.public java.lang.Object anti_snap_from_ok(java.awt.Point pt, snap_draggable drag_obj, int feature_pt_indx)
pt
- the pre-snap location of the feature point being
tested.drag_obj
- the drag object being tested.feature_pt_indx
- the index of the feature point (within drag_obj)
being tested.public boolean snap_from(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object user_info)
event
- evt the event that "caused the snap".Point
- orig_pt the point the dragged object would nominally
be at.Point
- snap_pt the point the dragged object snaps to.snap_draggable
- drag_obj the dragged object.int
- feature_pt_indx the feature point within dragged
object that we are snapping with.Object
- user_info the information that was associated
with the dragged object when it
requested snap-drag focus.public boolean snap_feedback(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object user_info)
event
- evt the event that "caused the snap".Point
- orig_pt the point the dragged object would nominally
be at.Point
- snap_pt the point the dragged object snaps to.snap_draggable
- drag_obj the dragged object.int
- feature_pt_indx the feature point within dragged
object that we are snapping with.Object
- user_info the information that was associated
with the dragged object when it
requested snap-drag focus.public boolean unsnap_from(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object user_info)
event
- evt the event that "caused the snap".Point
- orig_pt the point the dragged object would nominally
be at.Point
- snap_pt the point the dragged object snaps to.snap_draggable
- drag_obj the dragged object.int
- feature_pt_indx the feature point within dragged
object that we are snapping with.Object
- user_info the information that was associated
with the dragged object when it
requested snap-drag focus.public boolean anti_snap_from(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object anti_snap_info, java.lang.Object user_info)
event
- evt the event that "caused the anti-snap".Point
- orig_pt the point the dragged object would nominally
be at.Point
- snap_pt the point the dragged object anti-snaps to.snap_draggable
- drag_obj the dragged object.int
- feature_pt_indx the feature point within dragged
object that we are anti-snapping
with.Object
- user_info the information that was associated
with the dragged object when it
requested snap-drag focus.public boolean anti_snap_feedback(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object anti_snap_info, java.lang.Object user_info)
public boolean unanti_snap_from(event evt, java.awt.Point orig_pt, java.awt.Point snap_pt, snap_draggable drag_obj, int feature_pt_indx, java.lang.Object anti_snap_info, java.lang.Object user_info)
event
- evt the event that "caused the anti-snap".Point
- orig_pt the point the dragged object would nominally
be at.Point
- snap_pt the point the dragged object anti-snaps to.snap_draggable
- drag_obj the dragged object.int
- feature_pt_indx the feature point within dragged
object that we are anti-snapping
with.Object
- user_info the information that was associated
with the dragged object when it
requested snap-drag focus.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |