Class XViewerValueColumn
java.lang.Object
org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn
org.eclipse.nebula.widgets.xviewer.XViewerValueColumn
- All Implemented Interfaces:
IXViewerValueColumn
- Direct Known Subclasses:
XViewerComputedColumn
public class XViewerValueColumn extends XViewerColumn implements IXViewerValueColumn
This class provides XViewerColumns another mechanism to providing text, background color and foreground color instead
of through the XViewerLabelProvider. XViewerLabelProvider will call the provided routines to try to populate the
column and only if null/empty string will default to the normal label provider methods. This allows for XViwerColumns
to be shared between XViewers and/or have XViewerColumns provide their own values through the same class that defines
the column.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn
ALIGN, id, ID, name, NAME, preComputedValueMap, SHOW, SORT_FORWARD, WIDTH, XTREECOLUMN_TAG
-
Constructor Summary
Constructors Constructor Description XViewerValueColumn(java.lang.String id, java.lang.String name, int width, XViewerAlign align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, java.lang.String description)
XViewerValueColumn(XViewer viewer, java.lang.String xml)
-
Method Summary
Modifier and Type Method Description XViewerValueColumn
copy()
XViewer uses copies of column definitions so originals that are registered are not corrupted.org.eclipse.swt.graphics.Color
getBackground(java.lang.Object element, XViewerColumn xCol, int columnIndex)
java.lang.Object
getBackingData(java.lang.Object element, XViewerColumn xCol, int columnIndex)
Returns the backing data object for operations like sortingorg.eclipse.swt.graphics.Image
getColumnImage(java.lang.Object element, XViewerColumn column, int columnIndex)
java.lang.String
getColumnText(java.lang.Object element, XViewerColumn column, int columnIndex)
org.eclipse.swt.graphics.Font
getFont(java.lang.Object element, XViewerColumn viewerColumn, int columnIndex)
org.eclipse.swt.graphics.Color
getForeground(java.lang.Object element, XViewerColumn xCol, int columnIndex)
org.eclipse.jface.viewers.StyledString
getStyledText(java.lang.Object element, XViewerColumn viewerColumn, int columnIndex)
Methods inherited from class org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn
addElapsedTime, averageValues, copy, equals, getAlign, getAlignStoreName, getAlignStoreValue, getColumnId, getDescription, getDisplayName, getElapsedTime, getId, getName, getPreComputedValue, getPreComputedValueMap, getSortDataType, getToolTip, getWidth, getXViewer, hashCode, isMultiColumnEditable, isShow, isSortForward, isSummable, resetElapsedTime, reverseSort, setAlign, setDescription, setElapsedTime, setFromXml, setId, setMultiColumnEditable, setName, setPreComputedValueMap, setShow, setSortDataType, setSortForward, setToolTip, setWidth, setXViewer, sumValues, toString, toXml
-
Constructor Details
-
XViewerValueColumn
public XViewerValueColumn(java.lang.String id, java.lang.String name, int width, XViewerAlign align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, java.lang.String description) -
XViewerValueColumn
-
-
Method Details
-
copy
XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending XViewerValueColumn MUST extend this constructor so the correct sub-class is created- Overrides:
copy
in classXViewerColumn
-
getColumnImage
public org.eclipse.swt.graphics.Image getColumnImage(java.lang.Object element, XViewerColumn column, int columnIndex) throws XViewerException- Specified by:
getColumnImage
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getColumnText
public java.lang.String getColumnText(java.lang.Object element, XViewerColumn column, int columnIndex) throws XViewerException- Specified by:
getColumnText
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getBackground
public org.eclipse.swt.graphics.Color getBackground(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws XViewerException- Specified by:
getBackground
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getForeground
public org.eclipse.swt.graphics.Color getForeground(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws XViewerException- Specified by:
getForeground
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getStyledText
public org.eclipse.jface.viewers.StyledString getStyledText(java.lang.Object element, XViewerColumn viewerColumn, int columnIndex) throws XViewerException- Specified by:
getStyledText
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getFont
public org.eclipse.swt.graphics.Font getFont(java.lang.Object element, XViewerColumn viewerColumn, int columnIndex) throws XViewerException- Specified by:
getFont
in interfaceIXViewerValueColumn
- Throws:
XViewerException
-
getBackingData
public java.lang.Object getBackingData(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws java.lang.ExceptionDescription copied from interface:IXViewerValueColumn
Returns the backing data object for operations like sorting- Specified by:
getBackingData
in interfaceIXViewerValueColumn
- Throws:
java.lang.Exception
-