Package com.solibri.smc.api.ui.views
Interface CustomColumn<T>
-
- Type Parameters:
T
- the type of the row this column interacts with
- All Known Subinterfaces:
CheckingResultsColumn
public interface CustomColumn<T>
CustomColumn allows defining extra columns for existing internal Solibri tables. This interface is not intended to be implemented directly. The developer should implemented one of the child interfaces instead.- Since:
- 9.12.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Comparator<T>
getComparator()
Returns the comparator for this column.default String
getDescription()
Returns the description of this column.Icon
getHeaderIcon()
Return the icon for the header of this column.String
getHeaderText()
Return the text for the header of this column.Icon
getIcon(T row, boolean isSelected, boolean hasFocus)
Return the icon for the given row of this column.default MouseListener
getMouseListener(T row)
Returns the mouse listener defined for the cells of this column.default ListSelectionListener
getSelectionListener(Collection<T> oldRows, Collection<T> newRows)
Returns the list selection listener defined for the table.String
getText(T row, boolean isSelected, boolean hasFocus)
Return the text for the given row of this column.String
getUniqueId()
Returns the unique identifier of this column.
-
-
-
Method Detail
-
getUniqueId
String getUniqueId()
Returns the unique identifier of this column. Must be globally unique.- Returns:
- the unique identifier
- Since:
- 9.12.0
-
getDescription
default String getDescription()
Returns the description of this column. The default implementation returns value based on properties files value with key "DESCRIPTION". Returns the ID of the column if no property is found.- Returns:
- the description
- Since:
- 9.12.0
-
getHeaderIcon
Icon getHeaderIcon()
Return the icon for the header of this column.- Returns:
- the icon
- Since:
- 9.12.0
-
getHeaderText
String getHeaderText()
Return the text for the header of this column. Only needed if no icon is returned.- Returns:
- the header text
- Since:
- 9.12.0
-
getIcon
Icon getIcon(T row, boolean isSelected, boolean hasFocus)
Return the icon for the given row of this column.- Parameters:
row
- the rowisSelected
- true if the row is in selectionhasFocus
- true if the row has focus- Returns:
- the icon
- Since:
- 9.12.0
-
getText
String getText(T row, boolean isSelected, boolean hasFocus)
Return the text for the given row of this column. Only needed if no icon is returned.- Parameters:
row
- the rowisSelected
- true if the row is in selectionhasFocus
- true if the row has focus- Returns:
- the text
- Since:
- 9.12.0
-
getComparator
Comparator<T> getComparator()
Returns the comparator for this column. The comparator is used when the table is being ordered based on this column.- Returns:
- the comparator
- Since:
- 9.12.0
-
getMouseListener
default MouseListener getMouseListener(T row)
Returns the mouse listener defined for the cells of this column. The default implementation does nothing.- Parameters:
row
- the row- Returns:
- the mouse listener for given row
- Since:
- 9.12.0
-
getSelectionListener
default ListSelectionListener getSelectionListener(Collection<T> oldRows, Collection<T> newRows)
Returns the list selection listener defined for the table. This listener will be added in addition to the existing internal listener and possible other custom listeners.- Parameters:
oldRows
- the previous selection of rowsnewRows
- the new selection of rows- Returns:
- the listener
- Since:
- 9.12.0
-
-