Package javafx.scene.layout

Examples of javafx.scene.layout.HBox


    private void createSnapshotViews(){
        this.freeConnections = new Snapshot(idProvider,"Free Connections", "Connections", "");
        this.usedConnections = new Snapshot(idProvider,"Used Connections", "Connections", "");
        this.waitQueueLength = new Snapshot(idProvider,"Wait Queue Length", "Queue Length", "");
        this.connectionLeaks = new Snapshot(idProvider,"Potential Connection Leak", "Leaks", "");
        this.box = new HBox();
        box.getChildren().add(freeConnections.view());
        box.getChildren().add(usedConnections.view());
        box.getChildren().add(waitQueueLength.view());
        box.getChildren().add(connectionLeaks.view());
View Full Code Here


    private void createViews() {
        this.applicationsView = new ApplicationsView();
        this.vertical = new SplitPane();
        this.vertical.setOrientation(Orientation.VERTICAL);
        HBox threadsAndMemory = new HBox();
        VBox paranormal = new VBox();
        HBox paranormalContent = new HBox();
        HBox transactions = new HBox();
        HBox web = new HBox();
        HBox performance = new HBox();

        String hBoxClass = "boxSpacing";
        this.vertical.getStyleClass().add(hBoxClass);
        threadsAndMemory.getStyleClass().add(hBoxClass);
        paranormalContent.getStyleClass().add(hBoxClass);
        transactions.getStyleClass().add(hBoxClass);
        web.getStyleClass().add(hBoxClass);

        instantiateViews();

        threadsAndMemory.getChildren().addAll(this.heap.view(), this.threadCount.view(), this.peakThreadCount.view());
        transactions.getChildren().addAll(this.commitCount.view(), this.rollbackCount.view());
        paranormalContent.getChildren().addAll(this.queuedConnections.view(), this.totalErrors.view(), this.busyThread.view());
        paranormal.getChildren().addAll(paranormalContent,this.status.view());
        performance.getChildren().addAll(this.successfulTXPerf.view());
        performance.getChildren().addAll(this.failedTXPerf.view());
        web.getChildren().addAll(this.activeSessions.view());
        web.getChildren().addAll(this.expiredSessions.view());
        Tab threadsAndMemoryTab = createTab(threadsAndMemory, "Threads And Memory");
        Tab transactionsTab = createTab(transactions, "Transactions");
        Tab paranormalTab = createTab(paranormal, "Paranormal Activity");
View Full Code Here

            } catch (IOException e) {
              throw new RuntimeException(e);
            }
          }
        });
        HBox buttonbox= new HBox();
        buttonbox.getChildren().add(button);
        borderPane.setBottom(buttonbox);
        stage.setScene(new Scene(borderPane));
        stage.show();
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
          @Override
View Full Code Here

//      }
//    });
   
    final CheckBox regExp = new CheckBox("RegExp");
   
    HBox pane= new HBox();
    BorderPane.setMargin(pane,new Insets(3));
    pane.setSpacing(3);
    pane.setAlignment(Pos.CENTER_LEFT);
    Button copy = new Button("copy");
    copy.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        copyTable(tableView);
      }
    });
    copyMenuItem.setOnAction(copy.getOnAction());
    pane.getChildren().add(copy);
    Button copyCell = new Button("copy cell");
    copyCell.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        copyTableCell(tableView);
      }
    });
    copyCellMenuItem.setOnAction(copyCell.getOnAction());
    pane.getChildren().add(copyCell);
    pane.getChildren().add(new Label("Search"));
    final TextField textField = new TextField();
    textField.textProperty().addListener(new ChangeListener<String>() {
      @Override
      public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
        if (newValue!=null && newValue.length()>1){
          searchInTable(tableView, newValue,regExp.isSelected());
        }
      }
    });
    regExp.selectedProperty().addListener(new ChangeListener<Boolean>() {
      @Override
      public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
        if (newValue!=null){
          searchInTable(tableView,textField.getText(),newValue);
        }
      }
    });
    textField.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        searchInTable(tableView,textField.getText(),regExp.isSelected());
      }
    });
    HBox.setHgrow(textField,Priority.ALWAYS);
    final Label count = new Label("count: 0");
//    tableView.itemsProperty().addListener(new ChangeListener<ObservableList<M>>() {
//      @Override
//      public void changed(ObservableValue<? extends ObservableList<M>> observable, ObservableList<M> oldValue,
//          ObservableList<M> newValue) {
//        if (newValue!=null){
//          count.setText("count: "+String.valueOf(newValue.size()));
//        }
//      }
//    });
    pane.getChildren().add(textField);
    pane.getChildren().add(regExp);
    pane.getChildren().add(new Separator(Orientation.VERTICAL));
    pane.getChildren().add(count);
   
    tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
    return pane;
  }
