Package org.eclipse.gef.cloudio.internal.ui.view

# Class TypeLabelProvider

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.gef.cloudio.internal.ui.view.TypeLabelProvider

All Implemented Interfaces:
  `ICloudLabelProvider`, `IEditableCloudLabelProvider`, `IBaseLabelProvider`

public class TypeLabelProvider extends BaseLabelProvider implements IEditableCloudLabelProvider

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`TypeLabelProvider.Scaling`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected List<Float>`
`angles`
`protected List<Color>`
`colorList`
`protected List<Font>`
`fontList`

## Constructor Summary

Constructors
Constructor
Description
`TypeLabelProvider()`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
`float`
`getAngle(Object element)`
The angle of the element, which must be between -90 and 90, inclusive.
`Color`
`getColor(Object element)`
The `Color` of the given element, which must not be `null`.
`FontData[]`
`getFontData(Object element)`
The `FontData`-array which defines the font of the given element.
`String`
`getLabel(Object element)`
The label of the given element, which must not be `null`.
`String`
`getToolTip(Object element)`
Return the tool tip of the element, or `null`, if none.
`double`
`getWeight(Object element)`
The weight of the given element, which must be between 0 and 1 (inclusive).
`void`
`setAngles(List<Float> angles)`
`void`
`setColors(List<RGB> newColors)`
`void`
`setFonts(List<FontData> newFonts)`
`void`
`setMaxOccurrences(int occurrences)`
`void`
`setMinOccurrences(int occurrences)`
`void`
`setScale(TypeLabelProvider.Scaling scaling)`

### Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider

`addListener, fireLabelProviderChanged, isLabelProperty, removeListener`

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider

`addListener, isLabelProperty, removeListener`

## Field Details

### colorList

protected List<Color> colorList

### fontList

protected List<Font> fontList

### angles

protected List<Float> angles

## Constructor Details

### TypeLabelProvider

public TypeLabelProvider()

## Method Details

### getLabel

public String getLabel(Object element)
Description copied from interface: `ICloudLabelProvider`
The label of the given element, which must not be `null`.

Specified by:
  `getLabel` in interface `ICloudLabelProvider`
Returns:
  the label of the given element

### getWeight

public double getWeight(Object element)
Description copied from interface: `ICloudLabelProvider`
The weight of the given element, which must be between 0 and 1 (inclusive).

Specified by:
  `getWeight` in interface `ICloudLabelProvider`
Returns:
  the weight of the given element

### getColor

public Color getColor(Object element)
Description copied from interface: `ICloudLabelProvider`
The `Color` of the given element, which must not be `null`.

Specified by:
  `getColor` in interface `ICloudLabelProvider`
Returns:
  the color of the given element

### getFontData

public FontData[] getFontData(Object element)
Description copied from interface: `ICloudLabelProvider`
The `FontData`-array which defines the font of the given element. Each element must be provided with a unique array. Must not return `null`.

Specified by:
  `getFontData` in interface `ICloudLabelProvider`
Returns:
  the font data for the given element

### setMaxOccurrences

public void setMaxOccurrences(int occurrences)

### setMinOccurrences

public void setMinOccurrences(int occurrences)

### dispose

public void dispose()

Specified by:
  `dispose` in interface `IBaseLabelProvider`
Overrides:
  `dispose` in class `BaseLabelProvider`

### setAngles

public void setAngles(List<Float> angles)

Specified by:
  `setAngles` in interface `IEditableCloudLabelProvider`

### getAngle

public float getAngle(Object element)
Description copied from interface: `ICloudLabelProvider`
The angle of the element, which must be between -90 and 90, inclusive.

Specified by:
  `getAngle` in interface `ICloudLabelProvider`
Returns:
  the angle of the given element

### setColors

public void setColors(List<RGB> newColors)

Specified by:
  `setColors` in interface `IEditableCloudLabelProvider`

### setFonts

public void setFonts(List<FontData> newFonts)

Specified by:
  `setFonts` in interface `IEditableCloudLabelProvider`

### getToolTip

public String getToolTip(Object element)
Description copied from interface: `ICloudLabelProvider`
Return the tool tip of the element, or `null`, if none.

Specified by:
  `getToolTip` in interface `ICloudLabelProvider`
Returns:
  the tooltip of the given element

### setScale

public void setScale(TypeLabelProvider.Scaling scaling)