javax.swing.SwingConstants
public class QuaquaUtilities
extends javax.swing.plaf.basic.BasicGraphicsUtils
implements javax.swing.SwingConstants
Modifier and Type | Method | Description |
---|---|---|
static java.lang.Object |
beginGraphics(java.awt.Graphics2D graphics2d) |
|
static java.awt.Component |
compositeRequestFocus(java.awt.Component component) |
Copied from BasicLookAndFeel.
|
static void |
configureGraphics(java.awt.Graphics gr) |
|
static java.awt.image.BufferedImage |
createBufferedImage(java.net.URL location) |
|
static java.awt.TexturePaint |
createTexturePaint(java.net.URL location) |
|
static void |
drawStringUnderlineCharAt(java.awt.Graphics g,
java.lang.String text,
int underlinedIndex,
int x,
int y) |
Draw a string with the graphics
g at location
(x , y )
just like g.drawString would. |
static void |
endGraphics(java.awt.Graphics2D graphics2d,
java.lang.Object oldHints) |
|
static java.lang.String |
getKeyModifiersText(int modifiers,
boolean leftToRight) |
Returns a Mac OS X specific String describing the modifier key(s),
such as "Shift", or "Ctrl+Shift".
|
static int |
getLeftSideBearing(java.awt.Font f,
java.lang.String string) |
|
static boolean |
isFocused(java.awt.Component component) |
|
static boolean |
isLeftToRight(java.awt.Component c) |
|
static boolean |
isOnActiveWindow(java.awt.Component c) |
Returns true if the component is on a Dialog or a Frame, which is active,
or if it is on a Window, which is focused.
|
static java.lang.String |
layoutCompoundLabel(java.awt.FontMetrics fm,
java.lang.String text,
javax.swing.Icon icon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR,
int textIconGap) |
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 java.lang.String |
layoutCompoundLabel(javax.swing.JComponent c,
java.awt.FontMetrics fm,
java.lang.String text,
javax.swing.Icon icon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR,
int textIconGap) |
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 |
repaintBorder(javax.swing.JComponent component) |
public static boolean isLeftToRight(java.awt.Component c)
public static void drawStringUnderlineCharAt(java.awt.Graphics g, java.lang.String text, int underlinedIndex, int x, int y)
g
at location
(x
, y
)
just like g.drawString
would.
The character at index underlinedIndex
in text will be underlined. If index
is beyond the
bounds of text
(including < 0), nothing will be
underlined.g
- Graphics to draw withtext
- String to drawunderlinedIndex
- Index of character in text to underlinex
- x coordinate to draw aty
- y coordinate to draw atpublic static boolean isOnActiveWindow(java.awt.Component c)
public static java.lang.String getKeyModifiersText(int modifiers, boolean leftToRight)
public static void repaintBorder(javax.swing.JComponent component)
public static final java.lang.Object beginGraphics(java.awt.Graphics2D graphics2d)
public static final void endGraphics(java.awt.Graphics2D graphics2d, java.lang.Object oldHints)
public static final boolean isFocused(java.awt.Component component)
public static int getLeftSideBearing(java.awt.Font f, java.lang.String string)
public static java.awt.image.BufferedImage createBufferedImage(java.net.URL location)
public static java.awt.TexturePaint createTexturePaint(java.net.URL location)
public static java.lang.String layoutCompoundLabel(javax.swing.JComponent c, java.awt.FontMetrics fm, java.lang.String text, javax.swing.Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, java.awt.Rectangle viewR, java.awt.Rectangle iconR, java.awt.Rectangle textR, int textIconGap)
public static java.lang.String layoutCompoundLabel(java.awt.FontMetrics fm, java.lang.String text, javax.swing.Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, java.awt.Rectangle viewR, java.awt.Rectangle iconR, java.awt.Rectangle textR, int textIconGap)
public static void configureGraphics(java.awt.Graphics gr)
public static java.awt.Component compositeRequestFocus(java.awt.Component component)