Java Code Examples for javafx.scene.control.Label#setPadding()

The following examples show how to use javafx.scene.control.Label#setPadding() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainScene.java    From mars-sim with GNU General Public License v3.0 8 votes vote down vote up
/**
 * Creates the pause box to be displayed on the root pane.
 * 
 * @return VBox
 */
private VBox createPausePaneContent() {
	VBox vbox = new VBox();
	vbox.setPrefSize(150, 150);

	Label label = new Label("||");
	label.setAlignment(Pos.CENTER);
	label.setPadding(new Insets(10));
	label.setStyle("-fx-font-size: 48px; -fx-text-fill: cyan;");
	// label.setMaxWidth(250);
	label.setWrapText(true);

	Label label1 = new Label("ESC to resume");
	label1.setAlignment(Pos.CENTER);
	label1.setPadding(new Insets(2));
	label1.setStyle(" -fx-font: bold 11pt 'Corbel'; -fx-text-fill: cyan;");
	vbox.getChildren().addAll(label, label1);
	vbox.setAlignment(Pos.CENTER);

	return vbox;
}
 
Example 2
Source File: MainScene.java    From mars-sim with GNU General Public License v3.0 6 votes vote down vote up
public Label createLabelLeft(String name, String tip) {
	Label l = new Label(name);
	// upTimeLabel0.setEffect(blend);
	l.setAlignment(Pos.CENTER_RIGHT);
	l.setTextAlignment(TextAlignment.RIGHT);
	l.setStyle(LABEL_CSS_STYLE);
	l.setPadding(new Insets(1, 1, 1, 2));
	setQuickToolTip(l, tip);
	return l;
}
 
Example 3
Source File: DirectionsPane.java    From FXMaps with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
 * Adds a notification located at the top of the vertical pane, which 
 * displays warning or other information about the current API state.
 * (i.e. if its in Beta etc.)
 * 
 * @param message   the message to display
 */
public void addDirectionsBulletinPane(String message) {
    Label l = new Label(message);
    l.setBackground(new Background(
        new BackgroundFill(
            Color.color(
                Color.YELLOW.getRed(), 
                Color.YELLOW.getGreen(), 
                Color.YELLOW.getBlue(), 0.4d),
            new CornerRadii(5), 
            null)));
    l.setWrapText(true);
    l.setPrefWidth(200);
    l.setPadding(new Insets(5,5,5,5));
    directionsBox.getChildren().add(l);
}
 
Example 4
Source File: LineNumberFactory.java    From RichTextFX with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
public Node apply(int idx) {
    Val<String> formatted = nParagraphs.map(n -> format(idx+1, n));

    Label lineNo = new Label();
    lineNo.setFont(DEFAULT_FONT);
    lineNo.setBackground(DEFAULT_BACKGROUND);
    lineNo.setTextFill(DEFAULT_TEXT_FILL);
    lineNo.setPadding(DEFAULT_INSETS);
    lineNo.setAlignment(Pos.TOP_RIGHT);
    lineNo.getStyleClass().add("lineno");

    // bind label's text to a Val that stops observing area's paragraphs
    // when lineNo is removed from scene
    lineNo.textProperty().bind(formatted.conditionOnShowing(lineNo));

    return lineNo;
}
 
Example 5
Source File: ScriptingAspectEditor.java    From milkman with MIT License 6 votes vote down vote up
private Tab getTab(Supplier<String> getter, Consumer<String> setter, String title) {
	ContentEditor postEditor = new ContentEditor();
	postEditor.setEditable(true);
	postEditor.setContent(getter, setter);
	postEditor.setContentTypePlugins(Collections.singletonList(new JavascriptContentType()));
	postEditor.setContentType("application/javascript");
	postEditor.setHeaderVisibility(false);

	Tab postTab = new Tab("", postEditor);
	Label label = new Label(title);
	label.setRotate(90);
	label.setMinWidth(150);
	label.setMaxWidth(150);
	label.setMinHeight(40);
	label.setMaxHeight(40);
	label.setPadding(new Insets(0));
	postTab.setGraphic(label);
	return postTab;
}
 
Example 6
Source File: IntegerBaseManagedMenuItem.java    From tcMenu with Apache License 2.0 5 votes vote down vote up
/**
 * For integer items, we put controls on the form to increase and decrease the value using delta
 * value change messages back to the server. Notice we don't change the tree locally, rather we wait
 * for the menu to respond to the change.
 */
