Package com.iizigo.text
Class TextTableLabelProvider
- All Implemented Interfaces:
- EventListener,- IBaseLabelProvider,- IToolTipProvider
Label provider for a string map property for a column table with several text table and filters.
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider- COLORS_ON_SELECTION, NO_FOCUS
- Constructor SummaryConstructorsConstructorDescription- TextTableLabelProvider- (ArrayList<IzFilter> filters) The TextTableLabelProvider being used for the TooltipTableViewer.
- Method SummaryModifier and TypeMethodDescription- void- dispose()Handles dispose.- getBackground- (Object element, int columnIndex) Provides a background color for the given element at the specified index- getColumnImage- (Object element, int columnIndex) Returns the label image for the given column of the given element.- getColumnText- (Object element, int columnIndex) Returns the label text for the given column of the given element.- getColumnTextProp- (KStringProp ksp, int columnIndex) Returns the label text for the given column of the given element.- getColumnTextProp- (Object element, int columnIndex) Returns the label text for the given column of the given element.- int- getErrorLevel- (Object element, int columnIndex) Get the error level for an element at column.Provides a font for the given element at index columnIndex.- getForeground- (Object element, int columnIndex) Provides a foreground color for the given element.- static Image- getImage- (KStringProp kstringProp) Gets the image of a KStringProp.- static ImageGets the image of a KString.Returns the image for the label of the given element.Returns the text for the label of the given element.- voidCalled to process an event.- voidSets the 2-column tree-table mode.- void- setInput- (ArrayList<EditorTextTable> textTables) Sets the input.- void- setItalicFont- (Font undefined) Sets the font to use for text ID's that are defined in other text tables but is not present in the main edited text table.- void- update- (ViewerCell cell) Updates the cell contents.- Methods inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider- erase, getColumn, getViewer, initialize, isOwnerDrawEnabled, measure, paint, prepareStyleRange, setOwnerDrawEnabled, styleDecoratedString- Methods inherited from class org.eclipse.jface.viewers.OwnerDrawLabelProvider- dispose, initialize, setOwnerDrawEnabled, setUpOwnerDraw- Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider- getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, useNativeToolTip- 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
- Constructor Details- TextTableLabelProviderThe TextTableLabelProvider being used for the TooltipTableViewer.
 
- Method Details- getImageGets the image of a KString.- Parameters:
- kstring- The KString, or null for none.
- Returns:
- The image, or null for none.
 
- getImageGets the image of a KStringProp.- Parameters:
- kstringProp- The KStringProp, or null for none.
- Returns:
- The image, or null for none.
 
- set2ColumnTreeTablepublic void set2ColumnTreeTable()Sets the 2-column tree-table mode.
- onEventCalled to process an event.- Specified by:
- onEventin interface- EventListener
- Parameters:
- event- The event.
 
- updateUpdates the cell contents.- Overrides:
- updatein class- StyledCellLabelProvider
 
- setInputSets the input. This is required to be called when multiple text tables are edited, not when just one is used.- Parameters:
- textTables- The text tables.
 
- disposepublic void dispose()Handles dispose.- Specified by:
- disposein interface- IBaseLabelProvider
- Overrides:
- disposein class- StyledCellLabelProvider
 
- setItalicFontSets the font to use for text ID's that are defined in other text tables but is not present in the main edited text table.
- getColumnImageReturns the label image for the given column of the given element.- Parameters:
- element- the object representing the entire row, or- nullindicating that no input object is set in the viewer
- columnIndex- the zero-based index of the column in which the label appears
- Returns:
- Image or nullif there is no image for the given object at columnIndex
 
- getColumnTextReturns the label text for the given column of the given element.- Parameters:
- element- the object representing the entire row, or- nullindicating that no input object is set in the viewer
- columnIndex- the zero-based index of the column in which the label appears
- Returns:
- String or nullif there is no text for the given object at columnIndex
 
- getColumnTextPropReturns the label text for the given column of the given element.- Parameters:
- element- the object representing the entire row, or- nullindicating that no input object is set in the viewer
- columnIndex- the zero-based index of the column in which the label appears
- Returns:
- String, KStringProp or nullif there is no text for the given object at columnIndex.
 
- getColumnTextPropReturns the label text for the given column of the given element.- Parameters:
- ksp- The element property.
- columnIndex- The zero-based index of the column in which the label appears
- Returns:
- String, KStringProp or nullif there is no text for the given object at columnIndex.
 
- getImageReturns the image for the label of the given element. The image is owned by the label provider and must not be disposed directly. Instead, dispose the label provider when no longer needed.- Parameters:
- element- the element for which to provide the label image
- Returns:
- the image used to label the element, or nullif there is no image for the given object
 
- getTextReturns the text for the label of the given element.- Parameters:
- element- the element for which to provide the label text
- Returns:
- the text string used to label the element, or nullif there is no text label for the given object
 
- getForegroundProvides a foreground color for the given element.- Parameters:
- element- the element
- columnIndex- the zero-based index of the column in which the color appears
- Returns:
- the foreground color for the element, or nullto use the default foreground color
 
- getBackgroundProvides a background color for the given element at the specified index- Parameters:
- element- the element
- columnIndex- the zero-based index of the column in which the color appears
- Returns:
- the background color for the element, or nullto use the default background color
 
- getFontProvides a font for the given element at index columnIndex.- Parameters:
- element- The element being displayed.
- columnIndex- The index of the column being displayed.
- Returns:
- Font to use, or null for none.
 
- getErrorLevelGet the error level for an element at column.- Parameters:
- element- The element.
- columnIndex- The zero-based index of the column in which error level is requested.
- Returns:
- -1 for normal, 0=informational (not verified), 1=warning (undefined entry), 2=error.