public class BasicGraphicsUtils extends Object
Constructor and Description |
---|
BasicGraphicsUtils() |
Modifier and Type | Method and Description |
---|---|
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) |
static void |
drawDashedRect(Graphics g, int x, int y, int width, int height) |
static void |
drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
static void |
drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) |
static void |
drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
static void |
drawString(Graphics g, String text, int underlinedChar, int x, int y)
在位置的图形
g 画一个字符串(x,y)就像
g.drawString 会。
|
static void |
drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
在位置的图形
g 画一个字符串(
x ,
y )就像
g.drawString 会。
|
static Insets |
getEtchedInsets()
返回占用的空间边界被
drawEtchedRect()
|
static Insets |
getGrooveInsets()
返回占用的空间边界被
drawGroove()
|
static Dimension |
getPreferredButtonSize(AbstractButton b, int textIconGap) |
public static void drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
public static Insets getEtchedInsets()
drawEtchedRect()
public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
public static Insets getGrooveInsets()
drawGroove()
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)
public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
public static void drawString(Graphics g, String text, int underlinedChar, int x, int y)
g
画一个字符串(x,y)就像
g.drawString
会。在文本中出现的第一
underlineChar
将下划线。匹配算法是不区分大小写的。
public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
g
画一个字符串(
x
,
y
)就像
g.drawString
会。在文本索引
underlinedIndex
字符将被强调。如果
index
超出
text
范围(包括< 0),没有什么会强调。
g
图形绘制
text
弦画
underlinedIndex
索引字符在文本中下划线
x
X坐标的绘制
y
Y坐标的绘制
public static void drawDashedRect(Graphics g, int x, int y, int width, int height)
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.