The following code snippet creates a column with a ContextMenu that contains the fix action for the column:
TableColumn2<Person,String> firstNameCol = new TableColumn2<>("First Name");
firstNameCol.setCellValueFactory(p -> p.getValue().firstNameProperty());
ContextMenu cm = ActionUtils.createContextMenu(Arrays.asList(new ColumnFixAction(firstNameColumn)));
firstNameColumn.setContextMenu(cm);
ActionUtils#createContextMenu(java.util.Collection)
| Modifier and Type | Field and Description |
|---|---|
| private InvalidationListener |
| Access | Constructor and Description |
|---|---|
| public | ColumnFixAction(TableColumn<S, T>
The TableColumn to which the action is applied to column)Creates a fix action for a given column. |
| public | ColumnFixAction(TableColumn<S, T>
The TableColumn to which the action is applied to column, String the string to display in the text property of controls such
as name)MenuItem.Creates a fix action for a given column. |
| public | ColumnFixAction(TableColumn<S, T>
The TableColumn to which the action is applied to column, String the string to display in the text property of controls such
as name, Node MenuItem.the node to display in the graphic property of controls such
as image)CheckMenuItem.Creates a fix action for a given column. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private boolean | |
| private void | |
| public String |
| fixedColumnsListener | back to summary |
|---|---|
| private InvalidationListener fixedColumnsListener | |
| ColumnFixAction | back to summary |
|---|---|
| public ColumnFixAction(TableColumn<S, T> column) Creates a fix action for a given column. When fired, the action will fix
the column if is allowed and the column wasn't fixed yet, or unfix a fixed
column.
The action can be attached for instance to the
| |
| ColumnFixAction | back to summary |
|---|---|
| public ColumnFixAction(TableColumn<S, T> column, String name) Creates a fix action for a given column. When fired, the action will fix
the column if is allowed and the column wasn't fixed yet, or unfix a fixed
column.
The action can be attached for instance to the
| |
| ColumnFixAction | back to summary |
|---|---|
| public ColumnFixAction(TableColumn<S, T> column, String name, Node image) Creates a fix action for a given column. When fired, the action will fix
the column if is allowed and the column wasn't fixed yet, or unfix a fixed
column.
The action can be attached for instance to the
| |
| initialize | back to summary |
|---|---|
| private void initialize(TableColumn<S, T> column, TableView2<S> tableView) | |
| isFixedColumn | back to summary |
|---|---|
| private boolean isFixedColumn(TableColumn<S, T> column) | |
| reset | back to summary |
|---|---|
| private void reset(TableView2<S> tableView) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |