Class AbstractConfigurationLabelProvider
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.jface.viewers.BaseLabelProvider
-
- org.eclipse.jface.viewers.CellLabelProvider
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.AbstractConfigurationLabelProvider
-
- All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider,org.eclipse.jface.viewers.IColorProvider,org.eclipse.jface.viewers.ITableLabelProvider,org.eclipse.jface.viewers.IToolTipProvider
- Direct Known Subclasses:
ConfigurationLabelProvider
abstract class AbstractConfigurationLabelProvider extends org.eclipse.jface.viewers.CellLabelProvider implements org.eclipse.jface.viewers.ITableLabelProvider, org.eclipse.jface.viewers.IColorProviderSuper class for configuration label provider. This label provider is capable of determining correct:- Text (String)
- Images
- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.eclipse.swt.graphics.ImageADDprivate static org.eclipse.swt.graphics.ImageASSIGNEDprivate static org.eclipse.swt.graphics.ImageCHECKEDprivate GUIConfigurationconfigprivate static org.eclipse.swt.graphics.ColorERROR_COLORprivate static org.eclipse.swt.graphics.ColorNESTED_ELEMENT_COLORprivate static org.eclipse.swt.graphics.ImageNULLprotected static org.eclipse.swt.graphics.ImageREMOVEprivate static org.eclipse.swt.graphics.ImageUNCHECKEDprivate static org.eclipse.swt.graphics.ImageUNFROZEN
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConfigurationLabelProvider(GUIConfiguration config)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ColumnTypecolumType(int columnIndex)Matching the given column index to the correct column type.org.eclipse.swt.graphics.ColorgetBackground(java.lang.Object element)org.eclipse.swt.graphics.ImagegetColumnImage(java.lang.Object element, int columnIndex)java.lang.StringgetColumnText(java.lang.Object element, int columnIndex)protected GUIConfigurationgetConfiguration()Getter of the configuration edited by the related editor.org.eclipse.swt.graphics.ColorgetForeground(java.lang.Object element)protected abstract org.eclipse.swt.graphics.ImagegetSpecializedColumnImage(GUIVariable var, int columnIndex)This method is for extending thegetColumnImage(Object, int)method.protected abstract java.lang.StringgetSpecializedColumnText(GUIVariable var, int columnIndex)This method is for extending thegetColumnText(Object, int)method.intgetToolTipDisplayDelayTime(java.lang.Object object)org.eclipse.swt.graphics.PointgetToolTipShift(java.lang.Object object)java.lang.StringgetToolTipText(java.lang.Object element)intgetToolTipTimeDisplayed(java.lang.Object object)voidupdate(org.eclipse.jface.viewers.ViewerCell cell)-
Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider
dispose, getToolTipBackgroundColor, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipStyle, initialize, useNativeToolTip
-
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListener
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Field Detail
-
ADD
protected static final org.eclipse.swt.graphics.Image ADD
-
REMOVE
protected static final org.eclipse.swt.graphics.Image REMOVE
-
UNCHECKED
private static final org.eclipse.swt.graphics.Image UNCHECKED
-
ASSIGNED
private static final org.eclipse.swt.graphics.Image ASSIGNED
-
NULL
private static final org.eclipse.swt.graphics.Image NULL
-
CHECKED
private static final org.eclipse.swt.graphics.Image CHECKED
-
UNFROZEN
private static final org.eclipse.swt.graphics.Image UNFROZEN
-
ERROR_COLOR
private static final org.eclipse.swt.graphics.Color ERROR_COLOR
-
NESTED_ELEMENT_COLOR
private static final org.eclipse.swt.graphics.Color NESTED_ELEMENT_COLOR
-
config
private GUIConfiguration config
-
-
Constructor Detail
-
AbstractConfigurationLabelProvider
protected AbstractConfigurationLabelProvider(GUIConfiguration config)
Sole constructor for this class.- Parameters:
config- The configuration, which should be edited in the related editor of this label provider.
-
-
Method Detail
-
getConfiguration
protected final GUIConfiguration getConfiguration()
Getter of the configuration edited by the related editor.- Returns:
- The configuration edited by this editor.
-
update
public void update(org.eclipse.jface.viewers.ViewerCell cell)
- Specified by:
updatein classorg.eclipse.jface.viewers.CellLabelProvider
-
getColumnText
public java.lang.String getColumnText(java.lang.Object element, int columnIndex)- Specified by:
getColumnTextin interfaceorg.eclipse.jface.viewers.ITableLabelProvider
-
getForeground
public org.eclipse.swt.graphics.Color getForeground(java.lang.Object element)
- Specified by:
getForegroundin interfaceorg.eclipse.jface.viewers.IColorProvider
-
getBackground
public org.eclipse.swt.graphics.Color getBackground(java.lang.Object element)
- Specified by:
getBackgroundin interfaceorg.eclipse.jface.viewers.IColorProvider
-
getColumnImage
public org.eclipse.swt.graphics.Image getColumnImage(java.lang.Object element, int columnIndex)- Specified by:
getColumnImagein interfaceorg.eclipse.jface.viewers.ITableLabelProvider
-
columType
protected abstract ColumnType columType(int columnIndex)
Matching the given column index to the correct column type.- Parameters:
columnIndex- The current column index of the current cell.- Returns:
- The correct column type according to the given index.
-
getSpecializedColumnText
protected abstract java.lang.String getSpecializedColumnText(GUIVariable var, int columnIndex)
This method is for extending thegetColumnText(Object, int)method.- Parameters:
var- theGUIVariablerepresented by the entire rowcolumnIndex- the zero-based index of the column in which the label appears- Returns:
- String or or
nullif there is no text for the given object at columnIndex
-
getSpecializedColumnImage
protected abstract org.eclipse.swt.graphics.Image getSpecializedColumnImage(GUIVariable var, int columnIndex)
This method is for extending thegetColumnImage(Object, int)method.- Parameters:
var- theGUIVariablerepresented by the entire rowcolumnIndex- the zero-based index of the column in which the label appears- Returns:
- An Image or or
nullif there is no Image for the given object at columnIndex
-
getToolTipText
public java.lang.String getToolTipText(java.lang.Object element)
- Specified by:
getToolTipTextin interfaceorg.eclipse.jface.viewers.IToolTipProvider- Overrides:
getToolTipTextin classorg.eclipse.jface.viewers.CellLabelProvider
-
getToolTipShift
public org.eclipse.swt.graphics.Point getToolTipShift(java.lang.Object object)
- Overrides:
getToolTipShiftin classorg.eclipse.jface.viewers.CellLabelProvider
-
getToolTipDisplayDelayTime
public int getToolTipDisplayDelayTime(java.lang.Object object)
- Overrides:
getToolTipDisplayDelayTimein classorg.eclipse.jface.viewers.CellLabelProvider
-
getToolTipTimeDisplayed
public int getToolTipTimeDisplayed(java.lang.Object object)
- Overrides:
getToolTipTimeDisplayedin classorg.eclipse.jface.viewers.CellLabelProvider
-
-