Class ColumnChooserUtils
java.lang.Object
org.eclipse.nebula.widgets.nattable.columnChooser.ColumnChooserUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsIndex(List<ColumnEntry> entries, int indexToFind) static ColumnEntryfind(List<ColumnEntry> entries, int indexToFind) Search the collection for the entry with the given index.getColumnEntryIndexes(List<ColumnEntry> columnEntries) Get ColumnEntry indexes for the ColumnEntry objects.getColumnEntryPositions(List<ColumnEntry> columnEntries) Get ColumnEntry positions for the ColumnEntry objects.static StringgetColumnLabel(ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer, Integer columnIndex) static List<ColumnEntry>getHiddenColumnEntries(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer) static List<ColumnEntry>getVisibleColumnsEntries(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer) Get all visible columns and the corresponding labels in the header.static voidhideColumnEntries(List<ColumnEntry> removedItems, ColumnHideShowLayer hideShowLayer) static voidhideColumnPositions(List<Integer> removedPositions, ColumnHideShowLayer hideShowLayer) static voidshowColumnEntries(List<ColumnEntry> addedItems, ColumnHideShowLayer hideShowLayer) static voidshowColumnIndexes(List<Integer> addedColumnIndexes, ColumnHideShowLayer hideShowLayer)
-
Field Details
-
RENAMED_COLUMN_INDICATOR
- See Also:
-
-
Method Details
-
hideColumnEntries
public static void hideColumnEntries(List<ColumnEntry> removedItems, ColumnHideShowLayer hideShowLayer) -
hideColumnPositions
public static void hideColumnPositions(List<Integer> removedPositions, ColumnHideShowLayer hideShowLayer) -
showColumnEntries
public static void showColumnEntries(List<ColumnEntry> addedItems, ColumnHideShowLayer hideShowLayer) -
showColumnIndexes
public static void showColumnIndexes(List<Integer> addedColumnIndexes, ColumnHideShowLayer hideShowLayer) -
getHiddenColumnEntries
public static List<ColumnEntry> getHiddenColumnEntries(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer) -
getColumnLabel
public static String getColumnLabel(ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer, Integer columnIndex) - Parameters:
columnHeaderLayer- TheColumnHeaderLayerto retrieve a possible renamed column header label.columnHeaderDataLayer- The column headerDataLayerto retrieve the column header label from.columnIndex- The column index of the column whose label is requested.- Returns:
- The renamed column header name for the given column index (if the column has been renamed), the original column name otherwise.
-
getVisibleColumnsEntries
public static List<ColumnEntry> getVisibleColumnsEntries(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer) Get all visible columns and the corresponding labels in the header.- Parameters:
columnHideShowLayer- TheColumnHideShowLayerto get all visible columns.columnHeaderLayer- TheColumnHeaderLayerto retrieve a possible renamed column header label.columnHeaderDataLayer- The column headerDataLayerto retrieve the column header label from.- Returns:
- All visible columns and the corresponding labels in the header.
-
find
Search the collection for the entry with the given index.- Parameters:
entries- The collection ofColumnEntryobjects.indexToFind- The column index to find.- Returns:
- The
ColumnEntryfor the given column index.
-
getColumnEntryPositions
Get ColumnEntry positions for the ColumnEntry objects.- Parameters:
columnEntries- TheColumnEntryobjects.- Returns:
- The column positions of the provided
ColumnEntryobjects.
-
getColumnEntryIndexes
Get ColumnEntry indexes for the ColumnEntry objects.- Parameters:
columnEntries- TheColumnEntryobjects.- Returns:
- The column indexes of the provided
ColumnEntryobjects.
-
containsIndex
- Parameters:
entries- The collection ofColumnEntryobjects.indexToFind- The column index to find.- Returns:
trueif the list contains an entry with the given index.
-