ColorTranslator
Inheritance: java.lang.Object
public final class ColorTranslator
Übersetzt Farben zu und von GDI+‑Color‑Strukturen. Diese Klasse kann nicht abgeleitet werden.
Methoden
| Methode | Beschreibung |
|---|---|
| fromHtml(String htmlColor) | Entnimmt die Farbe aus der HTML‑Farbe. |
| fromOle(int oleColor) | Entnimmt die Farbe aus der OLE‑Farbe. |
| fromWin32(int win32Color) | Entnimmt die Farbe aus der HTML‑Farbe. |
| toHtml(Color c) | Erstellt eine HTML‑Farbe aus der Farbe. |
| toOle(Color c) | Übersetzt OLE‑Farbe in Farbe. |
| toWin32(Color c) | Übersetzt die Farbe in Win32‑Farbe. |
fromHtml(String htmlColor)
public static Color fromHtml(String htmlColor)
Entnimmt die Farbe aus der HTML‑Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| htmlColor | java.lang.String | HTML‑Farbe. |
Returns: Color - The color.
fromOle(int oleColor)
public static Color fromOle(int oleColor)
Entnimmt die Farbe aus der OLE‑Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| oleColor | int | OLE‑Farbe. |
Returns: Color - The color.
fromWin32(int win32Color)
public static Color fromWin32(int win32Color)
Entnimmt die Farbe aus der HTML‑Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| win32Color | int | Win32‑Farbe. |
Returns: Color - The color.
toHtml(Color c)
public static String toHtml(Color c)
Erstellt eine HTML‑Farbe aus der Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| c | Color | Die Farbklasse. |
Returns: java.lang.String - Die HTML‑Stringfarbe.
toOle(Color c)
public static int toOle(Color c)
Übersetzt OLE‑Farbe in Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| c | Color | Die Farbe. |
Returns: int - Die OLE‑Farbe.
toWin32(Color c)
public static int toWin32(Color c)
Übersetzt die Farbe in Win32‑Farbe.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| c | Color | Die Farbe. |
Returns: int - Die Win32‑Farbe.