|
|||||||||
| 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.percent_parent
This object implements a parent which will allow any number of its children to register with it to stay at a certain percentage of of its width. Children which don't register with the parent to participant are not positioned in any way ("floaters"). The percentages expressed are relative to the upper left corner of the positioned object.
| Field Summary | |
protected java.util.Hashtable |
_height_dict
This is where we keep track of the height percentages. |
protected java.util.Hashtable |
_width_dict
This is where we keep track of the width percentages. |
protected java.util.Hashtable |
_x_dict
This is where we keep track of the x percentages. |
protected java.util.Hashtable |
_y_dict
This is where we keep track of the y percentages. |
| 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 | |
percent_parent()
Construct a percent parent interactor. |
|
percent_parent(int x,
int y)
Construct a percent parent interactor. |
|
percent_parent(int x,
int y,
int w,
int h)
Construct a percent parent interactor with both a position and a size. |
|
| Method Summary | |
void |
add_child_at_x(interactor chld,
double per)
Add a child at an x coordinate that is a given percentage of the width. |
void |
add_child_at_y(interactor chld,
double per)
Add a child at an y coordinate that is a given percentage of the height. |
void |
add_child(interactor chld,
double x,
double y)
Add a child a fixed percentage of both the width and the height for its x and y coordinates. |
void |
configure()
Override the configure pass to allow us to change the positions of the children. |
void |
position_children()
Do a recalculation of the children's position. |
void |
set_height_percentage(interactor chld,
double per)
Set a given child's height as a percentage of this object's height. |
void |
set_width_percentage(interactor chld,
double per)
Set a given child's width as a percentage of this object's width. |
void |
set_x_percentage(interactor chld,
double per)
Set a given child's x coordinate as a percentage of width. |
void |
set_y_percentage(interactor chld,
double per)
Set a given child's y coord at a percentage of height. |
double |
x_percentage(interactor c)
Return the percentage of width (x percentage) of a child of this interactor. |
double |
y_percentage(interactor c)
Return the percentage of height (y percentage) of a child of this interactor. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected java.util.Hashtable _x_dict
protected java.util.Hashtable _y_dict
protected java.util.Hashtable _width_dict
protected java.util.Hashtable _height_dict
| Constructor Detail |
public percent_parent(int x,
int y)
int - x the x position of this object.int - y the y position of this object.
public percent_parent(int x,
int y,
int w,
int h)
int - x the x position of this object.int - y the y position of this object.int - w the width of this object.int - h the height of this object.public percent_parent()
| Method Detail |
public void add_child_at_x(interactor chld,
double per)
interactor - chld the new child to add.double - per the percent of the width to fix that child at.
public void set_x_percentage(interactor chld,
double per)
interactor - chld the child to change.double - per the percentage of the width to place that child at.
public void add_child_at_y(interactor chld,
double per)
interactor - chld the new child to add.double - per the percent of the height to fix that child at.
public void set_y_percentage(interactor chld,
double per)
interactor - chld the child to changedouble - per the percentage of the height to place that child at.
public void set_width_percentage(interactor chld,
double per)
interactor - chld the child to changedouble - per the percentage of the width for this child
public void set_height_percentage(interactor chld,
double per)
interactor - chld the child to change.double - per the percentage of the width to place that child at.public void position_children()
public void configure()
public void add_child(interactor chld,
double x,
double y)
interactor - chld the new child to add.double - x the percent of the width to fix that child's x
position at.double - y the percent of the width to fix that child's y
position at.public double x_percentage(interactor c)
interactor - c the child to check on.public double y_percentage(interactor c)
interactor - c the child to check on.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||