|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.ui.RefineryUtilities
public class RefineryUtilities
A collection of utility methods relating to user interfaces.
| Method Summary | |
|---|---|
static void |
centerDialogInParent(java.awt.Dialog dialog)
Positions the specified dialog within its parent. |
static void |
centerFrameOnScreen(java.awt.Window frame)
Positions the specified frame in the middle of the screen. |
static javax.swing.JButton |
createJButton(java.lang.String label,
java.awt.Font font)
Creates a JButton. |
static javax.swing.JLabel |
createJLabel(java.lang.String text,
java.awt.Font font)
Creates a label with a specific font. |
static javax.swing.JLabel |
createJLabel(java.lang.String text,
java.awt.Font font,
java.awt.Color color)
Creates a label with a specific font and color. |
static javax.swing.JPanel |
createTablePanel(javax.swing.table.TableModel model)
Creates a panel that contains a table based on the specified table model. |
static java.awt.Point |
getCenterPoint()
Computes the center point of the current screen device. |
static java.awt.Rectangle |
getMaximumWindowBounds()
Computes the maximum bounds of the current screen device. |
static void |
positionDialogRelativeToParent(java.awt.Dialog dialog,
double horizontalPercent,
double verticalPercent)
Positions the specified dialog at a position relative to its parent. |
static void |
positionFrameOnScreen(java.awt.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(java.awt.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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.Point getCenterPoint()
public static java.awt.Rectangle getMaximumWindowBounds()
public static void centerFrameOnScreen(java.awt.Window frame)
frame - the frame to be centered on the screen.
public static void positionFrameOnScreen(java.awt.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(java.awt.Window frame)
frame - the frame.public static void centerDialogInParent(java.awt.Dialog dialog)
dialog - the dialog to be positioned on the screen.
public static void positionDialogRelativeToParent(java.awt.Dialog dialog,
double horizontalPercent,
double verticalPercent)
dialog - the dialog to be positioned.horizontalPercent - the relative location.verticalPercent - the relative location.public static javax.swing.JPanel createTablePanel(javax.swing.table.TableModel model)
model - the table model to use when constructing the table.
public static javax.swing.JLabel createJLabel(java.lang.String text,
java.awt.Font font)
text - the text for the label.font - the font.
public static javax.swing.JLabel createJLabel(java.lang.String text,
java.awt.Font font,
java.awt.Color color)
text - the text for the label.font - the font.color - the color.
public static javax.swing.JButton createJButton(java.lang.String label,
java.awt.Font font)
JButton.
label - the label.font - the font.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||