Example usage for javafx.util Callback Callback

List of usage examples for javafx.util Callback Callback

Introduction

In this page you can find the example usage for javafx.util Callback Callback.

Prototype

Callback

Source Link

Usage

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

public CFBamJavaFXTZTimestampTypeListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamTZTimestampTypeObj argFocus,
        Collection<ICFBamTZTimestampTypeObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*from w ww.ja v  a2s  . 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");
    }
    // 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<ICFBamTZTimestampTypeObj>();
    tableColumnId = new TableColumn<ICFBamTZTimestampTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, Long>, TableCell<ICFBamTZTimestampTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Long> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTZTimestampTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTZTimestampTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTZTimestampTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTZTimestampTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTZTimestampTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTZTimestampTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, Boolean>, TableCell<ICFBamTZTimestampTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTZTimestampTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, Boolean>, TableCell<ICFBamTZTimestampTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTZTimestampTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, Boolean>, TableCell<ICFBamTZTimestampTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTZTimestampTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampTypeObj, 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<ICFBamTZTimestampTypeObj, String>, TableCell<ICFBamTZTimestampTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, String> call(
                        TableColumn<ICFBamTZTimestampTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTZTimestampTypeObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampTypeObj, Calendar> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampTypeObj, Calendar>, TableCell<ICFBamTZTimestampTypeObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampTypeObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamTZTimestampTypeObj 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<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTZTimestampTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamTZTimestampTypeObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamTZTimestampTypeObj> observable,
                        ICFBamTZTimestampTypeObj oldValue, ICFBamTZTimestampTypeObj 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 (observableListOfTZTimestampType != null) {
        dataTable.setItems(observableListOfTZTimestampType);
    }
    adjustListButtons();
}

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

public CFBamJavaFXUuidDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamUuidDefObj argFocus, Collection<ICFBamUuidDefObj> argDataCollection,
        ICFRefreshCallback refreshCallback, boolean sortByChain) {
    super();/*w  ww.  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");
    }
    // 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<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);
        }
    });

    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 (observableListOfUuidDef != null) {
        dataTable.setItems(observableListOfUuidDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXTZTimeDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamTZTimeDefObj argFocus,
        Collection<ICFBamTZTimeDefObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*from   w w  w.ja  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<ICFBamTZTimeDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamTZTimeDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, String> p) {
                    ICFBamTZTimeDefObj 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamTZTimeDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Long>, TableCell<ICFBamTZTimeDefObj, Long>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Long> call(TableColumn<ICFBamTZTimeDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTZTimeDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTZTimeDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTZTimeDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTZTimeDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTZTimeDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTZTimeDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Boolean>, TableCell<ICFBamTZTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTZTimeDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Boolean>, TableCell<ICFBamTZTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTZTimeDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Boolean>, TableCell<ICFBamTZTimeDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimeDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTZTimeDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, String>, TableCell<ICFBamTZTimeDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, String> call(TableColumn<ICFBamTZTimeDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTZTimeDefObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Calendar>, TableCell<ICFBamTZTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimeDefObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTZTimeDefObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Calendar>, TableCell<ICFBamTZTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimeDefObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTZTimeDefObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Calendar>, TableCell<ICFBamTZTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimeDefObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTZTimeDefObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimeDefObj, 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<ICFBamTZTimeDefObj, Calendar>, TableCell<ICFBamTZTimeDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimeDefObj, Calendar> arg) {
                    return new CFTZTimeTableCell<ICFBamTZTimeDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTZTimeDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimeDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTZTimeDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamTZTimeDefObj 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<ICFBamTZTimeDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamTZTimeDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTZTimeDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTZTimeDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTZTimeDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTZTimeDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTZTimeDefObj> observable,
                ICFBamTZTimeDefObj oldValue, ICFBamTZTimeDefObj 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 (observableListOfTZTimeDef != null) {
        dataTable.setItems(observableListOfTZTimeDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXNumberColListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTableObj argContainer, ICFBamNumberColObj argFocus,
        Collection<ICFBamNumberColObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//from w w  w  .jav  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");
    }
    // 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<ICFBamNumberColObj>();
    tableColumnId = new TableColumn<ICFBamNumberColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, Long>, TableCell<ICFBamNumberColObj, Long>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Long> call(TableColumn<ICFBamNumberColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNumberColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNumberColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNumberColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNumberColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNumberColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNumberColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNumberColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNumberColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNumberColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, 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<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnDigits = new TableColumn<ICFBamNumberColObj, Short>("Digits");
    tableColumnDigits.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredDigits();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDigits.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDigits);
    tableColumnPrecis = new TableColumn<ICFBamNumberColObj, Short>("Precision");
    tableColumnPrecis.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredPrecis();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnPrecis.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPrecis);
    tableColumnInitValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj> p) {
                    ICFBamNumberColObj 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<ICFBamNumberColObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNumberColObj> observable,
                ICFBamNumberColObj oldValue, ICFBamNumberColObj 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 (observableListOfNumberCol != null) {
        dataTable.setItems(observableListOfNumberCol);
    }
    adjustListButtons();
}

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

public CFBamJavaFXBoolDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamBoolDefObj argFocus, Collection<ICFBamBoolDefObj> argDataCollection,
        ICFRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from  w ww .j  a va  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<ICFBamBoolDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamBoolDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, String> p) {
                    ICFBamBoolDefObj 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamBoolDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Long>, TableCell<ICFBamBoolDefObj, Long>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Long> call(TableColumn<ICFBamBoolDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamBoolDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamBoolDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamBoolDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamBoolDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamBoolDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamBoolDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Boolean>, TableCell<ICFBamBoolDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Boolean> call(TableColumn<ICFBamBoolDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamBoolDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Boolean>, TableCell<ICFBamBoolDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Boolean> call(TableColumn<ICFBamBoolDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamBoolDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Boolean>, TableCell<ICFBamBoolDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Boolean> call(TableColumn<ICFBamBoolDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamBoolDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamBoolDefObj, Boolean>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Boolean>, TableCell<ICFBamBoolDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Boolean> call(TableColumn<ICFBamBoolDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamBoolDefObj, Boolean>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, Boolean>, TableCell<ICFBamBoolDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, Boolean> call(TableColumn<ICFBamBoolDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnFalseString = new TableColumn<ICFBamBoolDefObj, String>("FalseString");
    tableColumnFalseString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnFalseString);
    tableColumnTrueString = new TableColumn<ICFBamBoolDefObj, String>("TrueString");
    tableColumnTrueString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnTrueString);
    tableColumnNullString = new TableColumn<ICFBamBoolDefObj, String>("NullString");
    tableColumnNullString.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamBoolDefObj, 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<ICFBamBoolDefObj, String>, TableCell<ICFBamBoolDefObj, String>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, String> call(TableColumn<ICFBamBoolDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamBoolDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullString);
    tableColumnLookupDefSchema = new TableColumn<ICFBamBoolDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamBoolDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamBoolDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamBoolDefObj 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<ICFBamBoolDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamBoolDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamBoolDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamBoolDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamBoolDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamBoolDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamBoolDefObj> observable, ICFBamBoolDefObj oldValue,
                ICFBamBoolDefObj 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 (observableListOfBoolDef != null) {
        dataTable.setItems(observableListOfBoolDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXEnumDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamEnumDefObj argFocus, Collection<ICFBamEnumDefObj> argDataCollection,
        ICFRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from  www . 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");
    }
    // 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<ICFBamEnumDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamEnumDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, String> p) {
                    ICFBamEnumDefObj 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamEnumDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, Long>, TableCell<ICFBamEnumDefObj, Long>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Long> call(TableColumn<ICFBamEnumDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamEnumDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamEnumDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamEnumDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamEnumDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamEnumDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamEnumDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, Boolean>, TableCell<ICFBamEnumDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Boolean> call(TableColumn<ICFBamEnumDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamEnumDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, Boolean>, TableCell<ICFBamEnumDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Boolean> call(TableColumn<ICFBamEnumDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamEnumDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, Boolean>, TableCell<ICFBamEnumDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Boolean> call(TableColumn<ICFBamEnumDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamEnumDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamEnumDefObj, 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<ICFBamEnumDefObj, String>, TableCell<ICFBamEnumDefObj, String>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, String> call(TableColumn<ICFBamEnumDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamEnumDefObj, Short>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamEnumDefObj, Short>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamEnumDefObj, Short>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamEnumDefObj, Short>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamEnumDefObj, Short>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamEnumDefObj, Short>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamEnumDefObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamEnumDefObj, Short>, TableCell<ICFBamEnumDefObj, Short>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, Short> call(TableColumn<ICFBamEnumDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamEnumDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamEnumDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamEnumDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamEnumDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamEnumDefObj 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<ICFBamEnumDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamEnumDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamEnumDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamEnumDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamEnumDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamEnumDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamEnumDefObj> observable, ICFBamEnumDefObj oldValue,
                ICFBamEnumDefObj 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 (observableListOfEnumDef != null) {
        dataTable.setItems(observableListOfEnumDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXId64GenListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamId64GenObj argFocus,
        Collection<ICFBamId64GenObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*w  ww.j  a v a2 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<ICFBamId64GenObj>();
    tableColumnId = new TableColumn<ICFBamId64GenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamId64GenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamId64GenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamId64GenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamId64GenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamId64GenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamId64GenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamId64GenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamId64GenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamId64GenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamId64GenObj, Long>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamId64GenObj, Long>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamId64GenObj, Long>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamId64GenObj, Long>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamId64GenObj, Long>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamId64GenObj, Long>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamId64GenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId64GenObj, Short> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredSlice();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnSlice.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Short>, TableCell<ICFBamId64GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Short> call(TableColumn<ICFBamId64GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamId64GenObj, Long>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredBlockSize();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnBlockSize.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamId64GenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamId64GenObj, ICFBamSchemaDefObj> p) {
                    ICFBamId64GenObj 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<ICFBamId64GenObj, ICFBamSchemaDefObj>, TableCell<ICFBamId64GenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamId64GenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamId64GenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamId64GenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupDispenser = new TableColumn<ICFBamId64GenObj, ICFBamTableObj>("Dispensing Table");
    tableColumnLookupDispenser.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, ICFBamTableObj>, ObservableValue<ICFBamTableObj>>() {
                public ObservableValue<ICFBamTableObj> call(
                        CellDataFeatures<ICFBamId64GenObj, ICFBamTableObj> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamTableObj ref = obj.getOptionalLookupDispenser();
                        ReadOnlyObjectWrapper<ICFBamTableObj> observable = new ReadOnlyObjectWrapper<ICFBamTableObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDispenser.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, ICFBamTableObj>, TableCell<ICFBamId64GenObj, ICFBamTableObj>>() {
                @Override
                public TableCell<ICFBamId64GenObj, ICFBamTableObj> call(
                        TableColumn<ICFBamId64GenObj, ICFBamTableObj> arg) {
                    return new CFReferenceTableCell<ICFBamId64GenObj, ICFBamTableObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDispenser);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamId64GenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamId64GenObj> observable, ICFBamId64GenObj oldValue,
                ICFBamId64GenObj 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 (observableListOfId64Gen != null) {
        dataTable.setItems(observableListOfId64Gen);
    }
    adjustListButtons();
}

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

public CFBamJavaFXId16GenListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamId16GenObj argFocus,
        Collection<ICFBamId16GenObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*  ww  w. ja  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");
    }
    // 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<ICFBamId16GenObj>();
    tableColumnId = new TableColumn<ICFBamId16GenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Long>, TableCell<ICFBamId16GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Long> call(TableColumn<ICFBamId16GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamId16GenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamId16GenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamId16GenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamId16GenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamId16GenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamId16GenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamId16GenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamId16GenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamId16GenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamId16GenObj, Short>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamId16GenObj, Short>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamId16GenObj, Short>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamId16GenObj, Short>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamId16GenObj, Short>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamId16GenObj, Short>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamId16GenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredSlice();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnSlice.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamId16GenObj, Short>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredBlockSize();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnBlockSize.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamId16GenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamId16GenObj, ICFBamSchemaDefObj> p) {
                    ICFBamId16GenObj 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<ICFBamId16GenObj, ICFBamSchemaDefObj>, TableCell<ICFBamId16GenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamId16GenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamId16GenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamId16GenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupDispenser = new TableColumn<ICFBamId16GenObj, ICFBamTableObj>("Dispensing Table");
    tableColumnLookupDispenser.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, ICFBamTableObj>, ObservableValue<ICFBamTableObj>>() {
                public ObservableValue<ICFBamTableObj> call(
                        CellDataFeatures<ICFBamId16GenObj, ICFBamTableObj> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamTableObj ref = obj.getOptionalLookupDispenser();
                        ReadOnlyObjectWrapper<ICFBamTableObj> observable = new ReadOnlyObjectWrapper<ICFBamTableObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDispenser.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, ICFBamTableObj>, TableCell<ICFBamId16GenObj, ICFBamTableObj>>() {
                @Override
                public TableCell<ICFBamId16GenObj, ICFBamTableObj> call(
                        TableColumn<ICFBamId16GenObj, ICFBamTableObj> arg) {
                    return new CFReferenceTableCell<ICFBamId16GenObj, ICFBamTableObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDispenser);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamId16GenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamId16GenObj> observable, ICFBamId16GenObj oldValue,
                ICFBamId16GenObj 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 (observableListOfId16Gen != null) {
        dataTable.setItems(observableListOfId16Gen);
    }
    adjustListButtons();
}

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

public CFBamJavaFXId32GenListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamId32GenObj argFocus,
        Collection<ICFBamId32GenObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*ww  w .j a  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");
    }
    // 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<ICFBamId32GenObj>();
    tableColumnId = new TableColumn<ICFBamId32GenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, Long>, TableCell<ICFBamId32GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Long> call(TableColumn<ICFBamId32GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamId32GenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamId32GenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamId32GenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamId32GenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamId32GenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamId32GenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, Boolean>, TableCell<ICFBamId32GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Boolean> call(TableColumn<ICFBamId32GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamId32GenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, Boolean>, TableCell<ICFBamId32GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Boolean> call(TableColumn<ICFBamId32GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamId32GenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, Boolean>, TableCell<ICFBamId32GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Boolean> call(TableColumn<ICFBamId32GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamId32GenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId32GenObj, 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<ICFBamId32GenObj, String>, TableCell<ICFBamId32GenObj, String>>() {
                @Override
                public TableCell<ICFBamId32GenObj, String> call(TableColumn<ICFBamId32GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamId32GenObj, Integer>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamId32GenObj, Integer>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamId32GenObj, Integer>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamId32GenObj, Integer>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamId32GenObj, Integer>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamId32GenObj, Integer>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamInt32DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Integer value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamId32GenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId32GenObj, Short> p) {
                    ICFBamId32GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredSlice();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnSlice.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Short>, TableCell<ICFBamId32GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Short> call(TableColumn<ICFBamId32GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamId32GenObj, Integer>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamId32GenObj, Integer> p) {
                    ICFBamId32GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredBlockSize();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnBlockSize.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, Integer>, TableCell<ICFBamId32GenObj, Integer>>() {
                @Override
                public TableCell<ICFBamId32GenObj, Integer> call(TableColumn<ICFBamId32GenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamId32GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamId32GenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamId32GenObj, ICFBamSchemaDefObj> p) {
                    ICFBamId32GenObj 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<ICFBamId32GenObj, ICFBamSchemaDefObj>, TableCell<ICFBamId32GenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamId32GenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamId32GenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamId32GenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupDispenser = new TableColumn<ICFBamId32GenObj, ICFBamTableObj>("Dispensing Table");
    tableColumnLookupDispenser.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId32GenObj, ICFBamTableObj>, ObservableValue<ICFBamTableObj>>() {
                public ObservableValue<ICFBamTableObj> call(
                        CellDataFeatures<ICFBamId32GenObj, ICFBamTableObj> p) {
                    ICFBamId32GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamTableObj ref = obj.getOptionalLookupDispenser();
                        ReadOnlyObjectWrapper<ICFBamTableObj> observable = new ReadOnlyObjectWrapper<ICFBamTableObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDispenser.setCellFactory(
            new Callback<TableColumn<ICFBamId32GenObj, ICFBamTableObj>, TableCell<ICFBamId32GenObj, ICFBamTableObj>>() {
                @Override
                public TableCell<ICFBamId32GenObj, ICFBamTableObj> call(
                        TableColumn<ICFBamId32GenObj, ICFBamTableObj> arg) {
                    return new CFReferenceTableCell<ICFBamId32GenObj, ICFBamTableObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDispenser);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamId32GenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamId32GenObj> observable, ICFBamId32GenObj oldValue,
                ICFBamId32GenObj 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 (observableListOfId32Gen != null) {
        dataTable.setItems(observableListOfId32Gen);
    }
    adjustListButtons();
}

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

public CFBamJavaFXNumberTypeListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamNumberTypeObj argFocus,
        Collection<ICFBamNumberTypeObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//w  ww  .j a v a 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");
    }
    // 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<ICFBamNumberTypeObj>();
    tableColumnId = new TableColumn<ICFBamNumberTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, Long>, TableCell<ICFBamNumberTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Long> call(TableColumn<ICFBamNumberTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNumberTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNumberTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNumberTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNumberTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNumberTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNumberTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNumberTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNumberTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNumberTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, 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<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnDigits = new TableColumn<ICFBamNumberTypeObj, Short>("Digits");
    tableColumnDigits.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberTypeObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredDigits();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDigits.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Short>, TableCell<ICFBamNumberTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Short> call(TableColumn<ICFBamNumberTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDigits);
    tableColumnPrecis = new TableColumn<ICFBamNumberTypeObj, Short>("Precision");
    tableColumnPrecis.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberTypeObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredPrecis();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnPrecis.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Short>, TableCell<ICFBamNumberTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Short> call(TableColumn<ICFBamNumberTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPrecis);
    tableColumnInitValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNumberTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNumberTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamNumberTypeObj 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<ICFBamNumberTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNumberTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNumberTypeObj> observable,
                ICFBamNumberTypeObj oldValue, ICFBamNumberTypeObj 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 (observableListOfNumberType != null) {
        dataTable.setItems(observableListOfNumberType);
    }
    adjustListButtons();
}