@Override
public Node createNodes(RemoteMenuController menuController) {
    itemLabel = new Label();
    itemLabel.setPadding(new Insets(3, 0, 3, 0));

    minusButton = new Button("<");
    plusButton = new Button(">");
    minusButton.setDisable(item.isReadOnly());
    plusButton.setDisable(item.isReadOnly());

    minusButton.setOnAction(e-> {
        if(waitingFor.isPresent()) return;
        waitingFor = Optional.of(menuController.sendDeltaUpdate(item, REDUCE));
    });

    minusButton.setOnMousePressed(e-> {
        repeating = RepeatTypes.REPEAT_DOWN_WAIT;
        lastRepeatStart = System.currentTimeMillis();
    });
    minusButton.setOnMouseReleased(e-> repeating = RepeatTypes.REPEAT_NONE);
    plusButton.setOnMousePressed(e-> {
        repeating = RepeatTypes.REPEAT_UP_WAIT;
        lastRepeatStart = System.currentTimeMillis();
    });
    plusButton.setOnMouseReleased(e-> repeating = RepeatTypes.REPEAT_NONE);
    plusButton.setOnAction(e-> {
        if(waitingFor.isPresent()) return;
        waitingFor = Optional.of(menuController.sendDeltaUpdate(item, INCREASE));
    });

    var border = new BorderPane();
    border.setLeft(minusButton);
    border.setRight(plusButton);
    border.setCenter(itemLabel);
    return border;
}
 
Example 7
Source File: MaterialMenuItem.java    From MSPaintIDE with MIT License 5 votes vote down vote up
public MaterialMenuItem() {
    label = new Label();

    label.setPrefWidth(180);
    label.setPadding(new Insets(0, 0, 0, 5));

    label.setContentDisplay(ContentDisplay.RIGHT);
    label.setGraphicTextGap(0);
    setGraphic(label);
}
 
Example 8
Source File: AbstractModalDialogTest.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
protected BorderPane getRootPane() {
    ModalDialog<?> modalDialog = getModalDialog();
    BorderPane sceneContent = new BorderPane();
    if (modalDialog != null) {
        String title = modalDialog.getTitle();
        String subTitle = modalDialog.getSubTitle();
        Node icon = modalDialog.getIcon();
        if (title != null && !"".equals(title)) {
            VBox titleBox = new VBox();
            Label titleLabel = new Label(title, icon);
            titleLabel.getStyleClass().add("modaldialog-title");
            titleBox.getChildren().add(titleLabel);
            if (subTitle != null) {
                Label subTitleLabel = new Label(subTitle);
                subTitleLabel.getStyleClass().add("modaldialog-subtitle");
                if (icon != null)
                    subTitleLabel.setPadding(new Insets(0, 0, 0, 20));
                titleBox.getChildren().add(subTitleLabel);
            }
            titleBox.getChildren().add(new Separator());
            sceneContent.setTop(titleBox);
        }
        sceneContent.setCenter(modalDialog.getContentPane());
    }
    return sceneContent;

}
 
Example 9
Source File: UpdateProgressWindow.java    From HubTurbo with GNU Lesser General Public License v3.0 5 votes vote down vote up
private Label createNoDownloadLabel() {
    Label noDownloadLabel = new Label();
    noDownloadLabel.setText(LABEL_NO_DOWNLOAD);
    noDownloadLabel.setPadding(new Insets(50));

    return noDownloadLabel;
}
 
Example 10
Source File: MainScene.java    From mars-sim with GNU General Public License v3.0 5 votes vote down vote up
public Label createBlendLabel(String s) {
	Label header_label = new Label(s);
	header_label.setStyle("-fx-text-fill: white; -fx-font-size: 13px; -fx-background-color:transparent;"
			+ "-fx-font-weight: bold;");
	header_label.setPadding(new Insets(3, 0, 1, 2));
	return header_label;
}
 
Example 11
Source File: MobileNotificationsView.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
private Label createMarketAlertPriceInfoPopupLabel(String text) {
    final Label label = new Label(text);
    label.setPrefWidth(300);
    label.setWrapText(true);
    label.setPadding(new Insets(10));
    return label;
}
 
Example 12
Source File: PopOver.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Creates a pop over with a label as the content node.
 */