View Full Code Here

    this.engineList = engineList;
  }

  @Override
  public Node createContent() {
    HBox pane = new HBox();
    pane.setAlignment(Pos.CENTER_LEFT);
    pane.setSpacing(3);
    final ChoiceBox<ProcessingEngineInfo> engineChoicebox = createEngineChoicebox();

    final ChoiceBox<ProcessorPoolInfo> poolChoicebox = createPoolChoicebox();
    pane.getChildren().add(new Label("Engine"));
    pane.getChildren().add(engineChoicebox);
    pane.getChildren().add(new Label("Pool"));
    pane.getChildren().add(poolChoicebox);
   
    engineChoicebox.getSelectionModel().selectFirst();
    return pane;
  }
View Full Code Here

                        inputControl = choiceBox;
                    }
                    // !CHANGE END!
                }

                HBox hbox = new HBox(10);

                if (contentString != null && ! contentString.isEmpty()) {
                    Label label = new Label(contentString);
                    hbox.getChildren().add(label);
                }

                if (inputControl != null) {
                    hbox.getChildren().add(inputControl);
                }

                return hbox;
            } else if(style == DialogStyle.CUSTOM){
              return customContentPanel;
View Full Code Here

         * link label - to view more details about security warnings.
         */
        private Pane createBottomPanel() {
            if (alertStrs == null && infoStrs == null) return null;

            HBox bottomPanel = new HBox();
            bottomPanel.getStyleClass().add("bottom-panel");

            // Icon 32x32 pixels with indication of secutiry alert - high/low

            // If there are no messages in securityAlerts, show
            // SECURITY_ALERT_LOW icon in the lower left corner of
            // security dialog.
            String imageFile = SECURITY_ALERT_HIGH;

            if (alertStrs == null || alertStrs.length == 0) {
                imageFile = SECURITY_ALERT_LOW;
            }
            securityIcon = getIcon(imageFile);

            // Add icon to the bottom panel.
            bottomPanel.getChildren().add(securityIcon);

            // If there are no alerts (alertStrs is null, or length is 0),
            // then we should show only first message from infoStrs.
            // this is how it will work for security dialog...
            int textAreaWidth = 333;
            UITextArea bulletText = new UITextArea(textAreaWidth);
            bulletText.getStyleClass().add("bottom-text");

            if ((alertStrs == null || alertStrs.length == 0)
                && infoStrs != null && infoStrs.length != 0) {
                // If there are no alerts, use first string from the infoStrs.
                bulletText.setText((infoStrs[0] != null) ? infoStrs[0] : " ");
            } else if (alertStrs != null && alertStrs.length != 0) {
                // If there are any alerts, use first string from alertStrs.
                bulletText.setText((alertStrs[0] != null) ? alertStrs[0] : " ");
            }

            bottomPanel.getChildren().add(bulletText);

    //        if (moreInfoLbl != null) {
    //            bottomPanel.getChildren().add(moreInfoLbl);
    //        }

View Full Code Here

  public ToolBar createToolbar() {
    ToolBar toolBar = new ToolBar();
    Region spacer = new Region();
    spacer.getStyleClass().setAll("spacer");

    HBox buttonBar = new HBox();
    buttonBar.setAlignment(Pos.CENTER);
    HBox.setHgrow(buttonBar, Priority.ALWAYS);
    buttonBar.getStyleClass().setAll("segmented-button-bar");

    List<Node> buttons = formGroup.createButtonList();
    buttons.get(0).getStyleClass().addAll("first");
    buttons.get(buttons.size() - 1).getStyleClass().addAll("last", "capsule");

    buttonBar.getChildren().addAll(buttons);
    toolBar.getItems().addAll(/*spacer,*/ buttonBar);
    toolBar.setCache(true);
    return toolBar;
  }
View Full Code Here

                        setHeight(restoreH);
                    }
                }
            });

            windowBtns = new HBox(3);
            windowBtns.getStyleClass().add("window-buttons");
            windowBtns.getChildren().addAll(minButton, maxButton, closeButton);

            toolBar.getItems().addAll(titleLabel, spacer, windowBtns);
            root.setTop(toolBar);
View Full Code Here

            }
           
            // --- getBtnPanel
            // This panel contains right-aligned "Close" button.  It should
            // dismiss the dialog and dispose of it.
            HBox btnPanel = new HBox();
            btnPanel.getStyleClass().add("button-panel");

            Button dismissBtn = new Button(getMessage("common.close.btn"));
            dismissBtn.setPrefWidth(80);
            dismissBtn.setOnAction(new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent e) {
                    hide();
                }
            });

            dismissBtn.setDefaultButton(true);
            btnPanel.getChildren().add(dismissBtn);
            contentPanel.getChildren().add(btnPanel);
            // --- getBtnPanel

            setContentPane(contentPanel);
            // --- initComponents
View Full Code Here

TOP

Related Classes of javafx.scene.layout.HBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.