所有类
javax.swing.plaf.basic
类 BasicGraphicsUtils
java.lang.Object
javax.swing.plaf.basic.BasicGraphicsUtils
-
public class BasicGraphicsUtils
- extends Object
方法摘要 |
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.drawString 那样利用图形 g 在位置 (x,y) 绘制字符串。 |
static void |
drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) 像 g.drawString 那样利用图形 g 在位置 (x , y ) 绘制字符串。 |
static Insets |
getEtchedInsets() 返回 drawEtchedRect() 绘制边框占用的空间量。 |
static Insets |
getGrooveInsets() 返回 drawGroove() 绘制边框占用的空间量。 |
static Dimension |
getPreferredButtonSize(AbstractButton b, int textIconGap) |
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicGraphicsUtils
public BasicGraphicsUtils()
drawEtchedRect
public static void drawEtchedRect(Graphics g,
int x,
int y,
int w,
int h,
Color shadow,
Color darkShadow,
Color highlight,
Color lightHighlight)
-
getEtchedInsets
public static Insets getEtchedInsets()
-
返回
drawEtchedRect()
绘制边框占用的空间量。
-
- 返回:
-
浮雕化矩形的镶边
drawGroove
public static void drawGroove(Graphics g,
int x,
int y,
int w,
int h,
Color shadow,
Color highlight)
-
getGrooveInsets
public static Insets getGrooveInsets()
-
返回
drawGroove()
绘制边框占用的空间量。
-
- 返回:
-
凹槽边框的 inset
drawBezel
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)
-
drawLoweredBezel
public static void drawLoweredBezel(Graphics g,
int x,
int y,
int w,
int h,
Color shadow,
Color darkShadow,
Color highlight,
Color lightHighlight)
-
drawString
public static void drawString(Graphics g,
String text,
int underlinedChar,
int x,
int y)
-
像
g.drawString
那样利用图形 g
在位置 (x,y) 绘制字符串。underlineChar
在文本中第一次出现时将带有下划线。匹配算法不区分大小写。
-