public PopOver() {
    super();

    getStyleClass().add(DEFAULT_STYLE_CLASS);

    setAnchorLocation(AnchorLocation.WINDOW_TOP_LEFT);
    setOnHiding(new EventHandler<WindowEvent>() {
        @Override
        public void handle(WindowEvent evt) {
            setDetached(false);
        }
    });

    /*
     * Create some initial content.
     */
    Label label = new Label("<No Content>"); //$NON-NLS-1$
    label.setPrefSize(200, 200);
    label.setPadding(new Insets(4));
    setContentNode(label);

    ChangeListener<Object> repositionListener = new ChangeListener<Object>() {
        @Override
        public void changed(ObservableValue<? extends Object> value,
                            Object oldObject, Object newObject) {
            if (isShowing() && !isDetached()) {
                show(getOwnerNode(), targetX, targetY);
                adjustWindowLocation();
            }
        }
    };

    arrowSize.addListener(repositionListener);
    cornerRadius.addListener(repositionListener);
    arrowLocation.addListener(repositionListener);
    arrowIndent.addListener(repositionListener);
}
 
Example 13
Source File: ThreeDOM.java    From scenic-view with GNU General Public License v3.0 5 votes vote down vote up
private Tile3D from2Dto3D(SVNode root2D, Group root3D, double depth) {
    Tile3D childNode3D = null;
    // Currently, only work with internal usage. Remote is not yet possible, mainly due to the node.snapshot() calls
    if (ConnectorUtils.nodeClass(root2D).contains("SVRemoteNodeAdapter")) {
        Label label = new Label("The 3D view of ScenicView is only accessible when you invoke the tool from your source code. Remote access is not yet available.");
        label.setStyle("-fx-text-fill: #ff0000; -fx-font-size: 16pt;");
        label.setWrapText(true);
        label.setPadding(new Insets(10,10,10,10));
        controls.setExpanded(false);
        accordion.setExpandedPane(null);
        subSceneContainer.setCenter(label);
        return null;
    }
    Tile3D node3D = nodeToTile3D(root2D, FACTOR2D3D, depth);
    root3D.getChildren().add(node3D);
    depth += 3;
    List<SVNode> childrenUnmodifiable = root2D.getChildren();
    for (SVNode svnode : childrenUnmodifiable) {

        if (!ConnectorUtils.isNormalNode(svnode)) {
            continue;
        }
        Node node = svnode.getImpl();
        if (node.isVisible() && node instanceof Parent) {
            childNode3D = from2Dto3D(svnode, root3D, depth);
        } else if (node.isVisible()) {
            childNode3D = nodeToTile3D(svnode, FACTOR2D3D, depth);
            root3D.getChildren().add(childNode3D);

        }
        // Since 3D model is flat, keep "hierarchy" to child nodes
        if (childNode3D != null) {
            node3D.addChildrenTile(childNode3D);
        }
    }
    if (depth > maxDepth) {
        maxDepth = depth;
    }
    return node3D;
}
 
Example 14
Source File: HyperlinkWithIcon.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
public HyperlinkWithIcon(String text, AwesomeIcon awesomeIcon) {
    super(text);

    Label icon = new Label();
    AwesomeDude.setIcon(icon, awesomeIcon);
    icon.setMinWidth(20);
    icon.setOpacity(0.7);
    icon.getStyleClass().addAll("hyperlink", "no-underline");
    setPadding(new Insets(0));
    icon.setPadding(new Insets(0));

    setIcon(icon);
}
 
Example 15
Source File: TransactionTypeNodeProvider.java    From constellation with Apache License 2.0 5 votes vote down vote up
public TransactionTypeNodeProvider() {
    schemaLabel = new Label(SeparatorConstants.HYPHEN);
    schemaLabel.setPadding(new Insets(5));
    treeView = new TreeView<>();
    transactionTypes = new ArrayList<>();
    detailsView = new HBox();
    detailsView.setPadding(new Insets(5));
    startsWithRb = new RadioButton("Starts with");
    filterText = new TextField();

    setCellFactory();
}
 
Example 16
Source File: TakeOfferView.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
private Label createPopoverLabel(String text) {
    final Label label = new Label(text);
    label.setPrefWidth(300);
    label.setWrapText(true);
    label.setPadding(new Insets(10));
    return label;
}
 
