Top Description Inners Fields Constructors Methods
org.controlsfx.dialog

public Class CommandLinksDialog

extends Dialog<ButtonType>
Class Inheritance
Static Imports
impl.org.controlsfx.i18n.Localization.getString

Dialog containing command links.

Command links are similar to radio buttons. They are used to select from a set of mutually exclusive, related choices.
Like radio buttons, command links are always presented in sets, never individually.
Usage example:
  1. 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);
  2. Initialize the dialog with the list of command link buttons:
    CommandLinksDialog dialog = new CommandLinksDialog(links);
  3. Add dialog title and header content text as appropriate:
    dialog.setTitle("Microsoft Windows");
    dialog.getDialogPane().setContentText("Windows Explorer is not responding");

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CommandLinksDialog.CommandLinksButtonType

Command link type buttons to be used in CommandLinksDialogs.

Field Summary

Modifier and TypeField and Description
private Label
private static final int
private GridPane
private final Map<ButtonType, CommandLinksDialog.CommandLinksButtonType>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
private void
private Button
private void
private void
Inherited from javafx.scene.control.Dialog:
addEventFilteraddEventHandlerbuildEventDispatchChainclosecontentTextPropertydialogPanePropertygetContentTextgetDialogPanegetGraphicgetHeaderTextgetHeightgetModalitygetOnCloseRequestgetOnHiddengetOnHidinggetOnShowinggetOnShowngetOwnergetResultgetResultConvertergetTitlegetWidthgetXgetYgraphicPropertyheaderTextPropertyheightPropertyhideinitModalityinitOwnerinitStyleisResizableisShowingonCloseRequestPropertyonHiddenPropertyonHidingPropertyonShowingPropertyonShownPropertyremoveEventFilterremoveEventHandlerresizablePropertyresultConverterPropertyresultPropertysetContentTextsetDialogPanesetGraphicsetHeaderTextsetHeightsetOnCloseRequestsetOnHiddensetOnHidingsetOnShowingsetOnShownsetResizablesetResultsetResultConvertersetTitlesetWidthsetXsetYshowshowAndWaitshowingPropertytitlePropertywidthPropertyxPropertyyProperty

Field Detail

contentTextLabelback to summary
private Label contentTextLabel
gapSizeback to summary
private static final int gapSize
gridback to summary
private GridPane grid
typeMapback to summary
private final Map<ButtonType, CommandLinksDialog.CommandLinksButtonType> typeMap

Constructor Detail

CommandLinksDialogback to summary
public CommandLinksDialog(CommandLinksDialog.CommandLinksButtonType... links)
CommandLinksDialogback to summary
public CommandLinksDialog(List<CommandLinksDialog.CommandLinksButtonType> links)

Method Detail

addLinkToDialogback to summary
private void addLinkToDialog(DialogPane dialogPane, CommandLinksDialog.CommandLinksButtonType link)
createCommandLinksButtonback to summary
private Button createCommandLinksButton(ButtonType buttonType)
updateContentTextback to summary
private void updateContentText()
updateGridback to summary
private void updateGrid()
org.controlsfx.dialog back to summary

public Class CommandLinksDialog.CommandLinksButtonType

extends Object
Class Inheritance
  • java.lang.Object
  • org.controlsfx.dialog.CommandLinksDialog.CommandLinksButtonType

Command link type buttons to be used in CommandLinksDialogs.

Field Summary

Modifier and TypeField and Description
private final ButtonType
private final Node
private boolean
private final String

Constructor Summary

AccessConstructor and Description
public
CommandLinksButtonType(String text, boolean isDefault)

public
CommandLinksButtonType(String text, String longText, boolean isDefault)

public
CommandLinksButtonType(String text, String longText, Node graphic, boolean isDefault)

private
private
private
CommandLinksButtonType(ButtonType buttonType, String longText, Node graphic)

Method Summary

Modifier and TypeMethod and Description
private static ButtonBar.ButtonData
buildButtonData(boolean isDeafault)

public ButtonType
public Node
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

buttonTypeback to summary
private final ButtonType buttonType
graphicback to summary
private final Node graphic
isHiddenback to summary
private boolean isHidden
longTextback to summary
private final String longText

Constructor Detail

CommandLinksButtonTypeback to summary
public CommandLinksButtonType(String text, boolean isDefault)
CommandLinksButtonTypeback to summary
public CommandLinksButtonType(String text, String longText, boolean isDefault)
CommandLinksButtonTypeback to summary
public CommandLinksButtonType(String text, String longText, Node graphic, boolean isDefault)
CommandLinksButtonTypeback to summary
private CommandLinksButtonType(ButtonType buttonType)
CommandLinksButtonTypeback to summary
private CommandLinksButtonType(ButtonType buttonType, String longText)
CommandLinksButtonTypeback to summary
private CommandLinksButtonType(ButtonType buttonType, String longText, Node graphic)

Method Detail

buildButtonDataback to summary
private static ButtonBar.ButtonData buildButtonData(boolean isDeafault)
getButtonTypeback to summary
public ButtonType getButtonType()
getGraphicback to summary
public Node getGraphic()
getLongTextback to summary
public String getLongText()