public class ColumnFixAction extends Action
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);
| Constructor and Description |
|---|
ColumnFixAction(javafx.scene.control.TableColumn column)
Creates a fix action for a given column.
|
ColumnFixAction(javafx.scene.control.TableColumn column,
java.lang.String name)
Creates a fix action for a given column.
|
ColumnFixAction(javafx.scene.control.TableColumn column,
java.lang.String name,
javafx.scene.Node image)
Creates a fix action for a given column.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString() |
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, textPropertypublic ColumnFixAction(javafx.scene.control.TableColumn column)
ContextMenu
of the column.column - The TableColumn to which the action is applied topublic ColumnFixAction(javafx.scene.control.TableColumn column,
java.lang.String name)
ContextMenu
of the column.column - The TableColumn to which the action is applied toname - the string to display in the text property of controls such
as MenuItem.public ColumnFixAction(javafx.scene.control.TableColumn column,
java.lang.String name,
javafx.scene.Node image)
ContextMenu
of the column.column - The TableColumn to which the action is applied toname - the string to display in the text property of controls such
as MenuItem.image - the node to display in the graphic property of controls such
as CheckMenuItem.