java.lang.Object
org.gtk.java.swing.plaf.gtk.GtkGraphicsUtils
- All Implemented Interfaces:
- javax.swing.SwingConstants
- public class GtkGraphicsUtils
- extends java.lang.Object
- implements javax.swing.SwingConstants
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
|
Method Summary |
static void |
drawBorder(java.awt.Graphics g,
int x,
int y,
int w,
int h,
java.awt.Color lightShadow,
java.awt.Color mediumShadow,
java.awt.Color darkShadow,
boolean isRaised)
|
static void |
drawGroove(java.awt.Graphics g,
int x,
int y,
int w,
int h,
java.awt.Color shadow,
java.awt.Color highlight)
|
private static void |
drawMenuBezel(java.awt.Graphics g,
java.awt.Color background,
int x,
int y,
int width,
int height)
|
(package private) static void |
drawPoint(java.awt.Graphics g,
int x,
int y)
Draws the point (x, y) in the current color. |
static void |
drawStringInRect(java.awt.Graphics g,
java.lang.String aString,
int x,
int y,
int width,
int height,
int justification)
Draws aString in the rectangle defined by
(x, y, width, height). |
(package private) static boolean |
isLeftToRight(java.awt.Component c)
|
private static java.lang.String |
layoutMenuItem(javax.swing.JComponent c,
java.awt.FontMetrics fm,
java.lang.String text,
java.awt.FontMetrics fmAccel,
java.lang.String acceleratorText,
javax.swing.Icon icon,
javax.swing.Icon checkIcon,
javax.swing.Icon arrowIcon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR,
java.awt.Rectangle acceleratorR,
java.awt.Rectangle checkIconR,
java.awt.Rectangle arrowIconR,
int textIconGap,
int menuItemGap)
Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string. |
static void |
paintMenuItem(java.awt.Graphics g,
javax.swing.JComponent c,
javax.swing.Icon checkIcon,
javax.swing.Icon arrowIcon,
java.awt.Color background,
java.awt.Color foreground,
int defaultTextIconGap)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GtkGraphicsUtils
public GtkGraphicsUtils()
drawPoint
static void drawPoint(java.awt.Graphics g,
int x,
int y)
- Draws the point (x, y) in the current color.
drawBorder
public static void drawBorder(java.awt.Graphics g,
int x,
int y,
int w,
int h,
java.awt.Color lightShadow,
java.awt.Color mediumShadow,
java.awt.Color darkShadow,
boolean isRaised)
drawGroove
public static void drawGroove(java.awt.Graphics g,
int x,
int y,
int w,
int h,
java.awt.Color shadow,
java.awt.Color highlight)
drawStringInRect
public static void drawStringInRect(java.awt.Graphics g,
java.lang.String aString,
int x,
int y,
int width,
int height,
int justification)
- Draws aString in the rectangle defined by
(x, y, width, height).
justification specifies the text's justification, one of
LEFT, CENTER, or RIGHT.
drawStringInRect() does not clip to the rectangle, but instead
uses this rectangle and the desired justification to compute the point
at which to begin drawing the text.
paintMenuItem
public static void paintMenuItem(java.awt.Graphics g,
javax.swing.JComponent c,
javax.swing.Icon checkIcon,
javax.swing.Icon arrowIcon,
java.awt.Color background,
java.awt.Color foreground,
int defaultTextIconGap)
layoutMenuItem
private static java.lang.String layoutMenuItem(javax.swing.JComponent c,
java.awt.FontMetrics fm,
java.lang.String text,
java.awt.FontMetrics fmAccel,
java.lang.String acceleratorText,
javax.swing.Icon icon,
javax.swing.Icon checkIcon,
javax.swing.Icon arrowIcon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR,
java.awt.Rectangle acceleratorR,
java.awt.Rectangle checkIconR,
java.awt.Rectangle arrowIconR,
int textIconGap,
int menuItemGap)
- Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string. Locations are computed
relative to the viewR rectangle.
drawMenuBezel
private static void drawMenuBezel(java.awt.Graphics g,
java.awt.Color background,
int x,
int y,
int width,
int height)
isLeftToRight
static boolean isLeftToRight(java.awt.Component c)