Класс BasicGraphicsUtils
- java.lang.Object
-
- javax.swing.plaf.basic.BasicGraphicsUtils
public class BasicGraphicsUtils extends Object
Конструкторы
| Конструктор и описание |
|---|
BasicGraphicsUtils()
|
Методы
| Модификатор и тип | Метод и описание |
|---|---|
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) Отображает строку с графикой |
static void |
drawStringUnderlineCharAt(Graphics g,
String text,
int underlinedIndex,
int x,
int y) Отображает строку с графикой |
static Insets |
getEtchedInsets() Возвращает занимаемое пространство рамки, нарисованной с помощью |
static Insets |
getGrooveInsets() Возвращает занимаемое пространство рамки, нарисованной с помощью |
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().
- Возвращает:
- отступ рисованой рамки
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 в позиции (x,y) так же, как и g.drawString. Первый символ underlineChar в тексте будет подчеркнут. Алгоритм сопоставления нечувствителен к регистру.
drawStringUnderlineCharAt
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 для отображения - С:
- 1.4
drawDashedRect
public static void drawDashedRect(Graphics g,
int x,
int y,
int width,
int height)
getPreferredButtonSize
public static Dimension getPreferredButtonSize(AbstractButton b,
int textIconGap)
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.