Example 17
Source File: UICodePluginItem.java    From tcMenu with Apache License 2.0 4 votes vote down vote up
public UICodePluginItem(CodePluginManager mgr, CodePluginItem item, UICodeAction action, Consumer<CodePluginItem> evt) {
    super();

    this.eventHandler = evt;

    this.mgr = mgr;
    this.item = item;

    titleLabel = new Label(item.getDescription());
    titleLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 110%;");

    descriptionArea = new Label(item.getExtendedDescription());
    descriptionArea.setWrapText(true);
    descriptionArea.setAlignment(Pos.TOP_LEFT);
    descriptionArea.setPrefWidth(1900);

    whichPlugin = new Label("Plugin loading");
    whichPlugin.setStyle("-fx-font-size: 90%;");
    whichPlugin.setPadding(new Insets(10, 5, 5, 5));

    licenseLink = new Hyperlink("License unknown");
    licenseLink.setDisable(true);
    licenseLink.setPadding(new Insets(10, 0, 5, 0));
    licenseLink.setStyle("-fx-font-size: 90%;");

    vendorLink = new Hyperlink("Vendor unknown");
    vendorLink.setDisable(true);
    vendorLink.setPadding(new Insets(10, 0, 5, 0));
    vendorLink.setStyle("-fx-font-size: 90%;");

    docsLink = new Hyperlink("No Docs");
    docsLink.setDisable(true);
    docsLink.setPadding(new Insets(10, 0, 5, 0));
    docsLink.setStyle("-fx-font-size: 90%;");

    infoContainer = new HBox(5);
    infoContainer.setAlignment(Pos.CENTER_LEFT);
    infoContainer.getChildren().add(whichPlugin);
    infoContainer.getChildren().add(docsLink);
    infoContainer.getChildren().add(licenseLink);
    infoContainer.getChildren().add(vendorLink);

    innerBorder = new BorderPane();
    innerBorder.setPadding(new Insets(4));
    innerBorder.setTop(titleLabel);
    innerBorder.setCenter(descriptionArea);
    innerBorder.setBottom(infoContainer);

    actionButton = new Button(action == UICodeAction.CHANGE ? "Change" : "Select");
    actionButton.setStyle("-fx-font-size: 110%; -fx-font-weight: bold;");
    actionButton.setMaxSize(2000, 2000);
    actionButton.setOnAction(event-> eventHandler.accept(item));

    setRight(actionButton);
    setCenter(innerBorder);

    setItem(item);
}
 
Example 18
Source File: TitleBar.java    From Maus with GNU General Public License v3.0 4 votes vote down vote up
HBox getMenuBar(Stage stage) {
    MenuBar menuBar = new MenuBar();
    menuBar.getStylesheets().add(getClass().getResource("/css/global.css").toExternalForm());
    menuBar.getStyleClass().add("background");

    Label maus = (Label) Styler.styleAdd(new Label("\uD83D\uDC2D " + MausSettings.CURRENT_VERSION), "option-button");
    maus.setPadding(new Insets(5, 10, 5, 10));
    maus.setOnMouseClicked(event -> {
        String[] MausEasterEgg = {
                MausSettings.CURRENT_VERSION,
                "):",
                "Where's the cheese?",
                "#NotaRAT",
                "Please consider donating to Wikipedia",
                "Du haben keine Freunde",
                ":)",
                "Just don't get this shit detected",
                "Stop clicking here",
                "*CRASH*",
                "Whiskers",
                "BlackShades V.5",
                "1 bot = 1 prayer",
                "Why did you click here in the first place?",
                "Maus only continues if I get community feedback!",
                "INF3CTED!!11oneone!1oen",
                "Deditated Wam",
                "Meow",
                "┌(=^‥^=)┘",
                "(^._.^)ノ",
                "\uD83D\uDC31",
                "\uD83D\uDCA5",
                "❤ ❤ ❤",
                "\uD83D\uDC08",
                "\uD83D\uDC01",
                "\uD83D\uDC2D",
                "Cat got your tongue?",
                "Purrrr",
                "Luminosity Maus 1.5",
                "Spreche du Deutsche?",
                "Carrier pigeons are faster",
                "Duct Tape is more stable than this shit",
                "Cat got your tongue?",
                "Stay Tuned!",
                "We're in BETA!",
        };
        Random rn = new Random();
        int rnn = rn.nextInt(MausEasterEgg.length);
        maus.setText(MausEasterEgg[rnn]);
    });

    Label minimize = (Label) Styler.styleAdd(new Label("_"), "option-button");
    minimize.setPadding(new Insets(5, 10, 5, 10));
    minimize.setOnMouseClicked(event -> stage.setIconified(true));

    Label exit = (Label) Styler.styleAdd(new Label("X"), "option-button");
    exit.setPadding(new Insets(5, 10, 5, 10));
    exit.setOnMouseClicked(event -> {
        if (stage.equals(Maus.getPrimaryStage())) {
            Logger.log(Level.INFO, "Exit event detected. ");
            /* Only hide stage if Maus is set to be background persistent */
            if (MausSettings.BACKGROUND_PERSISTENT) {
                Maus.getPrimaryStage().hide();
            } else {
                Platform.exit();
                Maus.systemTray.remove(Maus.systemTray.getTrayIcons()[0]);
                System.exit(0);
            }
        } else {
            stage.close();
        }
    });

    HBox sep = Styler.hContainer();
    sep.setId("drag-bar");
    final Delta dragDelta = new Delta();
    sep.setOnMousePressed(mouseEvent -> {
        dragDelta.x = stage.getX() - mouseEvent.getScreenX();
        dragDelta.y = stage.getY() - mouseEvent.getScreenY();
    });
    sep.setOnMouseDragged(mouseEvent -> {
        stage.setX(mouseEvent.getScreenX() + dragDelta.x);
        stage.setY(mouseEvent.getScreenY() + dragDelta.y);
    });

    HBox hBox = Styler.hContainer(5, maus, sep, minimize, exit);
    hBox.setId("drag-bar");
    return hBox;
}
 
