|
|||||||||
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.test.shade
This is the class for building a "window shade" composition object. This object composes two children, one that forms the background (inside the window pane) and one that is on a movable shade that can be pulled up and down by th user. This interaction can replace typical pop-up modal dialogs with an interaction that is richer in metaphor and more familiar to most users.
Field Summary | |
protected double |
_percent_down
This holds how far "down" the shade is as a percentage. |
protected boolean |
anim_in_progress
This is true if an animation is in progress |
protected long |
anim_length
This is how long the animation takes, in millseconds |
protected int |
handle_size
Size of the handle in pixels (both width and height) |
protected int |
pane_borders
pane borders in pixels (around the outside of the window) |
protected int |
string_length
String length in pixels |
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 | |
shade()
Simple constructor assuming that position and size will be set with constraints |
Method Summary | |
void |
configure()
Whenever we get a call to configure, be sure to enforce the shade on the second child. |
void |
draw_self_local(drawable d)
Draw the child and the window dressing |
void |
end_transition(transition trans,
trajectory traj,
double start_t,
java.lang.Object start_obj,
double end_t,
java.lang.Object end_obj,
event e,
java.lang.Object user_info)
Again, we just look at the end_obj (which is a Float) and set the shade to be the right position |
double |
percent_down()
Access to how far "down" the shade is as a percentage. |
void |
pick(int pt_x,
int pt_y,
pick_collector pick_list)
Handle the picking sequence. |
boolean |
press(event evt,
java.lang.Object user_info)
Handle a call on the pressable interface |
boolean |
release(event evt,
java.lang.Object user_info)
|
void |
set_percent_down(double v)
Set how far "down" the shade is as a percentage. |
void |
start_transition(transition trans,
trajectory traj,
double start_t,
java.lang.Object start_obj,
event e,
java.lang.Object user_info)
start the animation |
void |
transition_step(transition trans,
trajectory traj,
double start_t,
java.lang.Object start_obj,
double end_t,
java.lang.Object end_obj,
event e,
java.lang.Object user_info)
we just look at the end_obj (which is a Float) and send that to the set_shade code |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected final int string_length
protected final int handle_size
protected final int pane_borders
protected final long anim_length
protected boolean anim_in_progress
protected double _percent_down
Constructor Detail |
public shade()
Method Detail |
public double percent_down()
public void set_percent_down(double v)
public void draw_self_local(drawable d)
public void configure()
public void pick(int pt_x, int pt_y, pick_collector pick_list)
public boolean release(event evt, java.lang.Object user_info)
public boolean press(event evt, java.lang.Object user_info)
public void start_transition(transition trans, trajectory traj, double start_t, java.lang.Object start_obj, event e, java.lang.Object user_info)
public void transition_step(transition trans, trajectory traj, double start_t, java.lang.Object start_obj, double end_t, java.lang.Object end_obj, event e, java.lang.Object user_info)
public void end_transition(transition trans, trajectory traj, double start_t, java.lang.Object start_obj, double end_t, java.lang.Object end_obj, event e, java.lang.Object user_info)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |