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 class
TypeLabelProvider.Scaling
-
Constructor Summary
Constructors Constructor Description TypeLabelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
float
getAngle(java.lang.Object element)
The angle of the element, which must be between -90 and 90, inclusive.Color
getColor(java.lang.Object element)
TheColor
of the given element, which must not benull
.FontData[]
getFontData(java.lang.Object element)
TheFontData
-array which defines the font of the given element.java.lang.String
getLabel(java.lang.Object element)
The label of the given element, which must not benull
.java.lang.String
getToolTip(java.lang.Object element)
Return the tool tip of the element, ornull
, if none.double
getWeight(java.lang.Object element)
The weight of the given element, which must be between 0 and 1 (inclusive).void
setAngles(java.util.List<java.lang.Float> angles)
void
setColors(java.util.List<RGB> newColors)
void
setFonts(java.util.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
-
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel(java.lang.Object element)
Description copied from interface:ICloudLabelProvider
The label of the given element, which must not benull
.- Specified by:
getLabel
in interfaceICloudLabelProvider
- Returns:
- the label of the given element
-
getWeight
public double getWeight(java.lang.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 interfaceICloudLabelProvider
- Returns:
- the weight of the given element
-
getColor
public Color getColor(java.lang.Object element)
Description copied from interface:ICloudLabelProvider
TheColor
of the given element, which must not benull
.- Specified by:
getColor
in interfaceICloudLabelProvider
- Returns:
- the color of the given element
-
getFontData
public FontData[] getFontData(java.lang.Object element)
Description copied from interface:ICloudLabelProvider
TheFontData
-array which defines the font of the given element. Each element must be provided with a unique array. Must not returnnull
.- Specified by:
getFontData
in interfaceICloudLabelProvider
- 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 interfaceIBaseLabelProvider
- Overrides:
dispose
in classBaseLabelProvider
-
setAngles
public void setAngles(java.util.List<java.lang.Float> angles)
- Specified by:
setAngles
in interfaceIEditableCloudLabelProvider
-
getAngle
public float getAngle(java.lang.Object element)
Description copied from interface:ICloudLabelProvider
The angle of the element, which must be between -90 and 90, inclusive.- Specified by:
getAngle
in interfaceICloudLabelProvider
- Returns:
- the angle of the given element
-
setColors
public void setColors(java.util.List<RGB> newColors)
- Specified by:
setColors
in interfaceIEditableCloudLabelProvider
-
setFonts
public void setFonts(java.util.List<FontData> newFonts)
- Specified by:
setFonts
in interfaceIEditableCloudLabelProvider
-
getToolTip
public java.lang.String getToolTip(java.lang.Object element)
Description copied from interface:ICloudLabelProvider
Return the tool tip of the element, ornull
, if none.- Specified by:
getToolTip
in interfaceICloudLabelProvider
- Returns:
- the tooltip of the given element
-
setScale
public void setScale(TypeLabelProvider.Scaling scaling)
-
-