Example 19
Source File: ProfilerInfoBox.java    From chart-fx with Apache License 2.0 4 votes vote down vote up
/**
 * @param scene superordinate scene that should be monitored, 
 *              N.B. if {@code null} the ProfilerInfoBox own Scene where it is added to is being used
 * @param updateRateMillis static update rate in milli-seconds
 */
public ProfilerInfoBox(final Scene scene, final int updateRateMillis) {
    super();
    setCrumbFactory((TreeItem<VBox> param) -> new CustomBreadCrumbButton(param.getValue()));
    setAutoNavigationEnabled(false);

    final Label chevron = new Label(null, chevronIcon);
    chevron.setPadding(new Insets(3, 0, 4, 0));
    VBox.setVgrow(chevron, Priority.ALWAYS);

    final CustomLabel fxFPS = new CustomLabel();
    fxFPS.setTooltip(new Tooltip("internal JavaFX tick frame-rate (aka. pulse, usually around 60 FPS)"));
    final CustomLabel chartFPS = new CustomLabel();
    chartFPS.setTooltip(new Tooltip("(visible) frame update (usually <= 25 FPS"));
    final CustomLabel cpuLoadProcess = new CustomLabel();
    cpuLoadProcess.setTooltip(new Tooltip("CPU load of this process"));
    final CustomLabel cpuLoadSystem = new CustomLabel();
    cpuLoadProcess.setTooltip(new Tooltip("CPU system load (100% <-> 1 core fully loaded)"));

    final ChangeListener<? super Number> updateLabelListener = (ch, o, n) -> {
        final String fxRate = String.format("%4.1f", meter.getFxFrameRate());
        final String actualRate = String.format("%4.1f", meter.getActualFrameRate());
        final String cpuProcess = String.format("%5.1f", meter.getProcessCpuLoad());
        final String cpuSystem = String.format("%5.1f", meter.getSystemCpuLoad());

        if (meter.getFxFrameRate() < LEVEL_ERROR) {
            chevronIcon.setColor(Color.RED);
        } else if (meter.getFxFrameRate() < LEVEL_WARNING) {
            chevronIcon.setColor(Color.DARKORANGE);
        } else {
            chevronIcon.setColor(Color.BLACK);
        }

        fxFPS.setTextFiltered(String.format("%6s: %4s %s", "FX", fxRate, "FPS"));
        chartFPS.setTextFiltered(String.format("%6s: %4s %s", "actual", actualRate, "FPS"));
        cpuLoadProcess.setTextFiltered(String.format("%7s: %4s %s", "Process", cpuProcess, "%"));
        cpuLoadSystem.setTextFiltered(String.format("%7s: %4s %s", "System", cpuSystem, "%"));
    };

    final Label javaVersion = new CustomLabel(System.getProperty("java.vm.name") + " " + System.getProperty("java.version"));
    final Label javafxVersion = new CustomLabel("JavaFX: " + System.getProperty("javafx.runtime.version") /*+ " Chart-fx: " + System.getProperty("chartfx.version")*/);
    // TODO: add Chart-fx version (commit ID, release version)
    if (scene == null) {
        this.sceneProperty().addListener((ch, oldScene, newScene) -> {
            if (oldScene != null) {
                meter.fxFrameRateProperty().removeListener(updateLabelListener);
            }

            if (newScene != null) {
                meter = new SimplePerformanceMeter(newScene, updateRateMillis);
                meter.fxFrameRateProperty().addListener(updateLabelListener);
            }
        });
    } else {
        meter = new SimplePerformanceMeter(scene, updateRateMillis);
        meter.fxFrameRateProperty().addListener(updateLabelListener);
    }

    treeRoot = new TreeItem<>(new VBox(chevron));
    treeRoot.getValue().setId("ProfilerInfoBox-treeRoot");
    final TreeItem<VBox> fpsItem = new TreeItem<>(new VBox(fxFPS, chartFPS));
    fpsItem.getValue().setId("ProfilerInfoBox-fpsItem");
    final TreeItem<VBox> cpuItem = new TreeItem<>(new VBox(cpuLoadProcess, cpuLoadSystem));
    cpuItem.getValue().setId("ProfilerInfoBox-cpuItem");
    final TreeItem<VBox> versionItem = new TreeItem<>(new VBox(javaVersion, javafxVersion));
    versionItem.getValue().setId("ProfilerInfoBox-versionItem");
    treeRoot.getChildren().add(fpsItem);
    fpsItem.getChildren().add(cpuItem);
    cpuItem.getChildren().add(versionItem);

    setOnCrumbAction(updateSelectedCrumbActionListener());
    debugLevelProperty().addListener(updateSelectedCrumbLevelListener(fpsItem, cpuItem, versionItem));

    setSelectedCrumb(treeRoot);
}
 
