|
|||||||||
| 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.lib.halo_container
This class is an interactor which draws a halo around the position of one of its decendent interactors. It basically tracks the position of the interactor it is focused on and draws a halo display over the top of its children such that the halo matches the position of the focus object.
| Field Summary | |
protected java.awt.Color |
_halo_color
The color of the halo ring. |
protected int |
_halo_offset
The offset of the halo from the reference object. |
protected int |
_halo_width
The width of the halo ring. |
protected interactor |
_reference_obj
The reference object we draw the halo around. |
| 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 | |
halo_container(interactor ref)
Constructor defaulting to a halo_offset of 2, a width of 6, and a green halo. |
|
halo_container(interactor ref,
int halo_off,
int halo_w,
java.awt.Color halo_clr)
Constructor with 0,0 position and default width (assuming constraints will set the width). |
|
halo_container(int xv,
int yv,
int wv,
int hv,
interactor ref,
int halo_off,
int halo_w,
java.awt.Color halo_clr)
Full constructor. |
|
| Method Summary | |
void |
damage_from_child(interactor originator,
java.lang.Object user_info,
java.awt.Point top_left,
java.awt.Dimension sz)
Override damage propagation to catch damage from our reference object and expand it to include the halo. |
protected void |
draw_self_local(drawable d)
Draw the object's current appearance. |
java.awt.Color |
halo_color()
The color of the halo ring. |
void |
halo_color(java.awt.Color clr)
Set The color of the halo ring. |
int |
halo_offset()
The offset of the halo from the reference object. |
void |
halo_offset(int off)
Set the offset of the halo from the reference object. |
int |
halo_width()
The width of the halo ring. |
void |
halo_width(int w)
Set The width of the halo ring. |
interactor |
reference_obj()
The reference object we draw the halo around. |
void |
set_reference_obj(interactor ref)
Set the reference object we draw the halo around. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected interactor _reference_obj
protected int _halo_offset
protected int _halo_width
protected java.awt.Color _halo_color
| Constructor Detail |
public halo_container(int xv,
int yv,
int wv,
int hv,
interactor ref,
int halo_off,
int halo_w,
java.awt.Color halo_clr)
int - xv x position of the interactorint - yv y position of the interactorint - wv width of the interactorint - hv height of the interactorinteractor - ref reference object we draw the halo around. If this
is set to null, no halo will be drawn. If this is
set to an object which is not a decendent of this
object, the halo will not be updated properly.int - halo_off offset for halo position. An offset to 1 will draw
the inside of the halo ring 1 pixel outside the
bounds of the reference object.int - halo_w width of the halo in pixels.Color - halo_clr color to draw the halo in.
public halo_container(interactor ref,
int halo_off,
int halo_w,
java.awt.Color halo_clr)
interactor - ref reference object we draw the halo around. If this
is set to null, no halo will be drawn. If this is
set to an object which is not a decendent of this
object, the halo will not be updated properly.int - halo_off offset for halo position. An offset to 1 will draw
the inside of the halo ring 1 pixel outside the
bounds of the reference object.int - halo_w width of the halo in pixels.Color - halo_clr color to draw the halo in.public halo_container(interactor ref)
interactor - ref reference object we draw the halo around. If this
is set to null, no halo will be drawn. If this is
set to an object which is not a decendent of this
object, the halo will not be updated properly.| Method Detail |
public interactor reference_obj()
public void set_reference_obj(interactor ref)
iteractor - ref the new reference objectpublic int halo_offset()
public void halo_offset(int off)
int - off the new offsetpublic int halo_width()
public void halo_width(int w)
int - w the new widthpublic java.awt.Color halo_color()
public void halo_color(java.awt.Color clr)
Color - clr the new colorprotected void draw_self_local(drawable d)
drawable - d a drawable object (set up for this object) to produce
output on.
public void damage_from_child(interactor originator,
java.lang.Object user_info,
java.awt.Point top_left,
java.awt.Dimension sz)
interactor - originator the interactor that caused the damage.Object - user_info uninterpreted information supplied by
the originator at damage time.Point - top_left top-left corner of child's damage area
(in our coordinate system).Dimension - sz size of the damage area.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||