Package org.eclipse.birt.chart.model.attribute

# Interface ColorDefinition

All Superinterfaces:
  `org.eclipse.emf.ecore.EObject`, `Fill`, `IChartObject`, `org.eclipse.emf.common.notify.Notifier`

All Known Implementing Classes:
  `ColorDefinitionImpl`

public interface ColorDefinition extends Fill
A representation of the model object 'Color Definition'. ColorDefinition extends the type Fill to devote itself to representing a ARGB color.

The following features are supported:

- `Transparency`
- `Red`
- `Green`
- `Blue`

See Also:
  - `AttributePackage.getColorDefinition()`

## Method Summary

Modifier and Type
Method
Description
`ColorDefinition`
`brighter()`
NOTE: Manually written
`ColorDefinition`
`copyInstance()`
`ColorDefinition`
`darker()`
NOTE: Manually written
`int`
`getBlue()`
Returns the value of the 'Blue' attribute.
`int`
`getGreen()`
Returns the value of the 'Green' attribute.
`int`
`getRed()`
Returns the value of the 'Red' attribute.
`int`
`getTransparency()`
Returns the value of the 'Transparency' attribute.
`void`
`invert()`
Inverts the existing color (XORed with 0xFF).
`boolean`
`isSetBlue()`
Returns whether the value of the '`Blue`' attribute is set.
`boolean`
`isSetGreen()`
Returns whether the value of the '`Green`' attribute is set.
`boolean`
`isSetRed()`
Returns whether the value of the '`Red`' attribute is set.
`boolean`
`isSetTransparency()`
Returns whether the value of the '`Transparency`' attribute is set.
`ColorDefinition`
`opaque()`
NOTE: Manually written
`void`
`set(int iRed, int iGreen, int iBlue)`
Convenience method to set all three components for the color.
`void`
`set(int iRed, int iGreen, int iBlue, int iAlpha)`
Convenience method to set the three components as well as transparency for the color.
`void`
`setBlue(int value)`
Sets the value of the '`Blue`' attribute.
`void`
`setGreen(int value)`
Sets the value of the '`Green`' attribute.
`void`
`setRed(int value)`
Sets the value of the '`Red`' attribute.
`void`
`setTransparency(int value)`
Sets the value of the '`Transparency`' attribute.
`ColorDefinition`
`translucent()`
NOTE: Manually written
`ColorDefinition`
`transparent()`
NOTE: Manually written
`void`
`unsetBlue()`
Unsets the value of the '`Blue`' attribute.
`void`
`unsetGreen()`
Unsets the value of the '`Green`' attribute.
`void`
`unsetRed()`
Unsets the value of the '`Red`' attribute.
`void`
`unsetTransparency()`
Unsets the value of the '`Transparency`' attribute.

### Methods inherited from interface org.eclipse.emf.ecore.EObject

