|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_paderborn.fujaba.gui.mdi.FramePositioning
This class provides internal frame positioning methods for use by DesktopMenu.
Field Summary | |
static java.awt.Color |
CONTENTS_CHANGED_COLOR
the foreground color of inactive buttons whose associated frame contents have changed |
static int |
MAX_FRAMES
maximum number of internal frames allowed |
static int |
MAXIMUM_BUTTON_WIDTH
maximum width of frame toolbar buttons |
static int |
MINIMUM_BUTTON_WIDTH
minimum width of frame toolbar buttons |
static int |
X_OFFSET
default x offset of first frame in cascade mode, relative to desktop |
static int |
Y_OFFSET
default y offset of first frame in cascade mode, relative to desktop |
Constructor Summary | |
FramePositioning(javax.swing.JDesktopPane desktop)
creates the FramePositioning object |
Method Summary | |
java.awt.Point |
cascadeInternalFrame(javax.swing.JInternalFrame f)
cascades the given internal frame based upon the current number of internal frames |
void |
cascadeInternalFrames()
cycles through and cascades all internal frames |
void |
tileInternalFrames()
tiles internal frames upon the desktop. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_FRAMES
public static final int X_OFFSET
public static final int Y_OFFSET
public static final int MINIMUM_BUTTON_WIDTH
public static final int MAXIMUM_BUTTON_WIDTH
public static final java.awt.Color CONTENTS_CHANGED_COLOR
Constructor Detail |
public FramePositioning(javax.swing.JDesktopPane desktop)
desktop
- a reference to the JDesktopPaneMethod Detail |
public void cascadeInternalFrames()
public java.awt.Point cascadeInternalFrame(javax.swing.JInternalFrame f)
f
- the internal frame to cascade
public void tileInternalFrames()
while (frames) {
numCols = (int)sqrt(totalFrames);
numRows = totalFrames / numCols;
remainder = totalFrames % numCols
if ((numCols-curCol) <= remainder) {
numRows++; // add an extra row for this column
}
}
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |