com.sibvisions.rad.ui.qt.impl
Class QtColor

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<QColor>
      extended by com.sibvisions.rad.ui.qt.impl.QtColor
All Implemented Interfaces:
IColor, IResource

public class QtColor
extends QtResource<QColor>
implements IColor

The QtColor class is used to encapsulate the access to all usable colors for QT widgets. It's also used to change or define new colors.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
Fields inherited from interface javax.rad.ui.IColor
CONTROL_ACTIVE_SELECTION_BACKGROUND, CONTROL_ACTIVE_SELECTION_FOREGROUND, CONTROL_ALTERNATE_BACKGROUND, CONTROL_BACKGROUND, CONTROL_FOREGROUND, CONTROL_INACTIVE_SELECTION_BACKGROUND, CONTROL_INACTIVE_SELECTION_FOREGROUND, CONTROL_MANDATORY_BACKGROUND, CONTROL_READ_ONLY_BACKGROUND
 
Constructor Summary
QtColor(int pRGBA)
          Constructs a color for a specific color value.
QtColor(QColor pColor)
          Constructs a color that is a copy of another color.
 
Method Summary
 int getAlpha()
          Returns the alpha component in the range 0-255.
 int getBlue()
          Returns the blue component in the range 0-255 in the default sRGB space.
 int getGreen()
          Returns the green component in the range 0-255 in the default sRGB space.
 int getRed()
          Returns the red component in the range 0-255 in the default sRGB space.
 int getRGBA()
          Returns the red, green, blue and alpha component as one integer.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

QtColor

public QtColor(QColor pColor)
Constructs a color that is a copy of another color.

Parameters:
pColor - the color to copy
See Also:
QtColor(QColor)

QtColor

public QtColor(int pRGBA)
Constructs a color for a specific color value.

Parameters:
pRGBA - the RGB value
See Also:
QColor.QColor(int)
Method Detail

getAlpha

public int getAlpha()
Returns the alpha component in the range 0-255.

Specified by:
getAlpha in interface IColor
Returns:
the alpha component.
See Also:
IColor.getRed(), IColor.getGreen(), IColor.getBlue()

getBlue

public int getBlue()
Returns the blue component in the range 0-255 in the default sRGB space.

Specified by:
getBlue in interface IColor
Returns:
the blue component.
See Also:
IColor.getRed(), IColor.getGreen(), IColor.getBlue()

getGreen

public int getGreen()
Returns the green component in the range 0-255 in the default sRGB space.

Specified by:
getGreen in interface IColor
Returns:
the green component.
See Also:
IColor.getRed(), IColor.getGreen(), IColor.getBlue()

getRed

public int getRed()
Returns the red component in the range 0-255 in the default sRGB space.

Specified by:
getRed in interface IColor
Returns:
the red component.
See Also:
IColor.getRed(), IColor.getGreen(), IColor.getBlue()

getRGBA

public int getRGBA()
Returns the red, green, blue and alpha component as one integer. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue).

Specified by:
getRGBA in interface IColor
Returns:
the red, green, blue and alpha component as one integer.
See Also:
IColor.getRed(), IColor.getGreen(), IColor.getBlue()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.