Example usage for javafx.geometry HPos LEFT

List of usage examples for javafx.geometry HPos LEFT

Introduction

In this page you can find the example usage for javafx.geometry HPos LEFT.

Prototype

HPos LEFT

To view the source code for javafx.geometry HPos LEFT.

Click Source Link

Document

Indicates left horizontal position.

Usage

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNumberDefAttrPane.java

public CFBamJavaFXNumberDefAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNumberDefObj argFocus) {//  w ww.jav  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;
    setJavaFXFocusAsNumberDef(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 = 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 = getJavaFXLabelIsNullable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsNullable();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelGenerateId();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorGenerateId();
    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++;

    label = getJavaFXLabelDbName();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDbName();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDigits();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDigits();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelPrecis();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorPrecis();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelInitValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorInitValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDefaultValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDefaultValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMinValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMinValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMaxValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMaxValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelNullValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorNullValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelUnknownValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorUnknownValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNumberTypeAttrPane.java

public CFBamJavaFXNumberTypeAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNumberTypeObj argFocus) {//from  www .j  a  v a  2s.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;
    setJavaFXFocusAsNumberType(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 = 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 = getJavaFXLabelIsNullable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsNullable();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelGenerateId();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorGenerateId();
    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++;

    label = getJavaFXLabelDbName();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDbName();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDigits();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDigits();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelPrecis();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorPrecis();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelInitValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorInitValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDefaultValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDefaultValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMinValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMinValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMaxValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMaxValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelNullValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorNullValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelUnknownValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorUnknownValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfbamcustom.v2_9.CFBamCustomEditor.CFBamCustomEditorServerObjFuncAttrPane.java

public CFBamCustomEditorServerObjFuncAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamServerObjFuncObj argFocus) {
    super();//from ww  w .  j av  a  2  s. c  o  m
    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;
    setJavaFXFocusAsServerObjFunc(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 = getJavaFXLabelLookupRetTable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupRetTable();
    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 = getJavaFXLabelSuffix();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorSuffix();
    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++;

    label = getJavaFXLabelIsInstanceMethod();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsInstanceMethod();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelJMethodBody();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorJMethodBody();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}

From source file:gov.va.isaac.gui.preferences.plugins.ViewCoordinatePreferencesPluginView.java

@Override
public Region getContent() {
    if (hBox == null) {
        VBox statedInferredToggleGroupVBox = new VBox();
        statedInferredToggleGroupVBox.setSpacing(4.0);

        //Instantiate Everything
        pathComboBox = new ComboBox<>(); //Path
        statedInferredToggleGroup = new ToggleGroup(); //Stated / Inferred
        List<RadioButton> statedInferredOptionButtons = new ArrayList<>();
        datePicker = new DatePicker(); //Date
        timeSelectCombo = new ComboBox<Long>(); //Time

        //Radio buttons
        for (StatedInferredOptions option : StatedInferredOptions.values()) {
            RadioButton optionButton = new RadioButton();
            if (option == StatedInferredOptions.STATED) {
                optionButton.setText("Stated");
            } else if (option == StatedInferredOptions.INFERRED_THEN_STATED) {
                optionButton.setText("Inferred Then Stated");
            } else if (option == StatedInferredOptions.INFERRED) {
                optionButton.setText("Inferred");
            } else {
                throw new RuntimeException("oops");
            }// w w w.j a  v  a 2  s . c o  m
            optionButton.setUserData(option);
            optionButton.setTooltip(
                    new Tooltip("Default StatedInferredOption is " + getDefaultStatedInferredOption()));
            statedInferredToggleGroup.getToggles().add(optionButton);
            statedInferredToggleGroupVBox.getChildren().add(optionButton);
            statedInferredOptionButtons.add(optionButton);
        }
        statedInferredToggleGroup.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {
            @Override
            public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue,
                    Toggle newValue) {
                currentStatedInferredOptionProperty.set((StatedInferredOptions) newValue.getUserData());
            }
        });

        //Path Combo Box
        pathComboBox.setCellFactory(new Callback<ListView<UUID>, ListCell<UUID>>() {
            @Override
            public ListCell<UUID> call(ListView<UUID> param) {
                final ListCell<UUID> cell = new ListCell<UUID>() {
                    @Override
                    protected void updateItem(UUID c, boolean emptyRow) {
                        super.updateItem(c, emptyRow);
                        if (c == null) {
                            setText(null);
                        } else {
                            String desc = OTFUtility.getDescription(c);
                            setText(desc);
                        }
                    }
                };
                return cell;
            }
        });

        pathComboBox.setButtonCell(new ListCell<UUID>() { // Don't know why this should be necessary, but without this the UUID itself is displayed
            @Override
            protected void updateItem(UUID c, boolean emptyRow) {
                super.updateItem(c, emptyRow);
                if (emptyRow) {
                    setText("");
                } else {
                    String desc = OTFUtility.getDescription(c);
                    setText(desc);
                }
            }
        });
        pathComboBox.setOnAction((event) -> {
            if (!pathComboFirstRun) {
                UUID selectedPath = pathComboBox.getSelectionModel().getSelectedItem();
                if (selectedPath != null) {
                    int path = OTFUtility.getConceptVersion(selectedPath).getPathNid();

                    StampBdb stampDb = Bdb.getStampDb();
                    NidSet nidSet = new NidSet();
                    nidSet.add(path);
                    //TODO: Make this multi-threaded and possibly implement setTimeOptions() here also
                    NidSetBI stamps = stampDb.getSpecifiedStamps(nidSet, Long.MIN_VALUE, Long.MAX_VALUE);

                    pathDatesList.clear();
                    //                  disableTimeCombo(true);
                    timeSelectCombo.setValue(Long.MAX_VALUE);

                    for (Integer thisStamp : stamps.getAsSet()) {
                        try {
                            Position stampPosition = stampDb.getPosition(thisStamp);
                            this.stampDate = new Date(stampPosition.getTime());
                            stampDateInstant = stampDate.toInstant().atZone(ZoneId.systemDefault())
                                    .toLocalDate();
                            this.pathDatesList.add(stampDateInstant); //Build DatePicker
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                    datePicker.setValue(LocalDate.now());
                }
            } else {
                pathComboFirstRun = false;
            }
        });

        pathComboBox.setTooltip(
                new Tooltip("Default path is \"" + OTFUtility.getDescription(getDefaultPath()) + "\""));

        //Calendar Date Picker
        final Callback<DatePicker, DateCell> dayCellFactory = new Callback<DatePicker, DateCell>() {
            @Override
            public DateCell call(final DatePicker datePicker) {
                return new DateCell() {
                    @Override
                    public void updateItem(LocalDate thisDate, boolean empty) {
                        super.updateItem(thisDate, empty);
                        if (pathDatesList != null) {
                            if (pathDatesList.contains(thisDate)) {
                                setDisable(false);
                            } else {
                                setDisable(true);
                            }
                        }
                    }
                };
            }
        };
        datePicker.setDayCellFactory(dayCellFactory);
        datePicker.setOnAction((event) -> {
            if (!datePickerFirstRun) {
                UUID selectedPath = pathComboBox.getSelectionModel().getSelectedItem();

                Instant instant = Instant.from(datePicker.getValue().atStartOfDay(ZoneId.systemDefault()));
                Long dateSelected = Date.from(instant).getTime();

                if (selectedPath != null && dateSelected != 0) {

                    int path = OTFUtility.getConceptVersion(selectedPath).getPathNid();
                    setTimeOptions(path, dateSelected);
                    try {
                        timeSelectCombo.setValue(times.first()); //Default Dropdown Value
                    } catch (Exception e) {
                        // Eat it.. like a sandwich! TODO: Create Read Only Property Conditional for checking if Time Combo is disabled
                        // Right now, Sometimes Time Combo is disabled, so we catch this and eat it
                        // Otherwise make a conditional from the Read Only Boolean Property to check first
                    }
                } else {
                    disableTimeCombo(false);
                    logger.debug("The path isn't set or the date isn't set. Both are needed right now");
                }
            } else {
                datePickerFirstRun = false;
            }
        });

        //Commit-Time ComboBox
        timeSelectCombo.setMinWidth(200);
        timeSelectCombo.setCellFactory(new Callback<ListView<Long>, ListCell<Long>>() {
            @Override
            public ListCell<Long> call(ListView<Long> param) {
                final ListCell<Long> cell = new ListCell<Long>() {
                    @Override
                    protected void updateItem(Long item, boolean emptyRow) {
                        super.updateItem(item, emptyRow);
                        if (item == null) {
                            setText("");
                        } else {
                            if (item == Long.MAX_VALUE) {
                                setText("LATEST TIME");
                            } else {
                                setText(timeFormatter.format(new Date(item)));
                            }
                        }
                    }
                };
                return cell;
            }
        });
        timeSelectCombo.setButtonCell(new ListCell<Long>() {
            @Override
            protected void updateItem(Long item, boolean emptyRow) {
                super.updateItem(item, emptyRow);
                if (item == null) {
                    setText("");
                } else {
                    if (item == Long.MAX_VALUE) {
                        setText("LATEST TIME");
                    } else {
                        setText(timeFormatter.format(new Date(item)));
                    }
                }
            }
        });

        try {
            currentPathProperty.bind(pathComboBox.getSelectionModel().selectedItemProperty()); //Set Path Property
            currentTimeProperty.bind(timeSelectCombo.getSelectionModel().selectedItemProperty());
        } catch (Exception e) {
            e.printStackTrace();
        }

        // DEFAULT VALUES
        UserProfile loggedIn = ExtendedAppContext.getCurrentlyLoggedInUserProfile();
        storedTimePref = loggedIn.getViewCoordinateTime();
        storedPathPref = loggedIn.getViewCoordinatePath();

        if (storedPathPref != null) {
            pathComboBox.getItems().clear(); //Set the path Dates by default
            pathComboBox.getItems().addAll(getPathOptions());
            final UUID storedPath = getStoredPath();
            if (storedPath != null) {
                pathComboBox.getSelectionModel().select(storedPath);
            }

            if (storedTimePref != null) {
                final Long storedTime = loggedIn.getViewCoordinateTime();
                Calendar cal = Calendar.getInstance();
                cal.setTime(new Date(storedTime));
                cal.set(Calendar.MILLISECOND, 0); //Strip milliseconds
                Long storedTruncTime = cal.getTimeInMillis();

                if (!storedTime.equals(Long.MAX_VALUE)) { //***** FIX THIS, not checking default vc time value
                    int path = OTFUtility.getConceptVersion(storedPathPref).getPathNid();
                    setTimeOptions(path, storedTimePref);
                    timeSelectCombo.setValue(storedTruncTime);
                    //                  timeSelectCombo.getItems().addAll(getTimeOptions()); //The correct way, but doesen't work

                    Date storedDate = new Date(storedTime);
                    datePicker.setValue(storedDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate());
                } else {
                    datePicker.setValue(LocalDate.now());
                    timeSelectCombo.getItems().addAll(Long.MAX_VALUE); //The correct way, but doesen't work
                    timeSelectCombo.setValue(Long.MAX_VALUE);
                    //                  disableTimeCombo(false);
                }
            } else { //Stored Time Pref == null
                logger.error("ERROR: Stored Time Preference = null");
            }
        } else { //Stored Path Pref == null
            logger.error("We could not load a stored path, ISAAC cannot run");
            throw new Error("No stored PATH could be found. ISAAC can't run without a path");
        }

        GridPane gridPane = new GridPane();
        gridPane.setHgap(10);
        gridPane.setVgap(10);

        Label pathLabel = new Label("View Coordinate Path");
        gridPane.add(pathLabel, 0, 0); //Path Label - Row 0
        GridPane.setHalignment(pathLabel, HPos.LEFT);
        gridPane.add(statedInferredToggleGroupVBox, 1, 0, 1, 2); //--Row 0, span 2

        gridPane.add(pathComboBox, 0, 1); //Path Combo box - Row 2
        GridPane.setValignment(pathComboBox, VPos.TOP);

        Label datePickerLabel = new Label("View Coordinate Dates");
        gridPane.add(datePickerLabel, 0, 2); //Row 3
        GridPane.setHalignment(datePickerLabel, HPos.LEFT);
        gridPane.add(datePicker, 0, 3); //Row 4

        Label timeSelectLabel = new Label("View Coordinate Times");
        gridPane.add(timeSelectLabel, 1, 2); //Row 3
        GridPane.setHalignment(timeSelectLabel, HPos.LEFT);
        gridPane.add(timeSelectCombo, 1, 3); //Row 4

        // FOR DEBUGGING CURRENTLY SELECTED PATH, TIME AND POLICY
        /*         
                 UserProfile userProfile = ExtendedAppContext.getCurrentlyLoggedInUserProfile();
                 StatedInferredOptions chosenPolicy = userProfile.getStatedInferredPolicy();
                 UUID chosenPathUuid = userProfile.getViewCoordinatePath();
                 Long chosenTime = userProfile.getViewCoordinateTime();
                         
                 Label printSelectedPathLabel = new Label("Path: " + OTFUtility.getDescription(chosenPathUuid));
                 gridPane.add(printSelectedPathLabel, 0, 4);
                 GridPane.setHalignment(printSelectedPathLabel, HPos.LEFT);
                 Label printSelectedTimeLabel = null;
                 if(chosenTime != getDefaultTime()) {
                    printSelectedTimeLabel = new Label("Time: " + dateFormat.format(new Date(chosenTime)));
                 } else {
                    printSelectedTimeLabel = new Label("Time: LONG MAX VALUE");
                 }
                 gridPane.add(printSelectedTimeLabel, 1, 4);
                 GridPane.setHalignment(printSelectedTimeLabel, HPos.LEFT);
                 Label printSelectedPolicyLabel = new Label("Policy: " + chosenPolicy);
                 gridPane.add(printSelectedPolicyLabel, 2, 4);
                 GridPane.setHalignment(printSelectedPolicyLabel, HPos.LEFT);
                 */
        hBox = new HBox();
        hBox.getChildren().addAll(gridPane);

        allValid_ = new ValidBooleanBinding() {
            {
                bind(currentStatedInferredOptionProperty, currentPathProperty, currentTimeProperty);
                setComputeOnInvalidate(true);
            }

            @Override
            protected boolean computeValue() {
                if (currentStatedInferredOptionProperty.get() == null) {
                    this.setInvalidReason("Null/unset/unselected StatedInferredOption");
                    for (RadioButton button : statedInferredOptionButtons) {
                        TextErrorColorHelper.setTextErrorColor(button);
                    }
                    return false;
                } else {
                    for (RadioButton button : statedInferredOptionButtons) {
                        TextErrorColorHelper.clearTextErrorColor(button);
                    }
                }
                if (currentPathProperty.get() == null) {
                    this.setInvalidReason("Null/unset/unselected path");
                    TextErrorColorHelper.setTextErrorColor(pathComboBox);

                    return false;
                } else {
                    TextErrorColorHelper.clearTextErrorColor(pathComboBox);
                }
                if (OTFUtility.getConceptVersion(currentPathProperty.get()) == null) {
                    this.setInvalidReason("Invalid path");
                    TextErrorColorHelper.setTextErrorColor(pathComboBox);

                    return false;
                } else {
                    TextErrorColorHelper.clearTextErrorColor(pathComboBox);
                }
                //               if(currentTimeProperty.get() == null && currentTimeProperty.get() != Long.MAX_VALUE)
                //               {
                //                  this.setInvalidReason("View Coordinate Time is unselected");
                //                  TextErrorColorHelper.setTextErrorColor(timeSelectCombo);
                //                  return false;
                //               }
                this.clearInvalidReason();
                return true;
            }
        };
    }
    //      createButton.disableProperty().bind(saveButtonValid.not()));

    // Reload persisted values every time
    final StatedInferredOptions storedStatedInferredOption = getStoredStatedInferredOption();
    for (Toggle toggle : statedInferredToggleGroup.getToggles()) {
        if (toggle.getUserData() == storedStatedInferredOption) {
            toggle.setSelected(true);
        }
    }

    //      pathComboBox.setButtonCell(new ListCell<UUID>() {
    //         @Override
    //         protected void updateItem(UUID c, boolean emptyRow) {
    //            super.updateItem(c, emptyRow); 
    //            if (emptyRow) {
    //               setText("");
    //            } else {
    //               String desc = OTFUtility.getDescription(c);
    //               setText(desc);
    //            }
    //         }
    //      });
    //      timeSelectCombo.setButtonCell(new ListCell<Long>() {
    //         @Override
    //         protected void updateItem(Long item, boolean emptyRow) {
    //            super.updateItem(item, emptyRow); 
    //            if (emptyRow) {
    //               setText("");
    //            } else {
    //               setText(timeFormatter.format(new Date(item)));
    //            }
    //         }
    //      });

    //      datePickerFirstRun = false;
    //      pathComboFirstRun = false;

    return hBox;
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXChainAttrPane.java

public CFBamJavaFXChainAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamChainObj argFocus) {/*from  w ww . j av  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;
    setJavaFXFocusAsChain(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 = getJavaFXLabelLookupPrevRel();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupPrevRel();
    setHalignment(reference, HPos.LEFT);
    add(reference, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelLookupNextRel();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupNextRel();
    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 = getJavaFXLabelSuffix();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorSuffix();
    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:mesclasses.view.JourneeController.java

private void drawEleveName(SmartGrid grid, Eleve eleve, int rowIndex) {
    //index debute  1, le slot 0,X est rserv pour un separator dans le header
    grid.add(NodeUtil.buildEleveLink(eleve, eleve.lastNameProperty(), Constants.JOURNEE_VIEW), 1, rowIndex,
            HPos.LEFT);

    grid.add(NodeUtil.buildEleveLink(eleve, eleve.firstNameProperty(), Constants.JOURNEE_VIEW), 2, rowIndex,
            HPos.LEFT);/*  www  .  j  ava2  s  .c om*/
    RowConstraints rc = new RowConstraints();
    rc.setMinHeight(35.0);
    rc.setPrefHeight(35.0);
    rc.setMaxHeight(35.0);
    grid.getRowConstraints().add(rc);
    if (!eleve.isInClasse(currentDate.getValue())) {
        grid.add(new Label("ne faisait pas partie de la classe  cette date"), 3, rowIndex,
                vieScolaireGrid.getGridWidth() - 3, 1);
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXRelationColAttrPane.java

public CFBamJavaFXRelationColAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamRelationColObj argFocus) {
    super();//from   ww  w  .j a v  a2 s  .c om
    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;
    setJavaFXFocusAsRelationCol(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 = getJavaFXLabelLookupFromCol();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupFromCol();
    setHalignment(reference, HPos.LEFT);
    add(reference, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelLookupToCol();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupToCol();
    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 = 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:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXId16GenAttrPane.java

public CFBamJavaFXId16GenAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamId16GenObj argFocus) {/*from   ww  w .  j a  v a  2  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;
    setJavaFXFocusAsId16Gen(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 = getJavaFXLabelLookupDispenser();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupDispenser();
    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 = getJavaFXLabelIsNullable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsNullable();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelGenerateId();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorGenerateId();
    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++;

    label = getJavaFXLabelDbName();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDbName();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelInitValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorInitValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDefaultValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDefaultValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMinValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMinValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMaxValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMaxValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelNullValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorNullValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelUnknownValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorUnknownValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelSlice();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorSlice();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelBlockSize();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorBlockSize();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXId32GenAttrPane.java

public CFBamJavaFXId32GenAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamId32GenObj argFocus) {/*  w  w  w  .j  a  v  a 2 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;
    setJavaFXFocusAsId32Gen(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 = getJavaFXLabelLookupDispenser();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupDispenser();
    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 = getJavaFXLabelIsNullable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsNullable();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelGenerateId();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorGenerateId();
    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++;

    label = getJavaFXLabelDbName();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDbName();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelInitValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorInitValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDefaultValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDefaultValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMinValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMinValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMaxValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMaxValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelNullValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorNullValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelUnknownValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorUnknownValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelSlice();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorSlice();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelBlockSize();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorBlockSize();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXId64GenAttrPane.java

public CFBamJavaFXId64GenAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamId64GenObj argFocus) {//from w  ww  .j a va2s . 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;
    setJavaFXFocusAsId64Gen(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 = getJavaFXLabelLookupDispenser();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    reference = getJavaFXReferenceLookupDispenser();
    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 = getJavaFXLabelIsNullable();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorIsNullable();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelGenerateId();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorGenerateId();
    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++;

    label = getJavaFXLabelDbName();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDbName();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelInitValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorInitValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelDefaultValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorDefaultValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMinValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMinValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelMaxValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorMaxValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelNullValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorNullValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelUnknownValue();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorUnknownValue();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelSlice();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorSlice();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    label = getJavaFXLabelBlockSize();
    setHalignment(label, HPos.LEFT);
    add(label, 0, gridRow);

    ctrl = getJavaFXEditorBlockSize();
    setHalignment(ctrl, HPos.LEFT);
    add(ctrl, 1, gridRow);

    gridRow++;

    populateFields();
    adjustComponentEnableStates();
    javafxIsInitializing = false;
}