|
|||||||||
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.new_lib.historical_whiteboard
Whiteboard demo app to work with a lens over time...
Field Summary | |
protected whiteboard_obj |
_create_proto
The whiteboard_obj that we currently are cloning new objects from |
protected int |
_current_mode
Current mode of the whiteboard. |
protected whiteboard_obj |
_current_obj
The object currently being manipulated |
protected int |
_current_person
The current person id |
protected static long |
_now
Counter for implementing virtual time |
protected java.util.Vector |
_objects
Vector of whiteboard_obj objects currently in the whiteboard. |
static int |
MODE_CREATE
Flag for create mode |
static int |
MODE_DEL
Flag for delete mode |
static int |
MODE_PICK
Flag for pick/move mode |
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 | |
historical_whiteboard(int x,
int y,
int w,
int h)
Full constructor. |
Method Summary | |
void |
add_object(whiteboard_obj obj)
|
static void |
advance_time()
Advance virtual time |
whiteboard_obj |
create_proto()
The whiteboard_obj that we currently are cloning new objects from |
int |
current_mode()
Current mode of the whiteboard. |
int |
current_person()
The current person id |
boolean |
drag_end(event evt,
int x,
int y,
int start_x,
int start_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
Dispatch input corresponding to the end of a drag. |
boolean |
drag_end(event evt,
java.lang.Object user_info)
Dispatch event corresponding to the end of a simple drag. |
boolean |
drag_feedback(event evt,
int x,
int y,
int start_x,
int start_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
Dispatch a movement during a drag. |
boolean |
drag_feedback(event evt,
java.lang.Object user_info)
Dispatch a movement event during a simple drag. |
boolean |
drag_start(event evt,
int x,
int y,
int grab_x,
int grab_y,
java.lang.Object user_info)
Dispatch the start of a drag to the object. |
boolean |
drag_start(event evt,
java.lang.Object user_info)
Dispatch the start event of a simple drag. |
void |
draw_self_local_at(drawable d,
long at_time,
long selection,
boolean select_owner,
java.awt.Color[] map)
Draw the object's current appearance as it was at the given time (but don't draw child objects). |
protected void |
draw_self_local(drawable d)
Draw the object's current appearance. |
static long |
now()
Get the current virtual time |
protected whiteboard_obj |
pick_an_obj(event evt)
Do a pick over our internal objects |
boolean |
press(event evt,
java.lang.Object user_info)
Handle press input. |
boolean |
release(event evt,
java.lang.Object user_info)
Companion to press() -- here this is ignored. |
void |
set_create_proto(whiteboard_obj proto)
Set the whiteboard_obj that we currently are cloning new objects from |
void |
set_current_mode(int new_md)
Set the current mode of the whiteboard. |
void |
set_current_person(int id)
Set the current person id |
void |
set_mode(int mode_kind,
whiteboard_obj obj_to_create,
int cur_person)
Set the current mode of the whiteboard |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected static long _now
protected java.util.Vector _objects
public static final int MODE_PICK
public static final int MODE_DEL
public static final int MODE_CREATE
protected int _current_mode
protected whiteboard_obj _create_proto
protected int _current_person
protected whiteboard_obj _current_obj
Constructor Detail |
public historical_whiteboard(int x, int y, int w, int h)
int
- x x position of the container.int
- y y position of the container.int
- w width of the container.int
- h height of the container.Method Detail |
public static long now()
public static void advance_time()
public void add_object(whiteboard_obj obj)
public int current_mode()
public void set_current_mode(int new_md)
int
- new_md the new mode we enter. This should be one of the
values: MODE_PICK, MODE_DEL, or MODE_CREATE.public whiteboard_obj create_proto()
public void set_create_proto(whiteboard_obj proto)
whiteboard_obj
- proto the new cloning prototypepublic int current_person()
public void set_current_person(int id)
public void set_mode(int mode_kind, whiteboard_obj obj_to_create, int cur_person)
int
- mode_kind the mode we enter. This must be one
of the values: MODE_PICK, MODE_DEL,
or MODE_CREATE.whiteboard_obj
- obj_to_create for MODE_CREATE, this parameter gives
a prototype object to clone new objects
from (in other cases it is ignored).int
- cur_person id of the current personprotected void draw_self_local(drawable d)
drawable
- d the surface we draw on.public void draw_self_local_at(drawable d, long at_time, long selection, boolean select_owner, java.awt.Color[] map)
drawable
- d the surface we draw on.long
- at_time the time (in ms since the epoch) to draw at)long
- selection selection set stored as bit setboolean
- select_owner select on owner (true) or modifier (false)Color[]
- map mapping from person id's to colorsprotected whiteboard_obj pick_an_obj(event evt)
public boolean press(event evt, java.lang.Object user_info)
event
- evt the event for the press.Object
- user_info the user information that was associated with
the pick used to dispatch this input to this
object.public boolean release(event evt, java.lang.Object user_info)
event
- evt the event for the release.Object
- user_info the user information that was associated with
the pick used to dispatch this input to this
object.public boolean drag_start(event evt, java.lang.Object user_info)
event
- evt the event "causing" the start of the drag
(normally a mouse button press).Object
- user_info the uninterpreted user info that was associated
with this object when it became the drag focus.public boolean drag_feedback(event evt, java.lang.Object user_info)
event
- evt the event "causing" the the drag (normally a
mouse move).Object
- user_info the uninterpreted user info that was associated
with this object when it became the drag focus.public boolean drag_end(event evt, java.lang.Object user_info)
event
- evt the event "causing" the end of the drag (normally
a mouse button release).Object
- user_info the uninterpreted user info that was associated
with this object when it became the drag focus.public boolean drag_start(event evt, int x, int y, int grab_x, int grab_y, java.lang.Object user_info)
event
- evt The event which "caused" the drag.int
- x x position where object should be placed at start
of drag (in parent's coordinates).int
- y y position where object should be placed at start
of drag (in parent's coordinates).int
- grab_x x position where drag started (in local coords).int
- grab_y y position where drag started (in local coords).Object
- user_info uninterpreted information provided when the object
was made the move-drag focus.public boolean drag_feedback(event evt, int x, int y, int start_x, int start_y, int grab_x, int grab_y, java.lang.Object user_info)
event
- evt The event which "caused" the drag.int
- x x position where object should be placed at start
of drag (in parent's coordinates).int
- y y position where object should be placed at start
of drag (in parent's coordinates).int
- start_x x position where drag started (in parent's coords).int
- start_y y position where drag started (in parent's coords).int
- grab_x x position where drag started (in local coords).int
- grab_y y position where drag started (in local coords).Object
- user_info uninterpreted information provided when the object
was made the move-drag focus.public boolean drag_end(event evt, int x, int y, int start_x, int start_y, int grab_x, int grab_y, java.lang.Object user_info)
event
- evt The event which "caused" the drag.int
- x x position where object should be placed at start
of drag (in parent's coordinates).int
- y y position where object should be placed at start
of drag (in parent's coordinates).int
- start_x x position where drag started (in parent's coords).int
- start_y y position where drag started (in parent's coords).int
- grab_x x position where drag started (in local coords).int
- grab_y y position where drag started (in local coords).Object
- user_info uninterpreted information provided when the object
was made the move-drag focus.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |