| HEADER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
ru.biosoft.graphics.View | +--ru.biosoft.graphics.CompositeView
Container for View objects.
| Field Summary | |
final static int | RELIf this bit is cleared,then coordinates are used directly from x,y coordinates of view location |
final static int | X_CCArrange mode, view is arranged by center along X axis to the center along X axis of previous rectangle |
final static int | X_LCArrange mode, view is arranged by center along X axis to the left of previous rectangle |
final static int | X_LLArrange mode, view is arranged by left side to the left side of previous rectangle |
final static int | X_LRArrange mode, view is arranged by right side to the left side of previous rectangle |
final static int | X_RCArrange mode, view is arranged by center along X axis to the right of previous rectangle |
final static int | X_RLArrange mode, view is arranged by left side to the right of previous rectangle |
final static int | X_RRArrange mode, view is arranged by right side to the right side of previous rectangle |
final static int | X_UNArrange mode, X coordinate is get from x coordinate of view location |
final static int | Y_BBArrange mode, view is arranged by bottom side to the bottom of previous rectangle |
final static int | Y_BCArrange mode, view is arranged by center along Y axis to the bottom of previous rectangle |
final static int | Y_BTArrange mode, view is arranged by top side to the bottom of previous rectangle |
final static int | Y_CCArrange mode, view is arranged by center along Y axis to the center along Y axis of previous rectangle |
final static int | Y_TBArrange mode, view is arranged by bottom side to the top of previous rectangle |
final static int | Y_TCArrange mode, view is arranged by center along Y axis to the top of previous rectangle |
final static int | Y_TTArrange mode, view is arranged by top side to the top of previous rectangle |
final static int | Y_UNArrange mode, Y coordinate is get from y coordinate of view location |
| Fields inherited from class ru.biosoft.graphics.View |
ACTIVE, BASELINE, BOTTOM, CENTER, HIDE, LEFT, RIGHT, TOP |
| Constructor Summary | |
CompositeView()Constructs composite view | |
| Method Summary | |
void | add(View v, int mode)Adds element with insets coordinates ( 0,0 ) |
void | add(View v, int mode, Point insets)Adds new elements and arrange them relative the previous objects. |
void | add(View v)Adds the view to the children list and corrects rectangle of composite view bound. |
View | elementAt(int index)Returns the view at the specified index. |
Rectangle | getBounds()Returns rectangle bound of this composite view |
Enumeration | getChildren()Returns an enumeration of the views of this composite view. |
View | getDeepestActive(Point pt)Returns deepest view in tree hierarchy, that has View.ACTIVE state and intersects the specified point. |
Point | getLocation()Returns the location of this Rectangle bound. |
void | insert(View v, int i)Inserts view in specified position. |
boolean | intersects(Rectangle rect)Tests if this composite view bound intersects the interior of a specified rectangle. |
void | move(int x, int y)Moves all children to the new location using specified offsets |
void | paint(Graphics2D g)Paints this composite view on specified Graphics2D. |
boolean | remove(View v)Removes specified view from composite view |
void | scale(double sx, double sy)Scales all children of container in relation to old values. |
int | size()Return size of composite view |
void | updateBounds()Synchronizes the Rectangle rectangle returned by getBounds()
with composite view. |
| Methods inherited from class ru.biosoft.graphics.View |
getModel, getShape, isActive, isVisible, move, setActive, setLocation, setLocation, setModel, setToScale, setVisible |
| Field Detail |
public final static int REL
public final static int X_CC
public final static int X_LC
public final static int X_LL
public final static int X_LR
public final static int X_RC
public final static int X_RL
public final static int X_RR
public final static int X_UN
public final static int Y_BB
public final static int Y_BC
public final static int Y_BT
public final static int Y_CC
public final static int Y_TB
public final static int Y_TC
public final static int Y_TT
public final static int Y_UN
| Constructor Detail |
public CompositeView()
| Method Detail |
public void add(View v, int mode)
public void add(View v, int mode, Point insets)
X_RL | || | |--- boundary of new element | ---- boundary of minimal rectangle, described all | previous elements ------ x or y coordinate X - the x coordinate: L - left boundary of the object C - center of the object R - right boundary of the object Y - the y coordinate: T - top boundary of the object C - center of the object B - bottom boundary of the object Special: UN - don't change the corresponding x or y boundory of new element. REL - If this bit is cleared, target coordinates is used from location of view.
public void add(View v)
public View elementAt(int index)
public Rectangle getBounds()
public Enumeration getChildren()
public View getDeepestActive(Point pt)
public Point getLocation()
Rectangle bound.Rectangle bound.public void insert(View v, int i)
throws java.lang.ArrayIndexOutOfBoundsException
public boolean intersects(Rectangle rect)
true if intersects,false otherwisepublic void move(int x, int y)
public void paint(Graphics2D g)
public boolean remove(View v)
true if view is removed or false otherwise.public void scale(double sx, double sy)
public int size()
public void updateBounds()
Rectangle rectangle returned by getBounds()
with composite view.| Association Links |
to Class java.util.Vector
to Class ru.biosoft.graphics.View
to Class java.awt.Rectangle
| FOOTER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||