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

MetodBeskrivning
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:

ParameterTypBeskrivning
htmlColorjava.lang.StringHTML-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:

ParameterTypBeskrivning
oleColorintOLE-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:

ParameterTypBeskrivning
win32ColorintWin32-färg.

Returns: Color - The color.

toHtml(Color c)

public static String toHtml(Color c)

Skapar HTML-färg från färgen.

Parameters:

ParameterTypBeskrivning
cColorFä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:

ParameterTypBeskrivning
cColorFärgen.

Returns: int - OLE-färgen.

toWin32(Color c)

public static int toWin32(Color c)

Översätter färgen till win32-färg.

Parameters:

ParameterTypBeskrivning
cColorFärgen.

Returns: int - win32-färgen.