- java.lang.Object
-
- javafx.scene.control.Dialog<ButtonType>
-
- org.controlsfx.dialog.CommandLinksDialog
-
- All Implemented Interfaces:
EventTarget
public class CommandLinksDialog extends Dialog<ButtonType>
Command links are similar to radio buttons. They are used to select from a set of mutually exclusive, related choices.Dialog
containing command links.
Like radio buttons, command links are always presented in sets, never individually.
Usage example:- Create a list of
command link buttons
that represent the different choices:CommandLinksButtonType restartLink = new CommandLinksButtonType("Restart the program", false); CommandLinksButtonType closeLink = new CommandLinksButtonType("Close the program", false); CommandLinksButtonType waitLink = new CommandLinksButtonType("Wait for the program to respond", "This is the default option", true); List<CommandLinksButtonType> links = Arrays.asList(restartLink, closeLink, waitLink);
- Initialize the dialog with the list of command link buttons:
CommandLinksDialog dialog = new CommandLinksDialog(links);
- Add dialog title and header content text as appropriate:
dialog.setTitle("Microsoft Windows"); dialog.getDialogPane().setContentText("Windows Explorer is not responding");
-
-
Property Summary
-
Properties inherited from class javafx.scene.control.Dialog
contentText, dialogPane, graphic, headerText, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, resizable, resultConverter, result, showing, title, width, x, y
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandLinksDialog.CommandLinksButtonType
Command link type buttons to be used inCommandLinksDialog
s.
-
Constructor Summary
Constructors Constructor Description CommandLinksDialog(List<CommandLinksDialog.CommandLinksButtonType> links)
CommandLinksDialog(CommandLinksDialog.CommandLinksButtonType... links)
-
Method Summary
-
Methods inherited from class javafx.scene.control.Dialog
buildEventDispatchChain, close, contentTextProperty, dialogPaneProperty, getContentText, getDialogPane, getGraphic, getHeaderText, getHeight, getModality, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOwner, getResult, getResultConverter, getTitle, getWidth, getX, getY, graphicProperty, headerTextProperty, heightProperty, hide, initModality, initOwner, initStyle, isResizable, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, resizableProperty, resultConverterProperty, resultProperty, setContentText, setDialogPane, setGraphic, setHeaderText, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResizable, setResult, setResultConverter, setTitle, setWidth, setX, setY, show, showAndWait, showingProperty, titleProperty, widthProperty, xProperty, yProperty
-
-
-
-
Constructor Detail
-
CommandLinksDialog
public CommandLinksDialog(CommandLinksDialog.CommandLinksButtonType... links)
-
CommandLinksDialog
public CommandLinksDialog(List<CommandLinksDialog.CommandLinksButtonType> links)
-
-