ColorTranslator
Inheritance: java.lang.Object
public final class ColorTranslator
Översätter färger till och från GDI+ Color-strukturer. Denna klass kan inte ärvas.
Metoder
| Metod | Beskrivning |
|---|---|
| fromHtml(String htmlColor) | Hämtar färg från HTML-färgen. |
| fromOle(int oleColor) | Hämtar färg från OLE-färgen. |
| fromWin32(int win32Color) | Hämtar färg från HTML-färgen. |
| toHtml(Color c) | Skapar HTML-färg från färgen. |
| toOle(Color c) | Översätter OLE-färg till färg. |
| toWin32(Color c) | Översätter färgen till win32-färg. |
fromHtml(String htmlColor)
public static Color fromHtml(String htmlColor)
Hämtar färg från HTML-färgen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| htmlColor | java.lang.String | HTML-färg. |
Returns: Color - The color.
fromOle(int oleColor)
public static Color fromOle(int oleColor)
Hämtar färg från OLE-färgen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| oleColor | int | OLE-färg. |
Returns: Color - The color.
fromWin32(int win32Color)
public static Color fromWin32(int win32Color)
Hämtar färg från HTML-färgen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| win32Color | int | Win32-färg. |
Returns: Color - The color.
toHtml(Color c)
public static String toHtml(Color c)
Skapar HTML-färg från färgen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| c | Color | Färgklassen. |
Returns: java.lang.String - HTML-strängfärgen.
toOle(Color c)
public static int toOle(Color c)
Översätter OLE-färg till färg.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| c | Color | Färgen. |
Returns: int - OLE-färgen.
toWin32(Color c)
public static int toWin32(Color c)
Översätter färgen till win32-färg.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| c | Color | Färgen. |
Returns: int - win32-färgen.