gui
Class GUIUtils.IconScaler
java.lang.Object
gui.GUIUtils.IconScaler
- All Implemented Interfaces:
- javax.swing.Icon
- Enclosing class:
- GUIUtils
private static class GUIUtils.IconScaler
- extends java.lang.Object
- implements javax.swing.Icon
Diese Klasse dient dazu aus einem vorhandenen Icon ein neues Icon
herzustellen. Dazu werden neben dem vorhanden Icon die Skalierungsfaktoren angegeben.
Constructor Summary |
GUIUtils.IconScaler(javax.swing.Icon icon,
double a_scale)
Creates a new Icon that scales a given Icon with the given settings. |
GUIUtils.IconScaler(javax.swing.Icon icon,
double a_scaleWidth,
double a_scaleHeight)
|
Method Summary |
int |
getIconHeight()
|
int |
getIconWidth()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
private static void |
scale(java.awt.Graphics a_graphics,
double a_scaleWidth,
double a_scaleHeight)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GRAPHICS_2D
private static java.lang.Class GRAPHICS_2D
m_icon
private javax.swing.Icon m_icon
m_scaleWidth
private double m_scaleWidth
m_scaleHeight
private double m_scaleHeight
GUIUtils.IconScaler
public GUIUtils.IconScaler(javax.swing.Icon icon,
double a_scale)
- Creates a new Icon that scales a given Icon with the given settings.
GUIUtils.IconScaler
public GUIUtils.IconScaler(javax.swing.Icon icon,
double a_scaleWidth,
double a_scaleHeight)
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface javax.swing.Icon
scale
private static void scale(java.awt.Graphics a_graphics,
double a_scaleWidth,
double a_scaleHeight)