| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| pack-priv static Random |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | |
| public static Font | |
| public static Rectangle2D | getStringBounds(String s, Graphics g)
Compute the width and height of given string given the current font context in the Graphics object |
| public static int | getStringWidth(String s, FontMetrics fm)
Compute just the width of the given string with the given FontMetrics. |
| public static void | |
| public static Border | |
| public static void | |
| public static void | |
| public static void | reshapeToAspectRatio(Component component, float aspectRatio, float fillRatio, Dimension containerDimension)
|
| FONT_SIZE | back to summary |
|---|---|
| private static final int FONT_SIZE | |
| random | back to summary |
|---|---|
| pack-priv static Random random | |
| GraphicsUtilities | back to summary |
|---|---|
| public GraphicsUtilities() | |
| centerInContainer | back to summary |
|---|---|
| public static void centerInContainer(Component c) | |
| centerInContainer | back to summary |
|---|---|
| public static void centerInContainer(Component component, Dimension containerDimension) | |
| constrainToSize | back to summary |
|---|---|
| public static void constrainToSize(Component component, Dimension containerDimension) | |
| getMonospacedFont | back to summary |
|---|---|
| public static Font getMonospacedFont() | |
| getStringBounds | back to summary |
|---|---|
| public static Rectangle2D getStringBounds(String s, Graphics g) Compute the width and height of given string given the current font context in the Graphics object | |
| getStringWidth | back to summary |
|---|---|
| public static int getStringWidth(String s, FontMetrics fm) Compute just the width of the given string with the given FontMetrics. This is less accurate then getStringBounds(), above, since the graphics context is not taken into account. | |
| moveToInContainer | back to summary |
|---|---|
| public static void moveToInContainer(Component component, float relativeX, float relativeY, int minX, int minY) | |
| newBorder | back to summary |
|---|---|
| public static Border newBorder(int size) | |
| randomLocation | back to summary |
|---|---|
| public static void randomLocation(Component c) | |
| randomLocation | back to summary |
|---|---|
| public static void randomLocation(Component component, Dimension containerDimension) | |
| reshapeToAspectRatio | back to summary |
|---|---|
| public static void reshapeToAspectRatio(Component component, float aspectRatio, float fillRatio, Dimension containerDimension) | |