| java.lang.Object org.jfree.ui.RefineryUtilities
RefineryUtilities | public class RefineryUtilities (Code) | | A collection of utility methods relating to user interfaces.
author: David Gilbert |
Method Summary | |
public static void | centerDialogInParent(Dialog dialog) Positions the specified dialog within its parent. | public static void | centerFrameOnScreen(Window frame) Positions the specified frame in the middle of the screen. | public static JButton | createJButton(String label, Font font) Creates a
JButton .
Parameters: label - the label. Parameters: font - the font. | public static JLabel | createJLabel(String text, Font font) Creates a label with a specific font.
Parameters: text - the text for the label. Parameters: font - the font. | public static JLabel | createJLabel(String text, Font font, Color color) Creates a label with a specific font and color.
Parameters: text - the text for the label. Parameters: font - the font. Parameters: color - the color. | public static JPanel | createTablePanel(TableModel model) Creates a panel that contains a table based on the specified table model.
Parameters: model - the table model to use when constructing the table. | public static Point | getCenterPoint() Computes the center point of the current screen device. | public static Rectangle | getMaximumWindowBounds() Computes the maximum bounds of the current screen device. | public static void | positionDialogRelativeToParent(Dialog dialog, double horizontalPercent, double verticalPercent) Positions the specified dialog at a position relative to its parent. | public 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. | public 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). |
centerDialogInParent | public static void centerDialogInParent(Dialog dialog)(Code) | | Positions the specified dialog within its parent.
Parameters: dialog - the dialog to be positioned on the screen. |
centerFrameOnScreen | public static void centerFrameOnScreen(Window frame)(Code) | | Positions the specified frame in the middle of the screen.
Parameters: frame - the frame to be centered on the screen. |
createJButton | public static JButton createJButton(String label, Font font)(Code) | | Creates a
JButton .
Parameters: label - the label. Parameters: font - the font. The button. |
createJLabel | public static JLabel createJLabel(String text, Font font)(Code) | | Creates a label with a specific font.
Parameters: text - the text for the label. Parameters: font - the font. The label. |
createJLabel | public static JLabel createJLabel(String text, Font font, Color color)(Code) | | Creates a label with a specific font and color.
Parameters: text - the text for the label. Parameters: font - the font. Parameters: color - the color. The label. |
createTablePanel | public static JPanel createTablePanel(TableModel model)(Code) | | Creates a panel that contains a table based on the specified table model.
Parameters: model - the table model to use when constructing the table. The panel. |
getCenterPoint | public static Point getCenterPoint()(Code) | | Computes the center point of the current screen device. If this method is called on JDK 1.4, Xinerama-aware
results are returned. (See Sun-Bug-ID 4463949 for details).
the center point of the current screen. |
getMaximumWindowBounds | public static Rectangle getMaximumWindowBounds()(Code) | | Computes the maximum bounds of the current screen device. If this method is called on JDK 1.4, Xinerama-aware
results are returned. (See Sun-Bug-ID 4463949 for details).
the maximum bounds of the current screen. |
positionDialogRelativeToParent | public static void positionDialogRelativeToParent(Dialog dialog, double horizontalPercent, double verticalPercent)(Code) | | Positions the specified dialog at a position relative to its parent.
Parameters: dialog - the dialog to be positioned. Parameters: horizontalPercent - the relative location. Parameters: verticalPercent - the relative location. |
positionFrameOnScreen | public static void positionFrameOnScreen(Window frame, double horizontalPercent, double verticalPercent)(Code) | | Positions the specified frame at a relative position in the screen, where 50% is considered
to be the center of the screen.
Parameters: frame - the frame. Parameters: horizontalPercent - the relative horizontal position of the frame (0.0 to 1.0,where 0.5 is the center of the screen). Parameters: verticalPercent - the relative vertical position of the frame (0.0 to 1.0, where0.5 is the center of the screen). |
positionFrameRandomly | public static void positionFrameRandomly(Window frame)(Code) | | 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).
Parameters: frame - the frame. |
|
|