Class PALplate.interactors.snap_drag_handle
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PALplate.interactors.snap_drag_handle

java.lang.Object
   |
   +----sub_arctic.lib.min_interactor
           |
           +----sub_arctic.lib.base_interactor
                   |
                   +----sub_arctic.lib.base_parent_interactor
                           |
                           +----sub_arctic.lib.shrink_wrap_container
                                   |
                                   +----sub_arctic.lib.drag_container
                                           |
                                           +----PALplate.interactors.drag_handle
                                                   |
                                                   +----PALplate.interactors.snap_drag_handle

public class snap_drag_handle
extends drag_handle
implements snap_draggable
A container class for one object that provides a drag handle. Modified from snap_container

This doesn't inherit directly from snap_container because there is no need to publish anything about the feature points of it's children. Instead, it's children act and work just like normal, except for the little square in the corner where you can grab on to snap-drag this.


Constructor Index

 o snap_drag_handle(int, int, boolean, callback_object, loaded_image)
full constructor.
 o snap_drag_handle(int, int, boolean, loaded_image)
Nearly full constructor.

Method Index

 o anti_snap_feedback(event, Point, Point, int, snap_targetable, Object, Object)
Perform feedback while an anti-snap is active.
 o anti_snap_to(event, Point, Point, int, snap_targetable, Object, Object)
Indicate that the object should anti-snap to a given target object.
 o press(event, Object)
Handle mouse button press input to the object.
 o snap_feedback(event, Point, Point, int, snap_targetable, Object)
Perform feedback while a snap is active.
 o snap_to(event, Point, Point, int, snap_targetable, Object)
Indicate that the object should snap to a given target object.
 o unanti_snap_to(event, Point, Point, int, snap_targetable, Object, Object)
Indicate that the object is no longer anti-snapped to a given target object.
 o unsnap_to(event, Point, Point, int, snap_targetable, Object)
Indicate that the object is no longer snapped to a given target object.

Constructors

 o snap_drag_handle
  public snap_drag_handle(int x,
                          int y,
                          boolean do_bb_feedback,
                          callback_object cbo,
                          loaded_image hnd_img)
full constructor.
Parameters:
int - x initial x position of the container.
int - y initial y position of the container.
boolean - do_bb_feedback whether we do bounding box feedback.
callback_object - cbo object to make callbacks to.
loaded_image - hnd_img an image for the grow handle.
 o snap_drag_handle
  public snap_drag_handle(int x,
                          int y,
                          boolean do_bb_feedback,
                          loaded_image hnd_img)
Nearly full constructor. This provides a null callback.
Parameters:
int - x initial x position of the container.
int - y initial y position of the container.
boolean - do_bb_feedback whether we do bounding box feedback.
loaded_image - hnd_img an image for the grow handle.

Methods

 o press
  public boolean press(event evt,
                       Object user_info)
Handle mouse button press input to the object. Here, we start dragging.
Parameters:
event - evt the press event.
Object - user_info information associated with this object at pick time.
Returns:
boolean indicating whether the input was consumed.
Overrides:
press in class drag_container
 o snap_feedback
  public boolean snap_feedback(event evt,
                               Point orig_pt,
                               Point snap_pt,
                               int feature_pt_indx,
                               snap_targetable target_obj,
                               Object user_info)
Perform feedback while a snap is active. Here we do nothing.
Parameters:
event - evt the event "causing" the snap.
Point - orig_pt where this object would be without the snap.
Point - snap_pt where this object is with the snap.
int - feature_pt_indx the feature point of this object that we are snapping with.
snap_targetable - target_obj the target object we are snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.
 o anti_snap_to
  public boolean anti_snap_to(event evt,
                              Point orig_pt,
                              Point snap_pt,
                              int feature_pt_indx,
                              snap_targetable target_obj,
                              Object anti_snap_info,
                              Object user_info)
Indicate that the object should anti-snap to a given target object. Here we just move the object to the anti-snap position.
Parameters:
event - evt the event "causing" the anti-snap.
Point - orig_pt where this object would be without the anti-snap.
Point - snap_pt where this object is with the anti-snap.
int - feature_pt_indx the feature point of this object that we are anti-snapping with.
snap_targetable - target_obj the target object we are anti-snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.
 o anti_snap_feedback
  public boolean anti_snap_feedback(event evt,
                                    Point orig_pt,
                                    Point snap_pt,
                                    int feature_pt_indx,
                                    snap_targetable target_obj,
                                    Object anti_snap_info,
                                    Object user_info)
Perform feedback while an anti-snap is active. Here we do nothing.
Parameters:
event - evt the event "causing" the anti-snap.
Point - orig_pt where this object would be without the anti-snap.
Point - snap_pt where this object is with the anti-snap.
int - feature_pt_indx the feature point of this object that we are anti-snapping with.
snap_targetable - target_obj the target object we are anti-snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.
 o snap_to
  public boolean snap_to(event evt,
                         Point orig_pt,
                         Point snap_pt,
                         int feature_pt_indx,
                         snap_targetable target_obj,
                         Object user_info)
Indicate that the object should snap to a given target object. Here we move the object to the snap point.
Parameters:
event - evt the event "causing" the snap.
Point - orig_pt where this object would be without the snap.
Point - snap_pt where this object is with the snap.
int - feature_pt_indx the feature point of this object that we are snapping with.
snap_targetable - target_obj the target object we are snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.
 o unanti_snap_to
  public boolean unanti_snap_to(event evt,
                                Point orig_pt,
                                Point snap_pt,
                                int feature_pt_indx,
                                snap_targetable target_obj,
                                Object anti_snap_info,
                                Object user_info)
Indicate that the object is no longer anti-snapped to a given target object. Here we just move back to our nominal position.
Parameters:
event - evt the event "causing" the unanti-snap.
Point - orig_pt where this object should be without the anti-snap.
Point - snap_pt where this object was with the anti-snap.
int - feature_pt_indx the feature point of this object that we were anti-snapping with.
snap_targetable - target_obj the target object we were anti-snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.
 o unsnap_to
  public boolean unsnap_to(event evt,
                           Point orig_pt,
                           Point snap_pt,
                           int feature_pt_indx,
                           snap_targetable target_obj,
                           Object user_info)
Indicate that the object is no longer snapped to a given target object. Here we return the object to its nominal position.
Parameters:
event - evt the event "causing" the unsnap.
Point - orig_pt where this object should be without the snap.
Point - snap_pt where this object was with the snap.
int - feature_pt_indx the feature point of this object that we were snapping with.
snap_targetable - target_obj the target object we were snapping to.
Object - user_info the user info for this input.
Returns:
boolean indicating if the input has been consumed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index