-
-
方法摘要
所有方法 接口方法 抽象方法 Default Methods Modifier and Type 方法 描述 default intgetIconHeight()返回图标的高度。intgetIconHeight(SynthContext context)返回给定合成器上下文的图标的高度。default intgetIconWidth()返回图标的宽度。intgetIconWidth(SynthContext context)返回给定合成上下文的图标的宽度。default voidpaintIcon(Component c, Graphics g, int x, int y)在指定位置绘制图标。voidpaintIcon(SynthContext context, Graphics g, int x, int y, int width, int height)在给定的合成器上下文的指定位置绘制图标。
-
-
-
方法详细信息
-
paintIcon
void paintIcon(SynthContext context, Graphics g, int x, int y, int width, int height)
在给定的合成器上下文的指定位置绘制图标。- 参数
-
context- 标识托管区域,可能为null。 -
g- 图形上下文 -
x- 要绘制的x位置 -
y- 要绘制的y位置 -
width- 要绘制到的区域的宽度,可以为0 -
height- 要绘制的区域的高度,可能为0
-
getIconWidth
int getIconWidth(SynthContext context)
返回给定合成上下文的图标的宽度。- 参数
-
请求图标的
context-SynthContext可以为null。 - 结果
- 一个int指定图标的宽度。
-
getIconHeight
int getIconHeight(SynthContext context)
返回给定合成器上下文的图标的高度。- 参数
-
请求图标的
context-SynthContext可以为空。 - 结果
- 一个int指定图标的高度。
-
paintIcon
default void paintIcon(Component c, Graphics g, int x, int y)
描述从接口Icon复制在指定位置绘制图标。 图标实现可以使用Component参数来获取对绘画有用的属性,例如前景色或背景色。
-
getIconWidth
default int getIconWidth()
描述从接口Icon复制返回图标的宽度。- Specified by:
-
getIconWidth在接口Icon - 结果
- int指定图标的固定宽度。
-
getIconHeight
default int getIconHeight()
说明从接口Icon复制返回图标的高度。- Specified by:
-
getIconHeight在接口Icon - 结果
- 一个int指定图标的固定高度。
-
-