| Modifier and Type | Field and Description |
|---|---|
| private static final Insets | |
| private static final Insets |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | drawBezel(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, boolean is component pressed isPressed, boolean is default drawing isDefault, Color a color of shadow shadow, Color a color of dark shadow darkShadow, Color a color highlighting highlight, Color a color of light highlighting lightHighlight)Draws a bezel. |
| public static void | drawDashedRect(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width of rectangle width, int a height of rectangle height)Draws dashed rectangle. |
| public static void | drawEtchedRect(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, Color a color of shadow shadow, Color a color of dark shadow darkShadow, Color a color highlighting highlight, Color a color of light highlighting lightHighlight)Draws an etched rectangle. |
| public static void | drawGroove(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, Color a color of shadow shadow, Color a color highlighting highlight)Draws a groove. |
| public static void | drawLoweredBezel(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, Color a color of shadow shadow, Color a color of dark shadow darkShadow, Color a color highlighting highlight, Color a color of light highlighting lightHighlight)Draws a lowered bezel. |
| public static void | drawString(Graphics
an instance of g, String Graphicsa text text, int an underlined char underlinedChar, int an X coordinate x, int an Y coordinate y)Draw a string with the graphics |
| public static void | drawString(JComponent
the component that will display the string, may be null c, Graphics2D the graphics context, must not be null g, String the string to display, may be null string, float the x coordinate to draw the text at x, float the y coordinate to draw the text at y)Draws the given string at the specified location using text properties and anti-aliasing hints from the provided component. |
| public static void | drawStringUnderlineCharAt(Graphics
Graphics to draw with g, String String to draw text, int Index of character in text to underline underlinedIndex, int x coordinate to draw at x, int y coordinate to draw at y)Draw a string with the graphics |
| public static void | drawStringUnderlineCharAt(JComponent
the component that will display the string, may be null c, Graphics2D the graphics context, must not be null g, String the string to display, may be null string, int index of a char value (Unicode code unit)
in the string to underline underlinedIndex, float the x coordinate to draw the text at x, float the y coordinate to draw the text at y)Draws the given string at the specified location underlining the specified character. |
| public static String | Returns: the clipped string that fits in the provided space, an empty string if the given string argument isnull or emptythe component, may be null c, FontMetrics the FontMetrics used to measure the string width, must be
obtained from the correct font and graphics. Must not be null. fm, String the string to clip, may be null string, int the amount of space that the string can be drawn in availTextWidth)Clips the passed in string to the space provided. |
| public static Insets | Returns: the inset of an etched rectReturns the amount of space taken up by a border drawn by
|
| public static Insets | Returns: the inset of a groove borderReturns the amount of space taken up by a border drawn by
|
| public static Dimension | Returns: the preferred size of the buttonan instance of b, int AbstractButtona gap between text and icon textIconGap)Returns the preferred size of the button. |
| public static float | Returns: the advance width of the specified string, zero is returned fornull stringthe component, may be null c, FontMetrics the FontMetrics used to measure the advance string width, must
be obtained from the correct font and graphics. Must not be null. fm, String the string to get the advance width of, may be null string)Returns the width of the passed in string using text properties and anti-aliasing hints from the provided component. |
| pack-priv static boolean | |
| pack-priv static boolean |
| ETCHED_INSETS | back to summary |
|---|---|
| private static final Insets ETCHED_INSETS | |
| GROOVE_INSETS | back to summary |
|---|---|
| private static final Insets GROOVE_INSETS | |
| BasicGraphicsUtils | back to summary |
|---|---|
| public BasicGraphicsUtils() Constructs a | |
| drawBezel | back to summary |
|---|---|
| public static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws a bezel.
| |
| drawDashedRect | back to summary |
|---|---|
| public static void drawDashedRect(Graphics g, int x, int y, int width, int height) Draws dashed rectangle.
| |
| drawEtchedRect | back to summary |
|---|---|
| public static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws an etched rectangle. | |
| drawGroove | back to summary |
|---|---|
| public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) Draws a groove. | |
| drawLoweredBezel | back to summary |
|---|---|
| public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws a lowered bezel. | |
| drawString | back to summary |
|---|---|
| public static void drawString(Graphics g, String text, int underlinedChar, int x, int y) Draw a string with the graphics | |
| drawString | back to summary |
|---|---|
| public static void drawString(JComponent c, Graphics2D g, String string, float x, float y) Draws the given string at the specified location using text properties and anti-aliasing hints from the provided component. Nothing is drawn for the null string.
| |
| drawStringUnderlineCharAt | back to summary |
|---|---|
| public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) Draw a string with the graphics | |
| drawStringUnderlineCharAt | back to summary |
|---|---|
| public static void drawStringUnderlineCharAt(JComponent c, Graphics2D g, String string, int underlinedIndex, float x, float y) Draws the given string at the specified location underlining the specified character. The provided component is used to query text properties and anti-aliasing hints.
The
No character is underlined if the index is negative or greater
than the string length
| |
| getClippedString | back to summary |
|---|---|
| public static String getClippedString(JComponent c, FontMetrics fm, String string, int availTextWidth) Clips the passed in string to the space provided. The provided component is used to query text properties and anti-aliasing hints. The unchanged string is returned if the space provided is greater than the string width.
| |
| getEtchedInsets | back to summary |
|---|---|
| public static Insets getEtchedInsets() Returns the amount of space taken up by a border drawn by
| |
| getGrooveInsets | back to summary |
|---|---|
| public static Insets getGrooveInsets() Returns the amount of space taken up by a border drawn by
| |
| getPreferredButtonSize | back to summary |
|---|---|
| public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) Returns the preferred size of the button.
| |
| getStringWidth | back to summary |
|---|---|
| public static float getStringWidth(JComponent c, FontMetrics fm, String string) Returns the width of the passed in string using text properties
and anti-aliasing hints from the provided component.
If the passed string is
| |
| isLeftToRight | back to summary |
|---|---|
| pack-priv static boolean isLeftToRight(Component c) | |
| isMenuShortcutKeyDown | back to summary |
|---|---|
| pack-priv static boolean isMenuShortcutKeyDown(InputEvent event) | |