|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.new_lib.whiteboard_obj
This abstract class provides the API and base implementation for an object displayed on a historical_whiteboard object.
Field Summary | |
protected long |
_end_time
Time this object was destroyed (or Long.MAX_VALUE) if the object is still alive. |
protected int |
_h
height of bounding box |
protected int |
_mod_id
Numerical id of the last modifier of this object |
protected int |
_owner_id
Numerical id of the owner of this object |
protected long |
_start_time
Time this object was created |
protected java.util.Vector |
_state_history
Vector where we place state record objects in time order. |
protected int |
_w
width of bounding box |
protected int |
_x
x position |
protected int |
_y
y position |
Constructor Summary | |
whiteboard_obj(int xv,
int yv,
int wv,
int hv,
int own_id)
Full constructor. |
Method Summary | |
abstract 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. |
abstract boolean |
drag_end(event evt,
java.lang.Object user_info)
Dispatch event corresponding to the end of a simple drag. |
abstract 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. |
abstract boolean |
drag_feedback(event evt,
java.lang.Object user_info)
Dispatch a movement event during a simple drag. |
abstract 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. |
abstract boolean |
drag_start(event evt,
java.lang.Object user_info)
Dispatch the start event of a simple drag. |
void |
draw_self(drawable d)
Draw the object as it appears at present. |
abstract void |
draw_self(drawable d,
long at_time,
boolean select_by_owner,
java.awt.Color[] map)
Draw the object as it would appear at the given time. |
long |
end_time()
Time this object was destroyed (or Long.MAX_VALUE) if the object is still alive. |
int |
h()
height of bounding box |
abstract whiteboard_obj |
interactive_make(event evt,
historical_whiteboard wb)
Begin to make a new object like this one interactively. |
void |
make_state_record()
Make a record of the object state at the current time (for later playback) of this object as it appeared at various times |
int |
mod_id()
Numerical id of the last modifier of this object |
int |
owner_id()
Numerical id of the owner of this object |
abstract boolean |
pick(int xpt,
int ypt)
Indicate whether the given point should pick this object |
void |
set_end_time()
Set the time this object was destroyed to the current time. |
void |
set_h(int hv)
set the height of this object |
void |
set_mod_id(int id)
Set the numerical id of the last modifier of this object |
void |
set_owner_id(int id)
Set the numerical id of the owner of this object |
void |
set_w(int wv)
set the width of this object |
void |
set_x(int xv)
set the x position |
void |
set_y(int yv)
set the y position |
protected abstract wb_obj_state |
snapshot()
Build a record of the object's current state which is marked with the current time. |
long |
start_time()
Time this object was created |
protected wb_obj_state |
state_at(long timestamp)
Extract the state corresponding to the given time |
void |
update_current_state()
Replace the current state record with a new one. |
int |
w()
width of bounding box |
boolean |
was_alive(long at_time)
Indicate whether the given object would have been alive at the given time. |
int |
x()
x position |
int |
y()
y position |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int _x
protected int _y
protected int _w
protected int _h
protected int _owner_id
protected int _mod_id
protected long _start_time
protected long _end_time
protected java.util.Vector _state_history
Constructor Detail |
public whiteboard_obj(int xv, int yv, int wv, int hv, int own_id)
int
- xv x position of this objectint
- yv y position of this objectint
- wv w position of this objectint
- hv h position of this objectint
- own_id id of owner of this objectMethod Detail |
public int x()
public void set_x(int xv)
int
- xv the new x position of this object within the whiteboardpublic int y()
public void set_y(int yv)
int
- yv the new y position of this object within the whiteboardpublic int w()
public void set_w(int wv)
int
- wv the new width of this objectpublic int h()
public void set_h(int hv)
int
- wv the new height of this objectpublic int owner_id()
public void set_owner_id(int id)
public int mod_id()
public void set_mod_id(int id)
public long start_time()
public long end_time()
public void set_end_time()
public void make_state_record()
public void update_current_state()
protected wb_obj_state state_at(long timestamp)
protected abstract wb_obj_state snapshot()
public abstract boolean pick(int xpt, int ypt)
int
- xpt x coordinate of query pointint
- ypt y coordinate of query pointpublic boolean was_alive(long at_time)
long
- at_time the time in questionpublic abstract void draw_self(drawable d, long at_time, boolean select_by_owner, java.awt.Color[] map)
public void draw_self(drawable d)
public abstract whiteboard_obj interactive_make(event evt, historical_whiteboard wb)
public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 |