|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.swing.JCRectUtil
JCRectUtil
provides functions for computing the largest
available rectangle from a list of rectangles.
Here is a brief summary of how to use it:
rlInit(r, v)
,
where r is the initializing rectangle and v is a blank
vector.
rlRemove(r, v1, v2)
to remove sub-rectangle
r from the rectangles in the Vector
of rectangles
v1, placing the new list of rectangles in Vector
v2. Repeat as necessary.
largestRect(v)
to return the largest available
rectangle from the passed-inVector
of rectangles.
Field Summary | |
static int |
LEFTTORIGHT
|
static int |
TOPTOBOTTOM
|
Constructor Summary | |
JCRectUtil()
|
Method Summary | |
static Rectangle |
largestRect(Vector rl)
Determines the largest rectangle in the space represented by a list of non-overlapping rectangles. |
static void |
rlInit(Rectangle r,
Vector rl)
Initializes this rectangle list. |
static void |
rlRemove(Rectangle r,
Vector rl1,
Vector rl2)
Removes rectangle r from rectlist rl1, storing the result in rl2. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEFTTORIGHT
public static final int TOPTOBOTTOM
Constructor Detail |
public JCRectUtil()
Method Detail |
public static void rlInit(Rectangle r, Vector rl)
r
- rectangle to intialize this list withrl
- rectangle list, a vector, to initializecom.sun.java.util.collections.Vector
.public static void rlRemove(Rectangle r, Vector rl1, Vector rl2)
r
- rectangle to removerl1
- rectangle list, a vector, to remove rectangle fromrl2
- rectangle list, a vector, to place result inpublic static Rectangle largestRect(Vector rl)
rl
- the list of rectangles, in vector form,
to use for the calculation
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |