Example usage for javafx.scene.control TableColumn TableColumn

List of usage examples for javafx.scene.control TableColumn TableColumn

Introduction

In this page you can find the example usage for javafx.scene.control TableColumn TableColumn.

Prototype

public TableColumn(String text) 

Source Link

Document

Creates a TableColumn with the text set to the provided string, with default cell factory, comparator, and onEditCommit implementation.

Usage

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

public CFBamJavaFXPopSubDep3ListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamPopSubDep2Obj argContainer, ICFBamPopSubDep3Obj argFocus,
        Collection<ICFBamPopSubDep3Obj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*from   w w w  . ja  va2 s.co m*/
    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;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamPopSubDep3Obj>();
    tableColumnId = new TableColumn<ICFBamPopSubDep3Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamPopSubDep3Obj, Long> p) {
                    ICFBamScopeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep3Obj, Long>, TableCell<ICFBamPopSubDep3Obj, Long>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, Long> call(TableColumn<ICFBamPopSubDep3Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamPopSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamPopSubDep3Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamPopSubDep3Obj, String> p) {
                    ICFBamPopSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep3Obj, String>, TableCell<ICFBamPopSubDep3Obj, String>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, String> call(
                        TableColumn<ICFBamPopSubDep3Obj, String> arg) {
                    return new CFStringTableCell<ICFBamPopSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamRelationObj> p) {
                    ICFBamPopSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj>, TableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> p) {
                    ICFBamPopSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>, TableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamPopSubDep3Obj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamPopSubDep3Obj> observable,
                ICFBamPopSubDep3Obj oldValue, ICFBamPopSubDep3Obj newValue) {
            setJavaFXFocus(newValue);
        }
    });

    scrollMenu = new ScrollPane();
    scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER);
    scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED);
    scrollMenu.setFitToHeight(true);
    scrollMenu.setContent(getPanelHBoxMenu());

    setTop(scrollMenu);
    setCenter(dataTable);
    javafxIsInitializing = false;
    if (observableListOfPopSubDep3 != null) {
        dataTable.setItems(observableListOfPopSubDep3);
    }
    adjustListButtons();
}

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

public CFBamJavaFXUuidDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamUuidDefObj argFocus, ICFBamScopeObj argContainer, Collection<ICFBamUuidDefObj> argDataCollection,
        ICFBamJavaFXUuidDefChosen whenChosen) {
    super();//from ww  w  .  ja  v  a2s.  co  m
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamUuidDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamUuidDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String classCode = obj.getClassCode();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(classCode);
                        return (observable);
                    }
                }
            });
    tableColumnObjKind.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamUuidDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamUuidDefObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, Long>, TableCell<ICFBamUuidDefObj, Long>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, Long> call(TableColumn<ICFBamUuidDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamUuidDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamUuidDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamUuidDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamUuidDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamUuidDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamUuidDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, Boolean>, TableCell<ICFBamUuidDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, Boolean> call(TableColumn<ICFBamUuidDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamUuidDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, Boolean>, TableCell<ICFBamUuidDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, Boolean> call(TableColumn<ICFBamUuidDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamUuidDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, Boolean>, TableCell<ICFBamUuidDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, Boolean> call(TableColumn<ICFBamUuidDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamUuidDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidDefObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, String>, TableCell<ICFBamUuidDefObj, String>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, String> call(TableColumn<ICFBamUuidDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamUuidDefObj, UUID>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidDefObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, UUID>, TableCell<ICFBamUuidDefObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, UUID> call(TableColumn<ICFBamUuidDefObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamUuidDefObj, UUID>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidDefObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, UUID>, TableCell<ICFBamUuidDefObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, UUID> call(TableColumn<ICFBamUuidDefObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamUuidDefObj, UUID>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidDefObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, UUID>, TableCell<ICFBamUuidDefObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, UUID> call(TableColumn<ICFBamUuidDefObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamUuidDefObj, UUID>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidDefObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, UUID>, TableCell<ICFBamUuidDefObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, UUID> call(TableColumn<ICFBamUuidDefObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamUuidDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamUuidDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamUuidDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamUuidDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamUuidDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamUuidDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamUuidDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamUuidDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamUuidDefObj> observable, ICFBamUuidDefObj oldValue,
                ICFBamUuidDefObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseUuidDef(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamUuidDefObj selectedInstance = getJavaFXFocusAsUuidDef();
                invokeWhenChosen.choseUuidDef(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXBoolColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamBoolColObj argFocus, ICFBamTableObj argContainer, Collection<ICFBamBoolColObj> argDataCollection,
        ICFBamJavaFXBoolColChosen whenChosen) {
    super();/*from   w  w w . ja va 2s.c o  m*/
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamBoolColObj>();
    tableColumnId = new TableColumn<ICFBamBoolColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamBoolColObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Long>, TableCell<ICFBamBoolColObj, Long>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Long> call(TableColumn<ICFBamBoolColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamBoolColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamBoolColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamBoolColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamBoolColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamBoolColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamBoolColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Boolean>, TableCell<ICFBamBoolColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Boolean> call(TableColumn<ICFBamBoolColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamBoolColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Boolean>, TableCell<ICFBamBoolColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Boolean> call(TableColumn<ICFBamBoolColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamBoolColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Boolean>, TableCell<ICFBamBoolColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Boolean> call(TableColumn<ICFBamBoolColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamBoolColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamBoolColObj, Boolean>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolColObj, Boolean> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Boolean>, TableCell<ICFBamBoolColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Boolean> call(TableColumn<ICFBamBoolColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamBoolColObj, Boolean>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolColObj, Boolean> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, Boolean>, TableCell<ICFBamBoolColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolColObj, Boolean> call(TableColumn<ICFBamBoolColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnFalseString = new TableColumn<ICFBamBoolColObj, String>("FalseString");
    tableColumnFalseString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalFalseString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnFalseString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnFalseString);
    tableColumnTrueString = new TableColumn<ICFBamBoolColObj, String>("TrueString");
    tableColumnTrueString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalTrueString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnTrueString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnTrueString);
    tableColumnNullString = new TableColumn<ICFBamBoolColObj, String>("NullString");
    tableColumnNullString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolColObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, String>, TableCell<ICFBamBoolColObj, String>>() {
                @Override
                public TableCell<ICFBamBoolColObj, String> call(TableColumn<ICFBamBoolColObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullString);
    tableColumnLookupDefSchema = new TableColumn<ICFBamBoolColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamBoolColObj, ICFBamSchemaDefObj> p) {
                    ICFBamBoolColObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamBoolColObj, ICFBamSchemaDefObj>, TableCell<ICFBamBoolColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamBoolColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamBoolColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamBoolColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamBoolColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamBoolColObj> observable, ICFBamBoolColObj oldValue,
                ICFBamBoolColObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseBoolCol(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamBoolColObj selectedInstance = getJavaFXFocusAsBoolCol();
                invokeWhenChosen.choseBoolCol(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXClearSubDep1ListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearTopDepObj argContainer, ICFBamClearSubDep1Obj argFocus,
        Collection<ICFBamClearSubDep1Obj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*from  w w w.  j  a  v a 2 s. c  o m*/
    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;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamClearSubDep1Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep1Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep1Obj, Long> p) {
                    ICFBamScopeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep1Obj, Long>, TableCell<ICFBamClearSubDep1Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, Long> call(
                        TableColumn<ICFBamClearSubDep1Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep1Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep1Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep1Obj, String> p) {
                    ICFBamClearSubDep1Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep1Obj, String>, TableCell<ICFBamClearSubDep1Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, String> call(
                        TableColumn<ICFBamClearSubDep1Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep1Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep1Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep1Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep1Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep1Obj> observable,
                        ICFBamClearSubDep1Obj oldValue, ICFBamClearSubDep1Obj newValue) {
                    setJavaFXFocus(newValue);
                }
            });

    scrollMenu = new ScrollPane();
    scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER);
    scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED);
    scrollMenu.setFitToHeight(true);
    scrollMenu.setContent(getPanelHBoxMenu());

    setTop(scrollMenu);
    setCenter(dataTable);
    javafxIsInitializing = false;
    if (observableListOfClearSubDep1 != null) {
        dataTable.setItems(observableListOfClearSubDep1);
    }
    adjustListButtons();
}

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

public CFBamJavaFXClearSubDep2ListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearSubDep1Obj argContainer, ICFBamClearSubDep2Obj argFocus,
        Collection<ICFBamClearSubDep2Obj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*from   w w w. j  a va  2 s  .  co  m*/
    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;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamClearSubDep2Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep2Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep2Obj, Long> p) {
                    ICFBamScopeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep2Obj, Long>, TableCell<ICFBamClearSubDep2Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, Long> call(
                        TableColumn<ICFBamClearSubDep2Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep2Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep2Obj, String> p) {
                    ICFBamClearSubDep2Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep2Obj, String>, TableCell<ICFBamClearSubDep2Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, String> call(
                        TableColumn<ICFBamClearSubDep2Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep2Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep2Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep2Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep2Obj> observable,
                        ICFBamClearSubDep2Obj oldValue, ICFBamClearSubDep2Obj newValue) {
                    setJavaFXFocus(newValue);
                }
            });

    scrollMenu = new ScrollPane();
    scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER);
    scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED);
    scrollMenu.setFitToHeight(true);
    scrollMenu.setContent(getPanelHBoxMenu());

    setTop(scrollMenu);
    setCenter(dataTable);
    javafxIsInitializing = false;
    if (observableListOfClearSubDep2 != null) {
        dataTable.setItems(observableListOfClearSubDep2);
    }
    adjustListButtons();
}

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

public CFBamJavaFXClearSubDep3ListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearSubDep2Obj argContainer, ICFBamClearSubDep3Obj argFocus,
        Collection<ICFBamClearSubDep3Obj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//from w  w  w . j a  v  a  2s . com
    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;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamClearSubDep3Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep3Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep3Obj, Long> p) {
                    ICFBamScopeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep3Obj, Long>, TableCell<ICFBamClearSubDep3Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, Long> call(
                        TableColumn<ICFBamClearSubDep3Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep3Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep3Obj, String> p) {
                    ICFBamClearSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep3Obj, String>, TableCell<ICFBamClearSubDep3Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, String> call(
                        TableColumn<ICFBamClearSubDep3Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep3Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep3Obj> observable,
                        ICFBamClearSubDep3Obj oldValue, ICFBamClearSubDep3Obj newValue) {
                    setJavaFXFocus(newValue);
                }
            });

    scrollMenu = new ScrollPane();
    scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER);
    scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED);
    scrollMenu.setFitToHeight(true);
    scrollMenu.setContent(getPanelHBoxMenu());

    setTop(scrollMenu);
    setCenter(dataTable);
    javafxIsInitializing = false;
    if (observableListOfClearSubDep3 != null) {
        dataTable.setItems(observableListOfClearSubDep3);
    }
    adjustListButtons();
}

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

public CFBamJavaFXTZTimeTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTZTimeTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamTZTimeTypeObj> argDataCollection, ICFBamJavaFXTZTimeTypeChosen whenChosen) {
    super();//from w  w  w .j a v a  2s  . co m
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamTZTimeTypeObj>();
    tableColumnId = new TableColumn<ICFBamTZTimeTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTZTimeTypeObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Long>, TableCell<ICFBamTZTimeTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Long> call(TableColumn<ICFBamTZTimeTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTZTimeTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTZTimeTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTZTimeTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTZTimeTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTZTimeTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTZTimeTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Boolean>, TableCell<ICFBamTZTimeTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimeTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTZTimeTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Boolean>, TableCell<ICFBamTZTimeTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimeTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTZTimeTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Boolean>, TableCell<ICFBamTZTimeTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimeTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTZTimeTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeTypeObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, String>, TableCell<ICFBamTZTimeTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, String> call(
                        TableColumn<ICFBamTZTimeTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTZTimeTypeObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeTypeObj, Calendar> p) {
                    ICFBamTZTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Calendar>, TableCell<ICFBamTZTimeTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimeTypeObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTZTimeTypeObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeTypeObj, Calendar> p) {
                    ICFBamTZTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Calendar>, TableCell<ICFBamTZTimeTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimeTypeObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTZTimeTypeObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeTypeObj, Calendar> p) {
                    ICFBamTZTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Calendar>, TableCell<ICFBamTZTimeTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimeTypeObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTZTimeTypeObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeTypeObj, Calendar> p) {
                    ICFBamTZTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, Calendar>, TableCell<ICFBamTZTimeTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimeTypeObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamTZTimeTypeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTZTimeTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTZTimeTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTZTimeTypeObj> observable,
                ICFBamTZTimeTypeObj oldValue, ICFBamTZTimeTypeObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseTZTimeType(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType();
                invokeWhenChosen.choseTZTimeType(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXTimeDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTimeDefObj argFocus, ICFBamScopeObj argContainer, Collection<ICFBamTimeDefObj> argDataCollection,
        ICFBamJavaFXTimeDefChosen whenChosen) {
    super();/*from   w w  w. java 2s.com*/
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamTimeDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamTimeDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String classCode = obj.getClassCode();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(classCode);
                        return (observable);
                    }
                }
            });
    tableColumnObjKind.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamTimeDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTimeDefObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Long>, TableCell<ICFBamTimeDefObj, Long>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Long> call(TableColumn<ICFBamTimeDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTimeDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTimeDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTimeDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTimeDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTimeDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTimeDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimeDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Boolean>, TableCell<ICFBamTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Boolean> call(TableColumn<ICFBamTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTimeDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimeDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Boolean>, TableCell<ICFBamTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Boolean> call(TableColumn<ICFBamTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTimeDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimeDefObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Boolean>, TableCell<ICFBamTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Boolean> call(TableColumn<ICFBamTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTimeDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimeDefObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, String>, TableCell<ICFBamTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, String> call(TableColumn<ICFBamTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTimeDefObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimeDefObj, Calendar> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Calendar>, TableCell<ICFBamTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Calendar> call(TableColumn<ICFBamTimeDefObj, Calendar> arg) {
                    return new CFTimeTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTimeDefObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimeDefObj, Calendar> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Calendar>, TableCell<ICFBamTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Calendar> call(TableColumn<ICFBamTimeDefObj, Calendar> arg) {
                    return new CFTimeTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTimeDefObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimeDefObj, Calendar> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Calendar>, TableCell<ICFBamTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Calendar> call(TableColumn<ICFBamTimeDefObj, Calendar> arg) {
                    return new CFTimeTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTimeDefObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimeDefObj, Calendar> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, Calendar>, TableCell<ICFBamTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, Calendar> call(TableColumn<ICFBamTimeDefObj, Calendar> arg) {
                    return new CFTimeTableCell<ICFBamTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTimeDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimeDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTimeDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamTimeDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamTimeDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamTimeDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTimeDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTimeDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTimeDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTimeDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTimeDefObj> observable, ICFBamTimeDefObj oldValue,
                ICFBamTimeDefObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseTimeDef(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamTimeDefObj selectedInstance = getJavaFXFocusAsTimeDef();
                invokeWhenChosen.choseTimeDef(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXUuidTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamUuidTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamUuidTypeObj> argDataCollection, ICFBamJavaFXUuidTypeChosen whenChosen) {
    super();//from www.  jav  a2s .  co  m
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamUuidTypeObj>();
    tableColumnObjKind = new TableColumn<ICFBamUuidTypeObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamUuidTypeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String classCode = obj.getClassCode();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(classCode);
                        return (observable);
                    }
                }
            });
    tableColumnObjKind.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamUuidTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamUuidTypeObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, Long>, TableCell<ICFBamUuidTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, Long> call(TableColumn<ICFBamUuidTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamUuidTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamUuidTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamUuidTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamUuidTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamUuidTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamUuidTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, Boolean>, TableCell<ICFBamUuidTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, Boolean> call(TableColumn<ICFBamUuidTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamUuidTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, Boolean>, TableCell<ICFBamUuidTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, Boolean> call(TableColumn<ICFBamUuidTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamUuidTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, Boolean>, TableCell<ICFBamUuidTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, Boolean> call(TableColumn<ICFBamUuidTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamUuidTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidTypeObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, String>, TableCell<ICFBamUuidTypeObj, String>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, String> call(TableColumn<ICFBamUuidTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamUuidTypeObj, UUID>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidTypeObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, UUID>, TableCell<ICFBamUuidTypeObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, UUID> call(TableColumn<ICFBamUuidTypeObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamUuidTypeObj, UUID>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidTypeObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, UUID>, TableCell<ICFBamUuidTypeObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, UUID> call(TableColumn<ICFBamUuidTypeObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamUuidTypeObj, UUID>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidTypeObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, UUID>, TableCell<ICFBamUuidTypeObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, UUID> call(TableColumn<ICFBamUuidTypeObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamUuidTypeObj, UUID>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidTypeObj, UUID> p) {
                    ICFBamUuidDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        UUID value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<UUID> observable = new ReadOnlyObjectWrapper<UUID>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, UUID>, TableCell<ICFBamUuidTypeObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, UUID> call(TableColumn<ICFBamUuidTypeObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamUuidTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamUuidTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamUuidTypeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamUuidTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamUuidTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamUuidTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamUuidTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamUuidTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamUuidTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamUuidTypeObj> observable, ICFBamUuidTypeObj oldValue,
                ICFBamUuidTypeObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseUuidType(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamUuidTypeObj selectedInstance = getJavaFXFocusAsUuidType();
                invokeWhenChosen.choseUuidType(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXBoolTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamBoolTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamBoolTypeObj> argDataCollection, ICFBamJavaFXBoolTypeChosen whenChosen) {
    super();/*from w ww.  j  a  v a2  s  . c  om*/
    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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamBoolTypeObj>();
    tableColumnId = new TableColumn<ICFBamBoolTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamBoolTypeObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Long>, TableCell<ICFBamBoolTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Long> call(TableColumn<ICFBamBoolTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamBoolTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamBoolTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamBoolTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamBoolTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamBoolTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamBoolTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Boolean>, TableCell<ICFBamBoolTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Boolean> call(TableColumn<ICFBamBoolTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamBoolTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Boolean>, TableCell<ICFBamBoolTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Boolean> call(TableColumn<ICFBamBoolTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamBoolTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Boolean>, TableCell<ICFBamBoolTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Boolean> call(TableColumn<ICFBamBoolTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamBoolTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamBoolTypeObj, Boolean>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolTypeObj, Boolean> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Boolean>, TableCell<ICFBamBoolTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Boolean> call(TableColumn<ICFBamBoolTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamBoolTypeObj, Boolean>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolTypeObj, Boolean> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, Boolean>, TableCell<ICFBamBoolTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, Boolean> call(TableColumn<ICFBamBoolTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnFalseString = new TableColumn<ICFBamBoolTypeObj, String>("FalseString");
    tableColumnFalseString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalFalseString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnFalseString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnFalseString);
    tableColumnTrueString = new TableColumn<ICFBamBoolTypeObj, String>("TrueString");
    tableColumnTrueString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalTrueString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnTrueString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnTrueString);
    tableColumnNullString = new TableColumn<ICFBamBoolTypeObj, String>("NullString");
    tableColumnNullString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolTypeObj, String> p) {
                    ICFBamBoolDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullString();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullString.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, String>, TableCell<ICFBamBoolTypeObj, String>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, String> call(TableColumn<ICFBamBoolTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullString);
    tableColumnLookupDefSchema = new TableColumn<ICFBamBoolTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamBoolTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamBoolTypeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamBoolTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamBoolTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamBoolTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamBoolTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamBoolTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamBoolTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamBoolTypeObj> observable, ICFBamBoolTypeObj oldValue,
                ICFBamBoolTypeObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseBoolType(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamBoolTypeObj selectedInstance = getJavaFXFocusAsBoolType();
                invokeWhenChosen.choseBoolType(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}