|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.modules.gui.commonswing.SwingUtil
public class SwingUtil
Creation-Date: 20.11.2006, 22:42:21
Method Summary | |
---|---|
static void |
centerDialogInParent(Dialog dialog)
Positions the specified dialog within its parent. |
static void |
centerFrameOnScreen(Window frame)
Positions the specified frame in the middle of the screen. |
static Point |
getCenterPoint()
Deprecated. Not used anymore, will be removed. |
static Rectangle |
getMaximumWindowBounds()
Computes the maximum bounds of the current screen device. |
static Window |
getWindowAncestor(Component component)
|
static void |
positionDialogRelativeToParent(Dialog dialog,
double horizontalPercent,
double verticalPercent)
Positions the specified dialog at a position relative to its parent. |
static void |
positionFrameOnScreen(Window frame,
double horizontalPercent,
double verticalPercent)
Positions the specified frame at a relative position in the screen, where 50% is considered to be the center of the screen. |
static void |
positionFrameRandomly(Window frame)
Positions the specified frame at a random location on the screen while ensuring that the entire frame is visible (provided that the frame is smaller than the screen). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Point getCenterPoint()
public static Rectangle getMaximumWindowBounds()
public static void centerFrameOnScreen(Window frame)
frame
- the frame to be centered on the screen.public static void positionFrameOnScreen(Window frame, double horizontalPercent, double verticalPercent)
frame
- the frame.horizontalPercent
- the relative horizontal position of the frame (0.0 to 1.0, where 0.5 is the center of the
screen).verticalPercent
- the relative vertical position of the frame (0.0 to 1.0, where 0.5 is the center of the
screen).public static void positionFrameRandomly(Window frame)
frame
- the frame.public static void centerDialogInParent(Dialog dialog)
dialog
- the dialog to be positioned on the screen.public static void positionDialogRelativeToParent(Dialog dialog, double horizontalPercent, double verticalPercent)
dialog
- the dialog to be positioned.horizontalPercent
- the relative location.verticalPercent
- the relative location.public static Window getWindowAncestor(Component component)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |