List of usage examples for javafx.scene.layout Priority ALWAYS
Priority ALWAYS
To view the source code for javafx.scene.layout Priority ALWAYS.
Click Source Link
From source file:gov.va.isaac.gui.refexViews.refexEdit.AddRefexPopup.java
private void buildDataFields(boolean assemblageValid, RefexDynamicDataBI[] currentValues) { if (assemblageValid) { for (ReadOnlyStringProperty ssp : currentDataFieldWarnings_) { allValid_.removeBinding(ssp); }/*from ww w .j a v a 2 s . c om*/ currentDataFieldWarnings_.clear(); for (RefexDataTypeNodeDetails nd : currentDataFields_) { nd.cleanupListener(); } currentDataFields_.clear(); GridPane gp = new GridPane(); gp.setHgap(10.0); gp.setVgap(10.0); gp.setStyle("-fx-padding: 5;"); int row = 0; boolean extraInfoColumnIsRequired = false; for (RefexDynamicColumnInfo ci : assemblageInfo_.getColumnInfo()) { SimpleStringProperty valueIsRequired = (ci.isColumnRequired() ? new SimpleStringProperty("") : null); SimpleStringProperty defaultValueTooltip = ((ci.getDefaultColumnValue() == null && ci.getValidator() == null) ? null : new SimpleStringProperty()); ComboBox<RefexDynamicDataType> polymorphicType = null; Label l = new Label(ci.getColumnName()); l.getStyleClass().add("boldLabel"); l.setMinWidth(FxUtils.calculateNecessaryWidthOfBoldLabel(l)); Tooltip.install(l, new Tooltip(ci.getColumnDescription())); int col = 0; gp.add(l, col++, row); if (ci.getColumnDataType() == RefexDynamicDataType.POLYMORPHIC) { polymorphicType = new ComboBox<>(); polymorphicType.setEditable(false); polymorphicType.setConverter(new StringConverter<RefexDynamicDataType>() { @Override public String toString(RefexDynamicDataType object) { return object.getDisplayName(); } @Override public RefexDynamicDataType fromString(String string) { throw new RuntimeException("unecessary"); } }); for (RefexDynamicDataType type : RefexDynamicDataType.values()) { if (type == RefexDynamicDataType.POLYMORPHIC || type == RefexDynamicDataType.UNKNOWN) { continue; } else { polymorphicType.getItems().add(type); } } polymorphicType.getSelectionModel() .select((currentValues == null ? RefexDynamicDataType.STRING : (currentValues[row] == null ? RefexDynamicDataType.STRING : currentValues[row].getRefexDataType()))); } RefexDataTypeNodeDetails nd = RefexDataTypeFXNodeBuilder.buildNodeForType(ci.getColumnDataType(), ci.getDefaultColumnValue(), (currentValues == null ? null : currentValues[row]), valueIsRequired, defaultValueTooltip, (polymorphicType == null ? null : polymorphicType.getSelectionModel().selectedItemProperty()), allValid_, new SimpleObjectProperty<>(ci.getValidator()), new SimpleObjectProperty<>(ci.getValidatorData())); currentDataFieldWarnings_.addAll(nd.getBoundToAllValid()); if (ci.getColumnDataType() == RefexDynamicDataType.POLYMORPHIC) { nd.addUpdateParentListListener(currentDataFieldWarnings_); } currentDataFields_.add(nd); gp.add(nd.getNodeForDisplay(), col++, row); Label colType = new Label(ci.getColumnDataType().getDisplayName()); colType.setMinWidth(FxUtils.calculateNecessaryWidthOfLabel(colType)); gp.add((polymorphicType == null ? colType : polymorphicType), col++, row); if (ci.isColumnRequired() || ci.getDefaultColumnValue() != null || ci.getValidator() != null) { extraInfoColumnIsRequired = true; StackPane stackPane = new StackPane(); stackPane.setMaxWidth(Double.MAX_VALUE); if (ci.getDefaultColumnValue() != null || ci.getValidator() != null) { ImageView information = Images.INFORMATION.createImageView(); Tooltip tooltip = new Tooltip(); tooltip.textProperty().bind(defaultValueTooltip); Tooltip.install(information, tooltip); tooltip.setAutoHide(true); information.setOnMouseClicked( event -> tooltip.show(information, event.getScreenX(), event.getScreenY())); stackPane.getChildren().add(information); } if (ci.isColumnRequired()) { ImageView exclamation = Images.EXCLAMATION.createImageView(); final BooleanProperty showExclamation = new SimpleBooleanProperty( StringUtils.isNotBlank(valueIsRequired.get())); valueIsRequired.addListener((ChangeListener<String>) (observable, oldValue, newValue) -> showExclamation.set(StringUtils.isNotBlank(newValue))); exclamation.visibleProperty().bind(showExclamation); Tooltip tooltip = new Tooltip(); tooltip.textProperty().bind(valueIsRequired); Tooltip.install(exclamation, tooltip); tooltip.setAutoHide(true); exclamation.setOnMouseClicked( event -> tooltip.show(exclamation, event.getScreenX(), event.getScreenY())); stackPane.getChildren().add(exclamation); } gp.add(stackPane, col++, row); } row++; } ColumnConstraints cc = new ColumnConstraints(); cc.setHgrow(Priority.NEVER); gp.getColumnConstraints().add(cc); cc = new ColumnConstraints(); cc.setHgrow(Priority.ALWAYS); gp.getColumnConstraints().add(cc); cc = new ColumnConstraints(); cc.setHgrow(Priority.NEVER); gp.getColumnConstraints().add(cc); if (extraInfoColumnIsRequired) { cc = new ColumnConstraints(); cc.setHgrow(Priority.NEVER); gp.getColumnConstraints().add(cc); } if (row == 0) { sp_.setContent(new Label("This assemblage does not allow data fields")); } else { sp_.setContent(gp); } allValid_.invalidate(); } else { sp_.setContent(null); } }
From source file:qupath.lib.gui.tma.TMASummaryViewer.java
private Pane createSidePane() { BorderPane pane = new BorderPane(); TabPane tabPane = new TabPane(); kmDisplay = new KaplanMeierDisplay(null, null, null, null); BorderPane paneKaplanMeier = new BorderPane(); paneKaplanMeier.setCenter(kmDisplay.getView()); paneKaplanMeier.setPadding(new Insets(10, 10, 10, 10)); // comboMainMeasurement.prefWidthProperty().bind(paneKaplanMeier.widthProperty()); comboMainMeasurement.setMaxWidth(Double.MAX_VALUE); comboMainMeasurement.setTooltip(new Tooltip("Measurement thresholded to create survival curves etc.")); GridPane kmTop = new GridPane(); kmTop.add(new Label("Score"), 0, 0); kmTop.add(comboMainMeasurement, 1, 0); kmTop.add(new Label("Survival type"), 0, 1); kmTop.add(comboSurvival, 1, 1);//from w w w .ja v a2 s. c om comboSurvival.setTooltip(new Tooltip("Specify overall or recurrence-free survival (if applicable)")); comboSurvival.setMaxWidth(Double.MAX_VALUE); GridPane.setHgrow(comboMainMeasurement, Priority.ALWAYS); GridPane.setHgrow(comboSurvival, Priority.ALWAYS); kmTop.setHgap(5); paneKaplanMeier.setTop(kmTop); // kmDisplay.setOrientation(Orientation.VERTICAL); histogramDisplay = new HistogramDisplay(model, false); comboMainMeasurement.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> { histogramDisplay.refreshCombo(); histogramDisplay.showHistogram(n); updateSurvivalCurves(); }); comboMeasurementMethod.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> { histogramDisplay.refreshHistogram(); scatterPane.updateChart(); updateSurvivalCurves(); }); comboSurvival.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> { updateSurvivalCurves(); }); // Create a Tab for showing images BorderPane paneImages = new BorderPane(); CheckBox cbShowOverlay = new CheckBox("Show overlay"); imageAvailability.addListener((c, v, n) -> { if (n == ImageAvailability.OVERLAY_ONLY) cbShowOverlay.setSelected(true); else if (n == ImageAvailability.IMAGE_ONLY) cbShowOverlay.setSelected(false); cbShowOverlay.setDisable(n != ImageAvailability.BOTH); }); ListView<TMAEntry> listImages = new ListView<>(); listImages.setCellFactory(v -> new ImageListCell(cbShowOverlay.selectedProperty(), imageCache)); listImages.widthProperty().addListener((v, o, n) -> listImages.refresh()); listImages.setStyle("-fx-control-inner-background-alt: -fx-control-inner-background ;"); table.getSelectionModel().getSelectedItems().addListener((Change<? extends TreeItem<TMAEntry>> e) -> { List<TMAEntry> entries = new ArrayList<>(); for (TreeItem<TMAEntry> item : e.getList()) { if (item.getChildren().isEmpty()) { if (item.getValue().hasImage() || item.getValue().hasOverlay()) entries.add(item.getValue()); } else { for (TreeItem<TMAEntry> item2 : item.getChildren()) { if (item2.getValue().hasImage() || item2.getValue().hasOverlay()) entries.add(item2.getValue()); } } listImages.getItems().setAll(entries); } }); cbShowOverlay.setAlignment(Pos.CENTER); cbShowOverlay.setMaxWidth(Double.MAX_VALUE); cbShowOverlay.setPadding(new Insets(5, 5, 5, 5)); cbShowOverlay.selectedProperty().addListener((v, o, n) -> listImages.refresh()); paneImages.setCenter(listImages); paneImages.setTop(cbShowOverlay); // Determine visibility based upon whether there are any images to show // Tab tabImages = new Tab("Images", paneImages); ScrollPane scrollPane = new ScrollPane(paneKaplanMeier); scrollPane.setFitToWidth(true); scrollPane.setFitToHeight(true); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); Tab tabSurvival = new Tab("Survival", scrollPane); tabPane.getTabs().addAll(new Tab("Table", getCustomizeTablePane()), // tabImages, new Tab("Histogram", histogramDisplay.getPane()), new Tab("Scatterplot", scatterPane.getPane()), tabSurvival); tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE); // if (imageAvailability.get() != ImageAvailability.NONE) // tabPane.getTabs().add(1, tabImages); // // imageAvailability.addListener((c, v, n) -> { // if (n == ImageAvailability.NONE) // tabPane.getTabs().remove(tabImages); // else if (!tabPane.getTabs().contains(tabImages)) // tabPane.getTabs().add(1, tabImages); // }); // tabSurvival.visibleProperty().bind( // Bindings.createBooleanBinding(() -> !survivalColumns.isEmpty(), survivalColumns) // ); pane.setCenter(tabPane); pane.setMinWidth(350); return pane; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXRelationAttrPane.java
public CFBamJavaFXRelationAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamRelationObj argFocus) {//from w ww. j a v a2 s. co m super(); Control ctrl; CFLabel label; CFReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsRelation(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupFromIndex(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupFromIndex(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupToTable(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupToTable(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupToIndex(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupToIndex(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupNarrowed(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupNarrowed(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLabel(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorLabel(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelRelationType(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorRelationType(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDbName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDbName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelSuffix(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorSuffix(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsRequired(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsRequired(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsAbstract(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsAbstract(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsXsdContainer(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsXsdContainer(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDefaultVisibility(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDefaultVisibility(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:qupath.lib.gui.tma.TMASummaryViewer.java
private Pane getCustomizeTablePane() { TableView<TreeTableColumn<TMAEntry, ?>> tableColumns = new TableView<>(); tableColumns.setPlaceholder(new Text("No columns available")); tableColumns.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); tableColumns.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY); SortedList<TreeTableColumn<TMAEntry, ?>> sortedColumns = new SortedList<>( table.getColumns().filtered(p -> !p.getText().trim().isEmpty())); sortedColumns.setComparator((c1, c2) -> c1.getText().compareTo(c2.getText())); tableColumns.setItems(sortedColumns); sortedColumns.comparatorProperty().bind(tableColumns.comparatorProperty()); // sortedColumns.comparatorProperty().bind(tableColumns.comparatorProperty()); TableColumn<TreeTableColumn<TMAEntry, ?>, String> columnName = new TableColumn<>("Column"); columnName.setCellValueFactory(v -> v.getValue().textProperty()); TableColumn<TreeTableColumn<TMAEntry, ?>, Boolean> columnVisible = new TableColumn<>("Visible"); columnVisible.setCellValueFactory(v -> v.getValue().visibleProperty()); // columnVisible.setCellValueFactory(col -> { // SimpleBooleanProperty prop = new SimpleBooleanProperty(col.getValue().isVisible()); // prop.addListener((v, o, n) -> col.getValue().setVisible(n)); // return prop; // });//from www . j av a 2 s . c om tableColumns.setEditable(true); columnVisible.setCellFactory(v -> new CheckBoxTableCell<>()); tableColumns.getColumns().add(columnName); tableColumns.getColumns().add(columnVisible); ContextMenu contextMenu = new ContextMenu(); Action actionShowSelected = new Action("Show selected", e -> { for (TreeTableColumn<?, ?> col : tableColumns.getSelectionModel().getSelectedItems()) { if (col != null) col.setVisible(true); else { // Not sure why this happens...? logger.trace("Selected column is null!"); } } }); Action actionHideSelected = new Action("Hide selected", e -> { for (TreeTableColumn<?, ?> col : tableColumns.getSelectionModel().getSelectedItems()) { if (col != null) col.setVisible(false); else { // Not sure why this happens...? logger.trace("Selected column is null!"); } } }); contextMenu.getItems().addAll(ActionUtils.createMenuItem(actionShowSelected), ActionUtils.createMenuItem(actionHideSelected)); tableColumns.setContextMenu(contextMenu); tableColumns.setTooltip( new Tooltip("Show or hide table columns - right-click to change multiple columns at once")); BorderPane paneColumns = new BorderPane(tableColumns); paneColumns.setBottom(PanelToolsFX.createColumnGridControls(ActionUtils.createButton(actionShowSelected), ActionUtils.createButton(actionHideSelected))); VBox paneRows = new VBox(); // Create a box to filter on some metadata text ComboBox<String> comboMetadata = new ComboBox<>(); comboMetadata.setItems(metadataNames); comboMetadata.getSelectionModel().getSelectedItem(); comboMetadata.setPromptText("Select column"); TextField tfFilter = new TextField(); CheckBox cbExact = new CheckBox("Exact"); // Set listeners cbExact.selectedProperty().addListener( (v, o, n) -> setMetadataTextPredicate(comboMetadata.getSelectionModel().getSelectedItem(), tfFilter.getText(), cbExact.isSelected(), !cbExact.isSelected())); tfFilter.textProperty().addListener( (v, o, n) -> setMetadataTextPredicate(comboMetadata.getSelectionModel().getSelectedItem(), tfFilter.getText(), cbExact.isSelected(), !cbExact.isSelected())); comboMetadata.getSelectionModel().selectedItemProperty().addListener( (v, o, n) -> setMetadataTextPredicate(comboMetadata.getSelectionModel().getSelectedItem(), tfFilter.getText(), cbExact.isSelected(), !cbExact.isSelected())); GridPane paneMetadata = new GridPane(); paneMetadata.add(comboMetadata, 0, 0); paneMetadata.add(tfFilter, 1, 0); paneMetadata.add(cbExact, 2, 0); paneMetadata.setPadding(new Insets(10, 10, 10, 10)); paneMetadata.setVgap(2); paneMetadata.setHgap(5); comboMetadata.setMaxWidth(Double.MAX_VALUE); GridPane.setHgrow(tfFilter, Priority.ALWAYS); GridPane.setFillWidth(comboMetadata, Boolean.TRUE); GridPane.setFillWidth(tfFilter, Boolean.TRUE); TitledPane tpMetadata = new TitledPane("Metadata filter", paneMetadata); tpMetadata.setExpanded(false); // tpMetadata.setCollapsible(false); Tooltip tooltipMetadata = new Tooltip( "Enter text to filter entries according to a selected metadata column"); Tooltip.install(paneMetadata, tooltipMetadata); tpMetadata.setTooltip(tooltipMetadata); paneRows.getChildren().add(tpMetadata); // Add measurement predicate TextField tfCommand = new TextField(); tfCommand.setTooltip(new Tooltip("Predicate used to filter entries for inclusion")); TextFields.bindAutoCompletion(tfCommand, e -> { int ind = tfCommand.getText().lastIndexOf("\""); if (ind < 0) return Collections.emptyList(); String part = tfCommand.getText().substring(ind + 1); return measurementNames.stream().filter(n -> n.startsWith(part)).map(n -> "\"" + n + "\" ") .collect(Collectors.toList()); }); String instructions = "Enter a predicate to filter entries.\n" + "Only entries passing the test will be included in any results.\n" + "Examples of predicates include:\n" + " \"Num Tumor\" > 200\n" + " \"Num Tumor\" > 100 && \"Num Stroma\" < 1000"; // labelInstructions.setTooltip(new Tooltip("Note: measurement names must be in \"inverted commands\" and\n" + // "&& indicates 'and', while || indicates 'or'.")); BorderPane paneMeasurementFilter = new BorderPane(tfCommand); Label label = new Label("Predicate: "); label.setAlignment(Pos.CENTER); label.setMaxHeight(Double.MAX_VALUE); paneMeasurementFilter.setLeft(label); Button btnApply = new Button("Apply"); btnApply.setOnAction(e -> { TablePredicate predicateNew = new TablePredicate(tfCommand.getText()); if (predicateNew.isValid()) { predicateMeasurements.set(predicateNew); } else { DisplayHelpers.showErrorMessage("Invalid predicate", "Current predicate '" + tfCommand.getText() + "' is invalid!"); } e.consume(); }); TitledPane tpMeasurementFilter = new TitledPane("Measurement filter", paneMeasurementFilter); tpMeasurementFilter.setExpanded(false); Tooltip tooltipInstructions = new Tooltip(instructions); tpMeasurementFilter.setTooltip(tooltipInstructions); Tooltip.install(paneMeasurementFilter, tooltipInstructions); paneMeasurementFilter.setRight(btnApply); paneRows.getChildren().add(tpMeasurementFilter); logger.info("Predicate set to: {}", predicateMeasurements.get()); VBox pane = new VBox(); // TitledPane tpColumns = new TitledPane("Select column", paneColumns); // tpColumns.setMaxHeight(Double.MAX_VALUE); // tpColumns.setCollapsible(false); pane.getChildren().addAll(paneColumns, new Separator(), paneRows); VBox.setVgrow(paneColumns, Priority.ALWAYS); return pane; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXSchemaDefAttrPane.java
public CFBamJavaFXSchemaDefAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamSchemaDefObj argFocus) {/*from w w w.j a v a2 s . c o m*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsSchemaDef(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefaultLicense(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefaultLicense(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDbName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDbName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLabel(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorLabel(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelExtendCFCore(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorExtendCFCore(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelCopyrightPeriod(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorCopyrightPeriod(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelCopyrightHolder(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorCopyrightHolder(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelPublishURI(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorPublishURI(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSchemaObjInterface(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSchemaObjInterface(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSchemaObjImplementation(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSchemaObjImplementation(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJDb2LUWSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJDb2LUWSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJDb2LUWSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJDb2LUWSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJDb2LUWSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJDb2LUWSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMSSqlSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMSSqlSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMSSqlSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMSSqlSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMSSqlSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMSSqlSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMySqlSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMySqlSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMySqlSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMySqlSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJMySqlSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJMySqlSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJOracleSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJOracleSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJOracleSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJOracleSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJOracleSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJOracleSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJPgSqlSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJPgSqlSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJPgSqlSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJPgSqlSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJPgSqlSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJPgSqlSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSybaseSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSybaseSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSybaseSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSybaseSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJSybaseSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJSybaseSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJRamSchemaObjMembers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJRamSchemaObjMembers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJRamSchemaObjImpl(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJRamSchemaObjImpl(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJRamSchemaObjImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJRamSchemaObjImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgSchemaImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgSchemaImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgSchemaFormatters(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgSchemaFormatters(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgClientSchemaImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgClientSchemaImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgClientSchemaBody(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgClientSchemaBody(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRqstSchemaBody(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRqstSchemaBody(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRqstSchemaImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRqstSchemaImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRqstSchemaWireParsers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRqstSchemaWireParsers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRqstSchemaXsdSpec(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRqstSchemaXsdSpec(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRqstSchemaXsdElementList(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRqstSchemaXsdElementList(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRspnSchemaBody(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRspnSchemaBody(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRspnSchemaImport(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRspnSchemaImport(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRspnSchemaWireParsers(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRspnSchemaWireParsers(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRspnSchemaXsdElementList(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRspnSchemaXsdElementList(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelJXMsgRspnSchemaXsdSpec(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorJXMsgRspnSchemaXsdSpec(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:acmi.l2.clientmod.l2smr.Controller.java
private void onException(String text, Throwable ex) { ex.printStackTrace();/* ww w. j a v a 2 s . c om*/ Platform.runLater(() -> { if (SHOW_STACKTRACE) { Alert alert = new Alert(Alert.AlertType.ERROR); alert.setTitle("Error"); alert.setHeaderText(null); alert.setContentText(text); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); String exceptionText = sw.toString(); Label label = new Label("Exception stacktrace:"); TextArea textArea = new TextArea(exceptionText); textArea.setEditable(false); textArea.setWrapText(true); textArea.setMaxWidth(Double.MAX_VALUE); textArea.setMaxHeight(Double.MAX_VALUE); GridPane.setVgrow(textArea, Priority.ALWAYS); GridPane.setHgrow(textArea, Priority.ALWAYS); GridPane expContent = new GridPane(); expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1); alert.getDialogPane().setExpandableContent(expContent); alert.showAndWait(); } else { //noinspection ThrowableResultOfMethodCallIgnored Throwable t = getTop(ex); Alert alert = new Alert(Alert.AlertType.ERROR); alert.setTitle(t.getClass().getSimpleName()); alert.setHeaderText(text); alert.setContentText(t.getMessage()); alert.showAndWait(); } }); }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXParamAttrPane.java
public CFBamJavaFXParamAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamParamObj argFocus) {//from www . jav a2 s .c om super(); Control ctrl; CFLabel label; CFReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsParam(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupType(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupType(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsNullable(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsNullable(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:UI.MainStageController.java
/** * creates the file not found alert box/*from www. j a va2 s . com*/ */ private void fileNotFoundAlertBox() { fileNotFoundAlert = new Alert(Alert.AlertType.ERROR); fileNotFoundAlert.setTitle("File not found"); fileNotFoundAlert.setHeaderText("File not found"); fileNotFoundAlert.setContentText("Could not find the file you were looking for"); //style the alert DialogPane dialogPane = fileNotFoundAlert.getDialogPane(); dialogPane.getStylesheets().add("/UI/alertStyle.css"); Exception fileNotFoundException = new FileNotFoundException("Could not find your selected file"); //create expandable exception StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); fileNotFoundException.printStackTrace(pw); String exceptionText = sw.toString(); Label label = new Label("The exception stacktrace was: "); TextArea textArea = new TextArea(exceptionText); textArea.setEditable(false); textArea.setWrapText(true); textArea.setMaxWidth(Double.MAX_VALUE); textArea.setMaxHeight(Double.MAX_VALUE); GridPane.setVgrow(textArea, Priority.ALWAYS); GridPane.setHgrow(textArea, Priority.ALWAYS); GridPane expContent = new GridPane(); expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1); // Set expandable Exception into the dialog pane. fileNotFoundAlert.getDialogPane().setExpandableContent(expContent); fileNotFoundAlert.showAndWait(); }
From source file:net.sourceforge.msscodefactory.cfbamcustom.v2_7.CFBamCustomEditor.CFBamCustomEditorParamAttrPane.java
public CFBamCustomEditorParamAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamParamObj argFocus) {/*from ww w.j a v a 2 s . com*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsParam(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLookupType(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupType(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelIsNullable(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsNullable(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXIndexColAttrPane.java
public CFBamJavaFXIndexColAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamIndexColObj argFocus) {/*from w w w . j av a2s. c o m*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsIndexCol(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupColumn(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupColumn(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLabel(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorLabel(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsAscending(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsAscending(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDefaultVisibility(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDefaultVisibility(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }