Class XViewerColumn
java.lang.Object
org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn
- Direct Known Subclasses:
ExtendedViewerColumn
,XViewerValueColumn
public class XViewerColumn
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALIGN
protected java.lang.String
id
static java.lang.String
ID
protected java.lang.String
name
static java.lang.String
NAME
protected java.util.Map<java.lang.Long,java.lang.String>
preComputedValueMap
static java.lang.String
SHOW
static java.lang.String
SORT_FORWARD
static java.lang.String
WIDTH
static java.lang.String
XTREECOLUMN_TAG
-
Constructor Summary
Constructors Modifier Constructor Description protected
XViewerColumn()
XViewerColumn(java.lang.Object xViewer, java.lang.String xml)
XViewerColumn(java.lang.String id, java.lang.String name, int width, XViewerAlign align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, java.lang.String description)
-
Method Summary
Modifier and Type Method Description void
addElapsedTime(java.lang.Long elapsedTimeMs)
java.lang.String
averageValues(java.util.Collection<java.lang.String> values)
XViewerColumn
copy()
XViewer uses copies of column definitions so originals that are registered are not corrupted.protected void
copy(XViewerColumn fromXCol, XViewerColumn toXCol)
This method should be extended if new column needs to store (and copy) it's own data.boolean
equals(java.lang.Object obj)
XViewerAlign
getAlign()
java.lang.String
getAlignStoreName(XViewerAlign align)
XViewerAlign
getAlignStoreValue(java.lang.String str)
static java.lang.String
getColumnId(java.lang.String xml)
java.lang.String
getDescription()
java.lang.String
getDisplayName()
java.lang.Long
getElapsedTime()
java.lang.String
getId()
java.lang.String
getName()
java.lang.String
getPreComputedValue(java.lang.Long key)
java.util.Map<java.lang.Long,java.lang.String>
getPreComputedValueMap()
SortDataType
getSortDataType()
java.lang.String
getToolTip()
int
getWidth()
java.lang.Object
getXViewer()
int
hashCode()
boolean
isMultiColumnEditable()
boolean
isShow()
boolean
isSortForward()
boolean
isSummable()
void
resetElapsedTime()
void
reverseSort()
void
setAlign(XViewerAlign align)
void
setDescription(java.lang.String description)
void
setElapsedTime(java.lang.Long elapsedTimeMs)
void
setFromXml(java.lang.String xml)
void
setId(java.lang.String id)
void
setMultiColumnEditable(boolean multiColumnEditable)
void
setName(java.lang.String name)
void
setPreComputedValueMap(java.util.Map<java.lang.Long,java.lang.String> preComputedValueMap)
void
setShow(boolean show)
void
setSortDataType(SortDataType sortDataType)
void
setSortForward(boolean sortForward)
void
setToolTip(java.lang.String toolTip)
void
setWidth(int newWidth)
void
setXViewer(java.lang.Object xViewer)
java.lang.String
sumValues(java.util.Collection<java.lang.String> values)
java.lang.String
toString()
java.lang.String
toXml()
-
Field Details
-
id
protected java.lang.String id -
name
protected java.lang.String name -
preComputedValueMap
protected java.util.Map<java.lang.Long,java.lang.String> preComputedValueMap -
ID
public static final java.lang.String ID- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
WIDTH
public static final java.lang.String WIDTH- See Also:
- Constant Field Values
-
ALIGN
public static final java.lang.String ALIGN- See Also:
- Constant Field Values
-
SORT_FORWARD
public static final java.lang.String SORT_FORWARD- See Also:
- Constant Field Values
-
SHOW
public static final java.lang.String SHOW- See Also:
- Constant Field Values
-
XTREECOLUMN_TAG
public static final java.lang.String XTREECOLUMN_TAG- See Also:
- Constant Field Values
-
-
Constructor Details
-
XViewerColumn
protected XViewerColumn() -
XViewerColumn
public XViewerColumn(java.lang.String id, java.lang.String name, int width, XViewerAlign align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, java.lang.String description) -
XViewerColumn
public XViewerColumn(java.lang.Object xViewer, java.lang.String xml)
-
-
Method Details
-
copy
XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending XViewerColumn need to extend this method to copy extra stored fields -
copy
This method should be extended if new column needs to store (and copy) it's own data. -
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toXml
public java.lang.String toXml() -
setFromXml
public void setFromXml(java.lang.String xml) -
getColumnId
public static java.lang.String getColumnId(java.lang.String xml) -
getAlignStoreName
-
getAlignStoreValue
-
getDisplayName
public java.lang.String getDisplayName() -
getAlign
-
setAlign
-
getId
public java.lang.String getId() -
getWidth
public int getWidth() -
isSortForward
public boolean isSortForward() -
setSortForward
public void setSortForward(boolean sortForward) -
reverseSort
public void reverseSort() -
isShow
public boolean isShow() -
setShow
public void setShow(boolean show) -
getName
public java.lang.String getName() -
getSortDataType
-
setSortDataType
-
getToolTip
public java.lang.String getToolTip() -
setToolTip
public void setToolTip(java.lang.String toolTip) -
setName
public void setName(java.lang.String name) -
getDescription
public java.lang.String getDescription() -
setDescription
public void setDescription(java.lang.String description) -
isMultiColumnEditable
public boolean isMultiColumnEditable() -
setMultiColumnEditable
public void setMultiColumnEditable(boolean multiColumnEditable) -
setWidth
public void setWidth(int newWidth) -
isSummable
public boolean isSummable() -
sumValues
public java.lang.String sumValues(java.util.Collection<java.lang.String> values) -
averageValues
public java.lang.String averageValues(java.util.Collection<java.lang.String> values) -
setId
public void setId(java.lang.String id) -
getPreComputedValue
public java.lang.String getPreComputedValue(java.lang.Long key) -
getXViewer
public java.lang.Object getXViewer() -
setXViewer
public void setXViewer(java.lang.Object xViewer) -
getPreComputedValueMap
public java.util.Map<java.lang.Long,java.lang.String> getPreComputedValueMap() -
setPreComputedValueMap
public void setPreComputedValueMap(java.util.Map<java.lang.Long,java.lang.String> preComputedValueMap) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getElapsedTime
public java.lang.Long getElapsedTime()- Returns:
- time in milliseconds
-
addElapsedTime
public void addElapsedTime(java.lang.Long elapsedTimeMs) -
setElapsedTime
public void setElapsedTime(java.lang.Long elapsedTimeMs) -
resetElapsedTime
public void resetElapsedTime()
-