Example 20
Source File: ReplayStage.java    From xframium-java with GNU General Public License v3.0 4 votes vote down vote up
public ReplayStage (Session session, Path path, Preferences prefs, Screen screen)
{
  this.prefs = prefs;

  final Label label = session.getHeaderLabel ();
  label.setFont (new Font ("Arial", 20));
  label.setPadding (new Insets (10, 10, 10, 10));                 // trbl

  boolean showTelnet = prefs.getBoolean ("ShowTelnet", false);
  boolean showExtended = prefs.getBoolean ("ShowExtended", false);

  final HBox checkBoxes = new HBox ();
  checkBoxes.setSpacing (15);
  checkBoxes.setPadding (new Insets (10, 10, 10, 10));            // trbl
  checkBoxes.getChildren ().addAll (showTelnetCB, show3270ECB);

  SessionTable sessionTable = new SessionTable ();
  CommandPane commandPane =
      new CommandPane (sessionTable, CommandPane.ProcessInstruction.DoProcess);

  //    commandPane.setScreen (session.getScreen ());
  commandPane.setScreen (screen);

  setTitle ("Replay Commands - " + path.getFileName ());

  ObservableList<SessionRecord> masterData = session.getDataRecords ();
  FilteredList<SessionRecord> filteredData = new FilteredList<> (masterData, p -> true);

  ChangeListener<? super Boolean> changeListener =
      (observable, oldValue, newValue) -> change (sessionTable, filteredData);

  showTelnetCB.selectedProperty ().addListener (changeListener);
  show3270ECB.selectedProperty ().addListener (changeListener);

  if (true)         // this sucks - remove it when java works properly
  {
    showTelnetCB.setSelected (true);          // must be a bug
    show3270ECB.setSelected (true);
  }

  showTelnetCB.setSelected (showTelnet);
  show3270ECB.setSelected (showExtended);

  SortedList<SessionRecord> sortedData = new SortedList<> (filteredData);
  sortedData.comparatorProperty ().bind (sessionTable.comparatorProperty ());
  sessionTable.setItems (sortedData);

  displayFirstScreen (session, sessionTable);

  setOnCloseRequest (e -> Platform.exit ());

  windowSaver = new WindowSaver (prefs, this, "Replay");
  if (!windowSaver.restoreWindow ())
  {
    primaryScreenBounds = javafx.stage.Screen.getPrimary ().getVisualBounds ();
    setX (800);
    setY (primaryScreenBounds.getMinY ());
    double height = primaryScreenBounds.getHeight ();
    setHeight (Math.min (height, 1200));
  }

  BorderPane borderPane = new BorderPane ();
  borderPane.setLeft (sessionTable);      // fixed size
  borderPane.setCenter (commandPane);     // expands to fill window
  borderPane.setTop (label);
  borderPane.setBottom (checkBoxes);

  Scene scene = new Scene (borderPane);
  setScene (scene);
}