`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

### Methods inherited from interface org.eclipse.birt.chart.model.attribute.Fill

`getType, isSetType, setType, unsetType`

### Methods inherited from interface org.eclipse.emf.common.notify.Notifier

`eAdapters, eDeliver, eNotify, eSetDeliver`

## Method Details

### getTransparency

int getTransparency()
Returns the value of the 'Transparency' attribute. Gets the transparency for the color Specifies the transparency for the color.

Returns:
  the value of the 'Transparency' attribute.
See Also:
  - `isSetTransparency()`
  - `unsetTransparency()`
  - `setTransparency(int)`
  - `AttributePackage.getColorDefinition_Transparency()`

### setTransparency

void setTransparency(int value)
Sets the value of the '`Transparency`' attribute. Sets the transparency for the color.

Parameters:
  `value` - the new value of the 'Transparency' attribute.
See Also:
  - `isSetTransparency()`
  - `unsetTransparency()`
  - `getTransparency()`

### unsetTransparency

void unsetTransparency()
Unsets the value of the '`Transparency`' attribute.

See Also:
  - `isSetTransparency()`
  - `getTransparency()`
  - `setTransparency(int)`

### isSetTransparency

boolean isSetTransparency()
Returns whether the value of the '`Transparency`' attribute is set.

Returns:
  whether the value of the 'Transparency' attribute is set.
See Also:
  - `unsetTransparency()`
  - `getTransparency()`
  - `setTransparency(int)`

### getRed

int getRed()
Returns the value of the 'Red' attribute. Specifies the 'Red' component for the color.

Returns:
  the value of the 'Red' attribute.
See Also:
  - `isSetRed()`
  - `unsetRed()`
  - `setRed(int)`
  - `AttributePackage.getColorDefinition_Red()`

### setRed

void setRed(int value)
Sets the value of the '`Red`' attribute. Sets the 'Red' component for the color.

Parameters:
  `value` - the new value of the 'Red' attribute.
See Also:
  - `isSetRed()`
  - `unsetRed()`
  - `getRed()`

### unsetRed

void unsetRed()
Unsets the value of the '`Red`' attribute.

See Also:
  - `isSetRed()`
  - `getRed()`
  - `setRed(int)`

### isSetRed

boolean isSetRed()
Returns whether the value of the '`Red`' attribute is set.

Returns:
  whether the value of the 'Red' attribute is set.
See Also:
  - `unsetRed()`
  - `getRed()`
  - `setRed(int)`

### getBlue

int getBlue()
Returns the value of the 'Blue' attribute. Specifies the 'Blue' component for the color.

Returns:
  the value of the 'Blue' attribute.
See Also:
  - `isSetBlue()`
  - `unsetBlue()`
  - `setBlue(int)`
  - `AttributePackage.getColorDefinition_Blue()`

### setBlue

void setBlue(int value)
Sets the value of the '`Blue`' attribute. Sets the 'Blue' component for the color.

Parameters:
  `value` - the new value of the 'Blue' attribute.
See Also:
  - `isSetBlue()`
  - `unsetBlue()`
  - `getBlue()`

### unsetBlue

void unsetBlue()
Unsets the value of the '`Blue`' attribute.

See Also:
  - `isSetBlue()`
  - `getBlue()`
  - `setBlue(int)`

### isSetBlue

boolean isSetBlue()
Returns whether the value of the '`Blue`' attribute is set.

Returns:
  whether the value of the 'Blue' attribute is set.
See Also:
  - `unsetBlue()`
  - `getBlue()`
  - `setBlue(int)`

### getGreen

int getGreen()
Returns the value of the 'Green' attribute. Specifies the 'Green' component for the color.

Returns:
  the value of the 'Green' attribute.
See Also:
  - `isSetGreen()`
  - `unsetGreen()`
  - `setGreen(int)`
  - `AttributePackage.getColorDefinition_Green()`

### setGreen

void setGreen(int value)
Sets the value of the '`Green`' attribute. Sets the 'Green' component for the color.

Parameters:
  `value` - the new value of the 'Green' attribute.
See Also:
  - `isSetGreen()`
  - `unsetGreen()`
  - `getGreen()`

### unsetGreen

void unsetGreen()
Unsets the value of the '`Green`' attribute.

See Also:
  - `isSetGreen()`
  - `getGreen()`
  - `setGreen(int)`

### isSetGreen

boolean isSetGreen()
Returns whether the value of the '`Green`' attribute is set.

Returns:
  whether the value of the 'Green' attribute is set.
See Also:
  - `unsetGreen()`
  - `getGreen()`
  - `setGreen(int)`

### set

void set(int iRed, int iGreen, int iBlue)
Convenience method to set all three components for the color. NOTE: Manually written

Parameters:
  `iRed` -
  `iGreen` -
  `iBlue` -

### set

void set(int iRed, int iGreen, int iBlue, int iAlpha)
Convenience method to set the three components as well as transparency for the color. NOTE: Manually written

Parameters:
  `iRed` -
  `iGreen` -
  `iBlue` -
  `iAlpha` -

### brighter

ColorDefinition brighter()
NOTE: Manually written

Returns:
  An instance of a brighter color relative to this color

### darker

ColorDefinition darker()
NOTE: Manually written

Returns:
  An instance of a darker color relative to this color

### translucent

ColorDefinition translucent()
NOTE: Manually written

Returns:
  A copy of the existing color but with alpha=127

### opaque

ColorDefinition opaque()
NOTE: Manually written

Returns:
  A copy of the existing color but with alpha=255

### invert

void invert()
Inverts the existing color (XORed with 0xFF).

### transparent

ColorDefinition transparent()
NOTE: Manually written

Returns:
  A copy of the existing color but with alpha=0

### copyInstance

ColorDefinition copyInstance()

Specified by:
  `copyInstance` in interface `Fill`
Specified by:
  `copyInstance` in interface `IChartObject`