java.lang.Object
org.controlsfx.control.action.Action
org.controlsfx.control.tableview2.actions.RowFixAction
- All Implemented Interfaces:
EventListener
,javafx.event.EventHandler<javafx.event.ActionEvent>
A custom action that can be added to the ContextMenu of any row in the
row header, allowing the user to fix or unfix the row.
This action has to be bound to a
CheckMenuItem
node.
Sample
The following code snippet provides a ContextMenu that contains the fix action for each row in the row header:
TableView2<Person> table = new TableView2<Person>();
table.setRowHeaderVisible(true);
table.setRowHeaderContextMenuFactory((i, person) ->
ActionUtils.createContextMenu(Arrays.asList(new RowFixAction(this, i))));
- See Also:
-
Property Summary
-
Constructor Summary
ConstructorsConstructorDescriptionRowFixAction
(TableView2 tableView, Integer row) Creates a fix action for a given column.RowFixAction
(TableView2 tableView, Integer row, String name) Creates a fix action for a given column.RowFixAction
(TableView2 tableView, Integer row, String name, javafx.scene.Node image) Creates a fix action for a given column. -
Method Summary
Methods inherited from class org.controlsfx.control.action.Action
acceleratorProperty, disabledProperty, getAccelerator, getEventHandler, getGraphic, getLongText, getProperties, getStyle, getStyleClass, getText, graphicProperty, handle, isDisabled, isSelected, lock, longTextProperty, selectedProperty, setAccelerator, setDisabled, setEventHandler, setGraphic, setLongText, setSelected, setStyle, setText, styleProperty, textProperty
-
Constructor Details
-
RowFixAction
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 theContextMenu
of the column.- Parameters:
tableView
- The TableView2 to which the action is applied torow
- The number of row
-
RowFixAction
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 theContextMenu
of the column.- Parameters:
tableView
- The TableView2 to which the action is applied torow
- The number of rowname
- the string to display in the text property of controls such asMenuItem
.
-
RowFixAction
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 theContextMenu
of the column.- Parameters:
tableView
- The TableView2 to which the action is applied torow
- The number of rowname
- the string to display in the text property of controls such asMenuItem
.image
- the node to display in the graphic property of controls such asCheckMenuItem
.
-
-
Method Details