Example usage for java.lang Short Short

List of usage examples for java.lang Short Short

Introduction

In this page you can find the example usage for java.lang Short Short.

Prototype

@Deprecated(since = "9")
public Short(String s) throws NumberFormatException 

Source Link

Document

Constructs a newly allocated Short object that represents the short value indicated by the String parameter.

Usage

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

public CFBamJavaFXStringColListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTableObj argContainer, ICFBamStringColObj argFocus,
        Collection<ICFBamStringColObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//from   w ww . j a  v a2 s .co m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamStringColObj>();
    tableColumnId = new TableColumn<ICFBamStringColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, Long>, TableCell<ICFBamStringColObj, Long>>() {
                @Override
                public TableCell<ICFBamStringColObj, Long> call(TableColumn<ICFBamStringColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamStringColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamStringColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamStringColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamStringColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamStringColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamStringColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, Boolean>, TableCell<ICFBamStringColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringColObj, Boolean> call(
                        TableColumn<ICFBamStringColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamStringColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, Boolean>, TableCell<ICFBamStringColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringColObj, Boolean> call(
                        TableColumn<ICFBamStringColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamStringColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, Boolean>, TableCell<ICFBamStringColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringColObj, Boolean> call(
                        TableColumn<ICFBamStringColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamStringColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, 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<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamStringColObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamStringColObj, Integer> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, Integer>, TableCell<ICFBamStringColObj, Integer>>() {
                @Override
                public TableCell<ICFBamStringColObj, Integer> call(
                        TableColumn<ICFBamStringColObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnShowLines = new TableColumn<ICFBamStringColObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamStringColObj, Short> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, Short>, TableCell<ICFBamStringColObj, Short>>() {
                @Override
                public TableCell<ICFBamStringColObj, Short> call(TableColumn<ICFBamStringColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnInitValue = new TableColumn<ICFBamStringColObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamStringColObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamStringColObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamStringColObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringColObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringColObj, String>, TableCell<ICFBamStringColObj, String>>() {
                @Override
                public TableCell<ICFBamStringColObj, String> call(TableColumn<ICFBamStringColObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamStringColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamStringColObj, ICFBamSchemaDefObj> p) {
                    ICFBamStringColObj 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<ICFBamStringColObj, ICFBamSchemaDefObj>, TableCell<ICFBamStringColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamStringColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamStringColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamStringColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamStringColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamStringColObj> observable,
                ICFBamStringColObj oldValue, ICFBamStringColObj 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 (observableListOfStringCol != null) {
        dataTable.setItems(observableListOfStringCol);
    }
    adjustListButtons();
}

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

public CFBamJavaFXStringDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamStringDefObj argFocus, ICFBamScopeObj argContainer,
        Collection<ICFBamStringDefObj> argDataCollection, ICFBamJavaFXStringDefChosen whenChosen) {
    super();//  w  w w. jav  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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamStringDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamStringDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamStringDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Long>, TableCell<ICFBamStringDefObj, Long>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Long> call(TableColumn<ICFBamStringDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamStringDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamStringDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamStringDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamStringDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamStringDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamStringDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamStringDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamStringDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamStringDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamStringDefObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamStringDefObj, Integer> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, Integer>, TableCell<ICFBamStringDefObj, Integer>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Integer> call(
                        TableColumn<ICFBamStringDefObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnShowLines = new TableColumn<ICFBamStringDefObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamStringDefObj, Short> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, Short>, TableCell<ICFBamStringDefObj, Short>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Short> call(TableColumn<ICFBamStringDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnInitValue = new TableColumn<ICFBamStringDefObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamStringDefObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamStringDefObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamStringDefObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamStringDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamStringDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamStringDefObj 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<ICFBamStringDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamStringDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamStringDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamStringDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamStringDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamStringDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamStringDefObj> observable,
                ICFBamStringDefObj oldValue, ICFBamStringDefObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseStringDef(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamStringDefObj selectedInstance = getJavaFXFocusAsStringDef();
                invokeWhenChosen.choseStringDef(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

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

public CFBamJavaFXStringTypeListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamStringTypeObj argFocus,
        Collection<ICFBamStringTypeObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();/*  w ww .  j  a v  a 2  s.  c  o  m*/
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamStringTypeObj>();
    tableColumnId = new TableColumn<ICFBamStringTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, Long>, TableCell<ICFBamStringTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Long> call(TableColumn<ICFBamStringTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamStringTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamStringTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamStringTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamStringTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamStringTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamStringTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, Boolean>, TableCell<ICFBamStringTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Boolean> call(
                        TableColumn<ICFBamStringTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamStringTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, Boolean>, TableCell<ICFBamStringTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Boolean> call(
                        TableColumn<ICFBamStringTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamStringTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, Boolean>, TableCell<ICFBamStringTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Boolean> call(
                        TableColumn<ICFBamStringTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamStringTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, 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<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamStringTypeObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamStringTypeObj, Integer> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, Integer>, TableCell<ICFBamStringTypeObj, Integer>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Integer> call(
                        TableColumn<ICFBamStringTypeObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnShowLines = new TableColumn<ICFBamStringTypeObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamStringTypeObj, Short> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, Short>, TableCell<ICFBamStringTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, Short> call(TableColumn<ICFBamStringTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnInitValue = new TableColumn<ICFBamStringTypeObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamStringTypeObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamStringTypeObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamStringTypeObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringTypeObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringTypeObj, String>, TableCell<ICFBamStringTypeObj, String>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, String> call(
                        TableColumn<ICFBamStringTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamStringTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamStringTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamStringTypeObj 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<ICFBamStringTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamStringTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamStringTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamStringTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamStringTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamStringTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamStringTypeObj> observable,
                ICFBamStringTypeObj oldValue, ICFBamStringTypeObj 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 (observableListOfStringType != null) {
        dataTable.setItems(observableListOfStringType);
    }
    adjustListButtons();
}

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

public CFBamJavaFXNumberDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamNumberDefObj argFocus,
        Collection<ICFBamNumberDefObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//w  w w.j  a  v a 2  s.  c  o m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamNumberDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamNumberDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, String> p) {
                    ICFBamNumberDefObj 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamNumberDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Long>, TableCell<ICFBamNumberDefObj, Long>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Long> call(TableColumn<ICFBamNumberDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNumberDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNumberDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNumberDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNumberDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNumberDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNumberDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Boolean>, TableCell<ICFBamNumberDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Boolean> call(
                        TableColumn<ICFBamNumberDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNumberDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Boolean>, TableCell<ICFBamNumberDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Boolean> call(
                        TableColumn<ICFBamNumberDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNumberDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Boolean>, TableCell<ICFBamNumberDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Boolean> call(
                        TableColumn<ICFBamNumberDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNumberDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, String>, TableCell<ICFBamNumberDefObj, String>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, String> call(TableColumn<ICFBamNumberDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnDigits = new TableColumn<ICFBamNumberDefObj, Short>("Digits");
    tableColumnDigits.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Short>, TableCell<ICFBamNumberDefObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Short> call(TableColumn<ICFBamNumberDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDigits);
    tableColumnPrecis = new TableColumn<ICFBamNumberDefObj, Short>("Precision");
    tableColumnPrecis.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, Short>, TableCell<ICFBamNumberDefObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, Short> call(TableColumn<ICFBamNumberDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPrecis);
    tableColumnInitValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNumberDefObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberDefObj, 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<ICFBamNumberDefObj, BigDecimal>, TableCell<ICFBamNumberDefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, BigDecimal> call(
                        TableColumn<ICFBamNumberDefObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberDefObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNumberDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNumberDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamNumberDefObj 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<ICFBamNumberDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNumberDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNumberDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNumberDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNumberDefObj> observable,
                ICFBamNumberDefObj oldValue, ICFBamNumberDefObj 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 (observableListOfNumberDef != null) {
        dataTable.setItems(observableListOfNumberDef);
    }
    adjustListButtons();
}

From source file:org.mwc.debrief.editable.test.EditableTests.java

private Editable getEditable(IType type) {
    Editable editable = null;/* ww w . j  av a  2s  .  co  m*/
    switch (type.getFullyQualifiedName()) {
    case "Debrief.Wrappers.SensorWrapper":
        SensorWrapper sensor = new SensorWrapper("tester");
        final java.util.Calendar cal = new java.util.GregorianCalendar(2001, 10, 4, 4, 4, 0);

        // and create the list of sensor contact data items
        cal.set(2001, 10, 4, 4, 4, 0);
        sensor.add(new SensorContactWrapper("tester", new HiResDate(cal.getTime().getTime()), null, null, null,
                null, null, 1, sensor.getName()));

        cal.set(2001, 10, 4, 4, 4, 23);
        sensor.add(new SensorContactWrapper("tester", new HiResDate(cal.getTime().getTime()), null, null, null,
                null, null, 1, sensor.getName()));
        editable = sensor;
        break;
    case "MWC.GUI.Shapes.ChartFolio":
        editable = new ChartFolio(false, Color.white);
        break;
    case "org.mwc.cmap.naturalearth.wrapper.NELayer":
        editable = new NELayer(Activator.getDefault().getDefaultStyleSet());
        break;
    case "MWC.GUI.VPF.CoverageLayer$ReferenceCoverageLayer":
        final LibrarySelectionTable LST = null;
        final DebriefFeatureWarehouse myWarehouse = new DebriefFeatureWarehouse();
        final FeaturePainter fp = new FeaturePainter("libref", "Coastline");
        fp.setVisible(true);
        editable = new CoverageLayer.ReferenceCoverageLayer(LST, myWarehouse, "libref", "libref", "Coastline",
                fp);
        break;
    case "MWC.GUI.Chart.Painters.ETOPOPainter":
        editable = new ETOPOPainter("etopo", null);
        break;
    case "MWC.GUI.ETOPO.ETOPO_2_Minute":
        editable = new ETOPO_2_Minute("etopo");
        break;
    case "MWC.GUI.ExternallyManagedDataLayer":
        editable = new ExternallyManagedDataLayer("test", "test", "test");
        break;
    case "MWC.GUI.Shapes.CircleShape":
        editable = new CircleShape(new WorldLocation(2d, 2d, 2d), 2d);
        break;
    case "Debrief.Wrappers.Track.SplittableLayer":
        editable = new SplittableLayer(true);
        break;
    case "org.mwc.debrief.satc_interface.data.SATC_Solution":
        final ISolversManager solvMgr = SATC_Activator.getDefault().getService(ISolversManager.class, true);
        final ISolver newSolution = solvMgr.createSolver("test");
        editable = new SATC_Solution(newSolution);
        break;
    case "MWC.GUI.Shapes.PolygonShape":
        editable = new PolygonShape(null);
        break;
    case "ASSET.GUI.Painters.NoiseSourcePainter":
        editable = new ASSET.GUI.Painters.NoiseSourcePainter.PainterTest().getEditable();
        break;
    case "ASSET.GUI.Painters.ScenarioNoiseLevelPainter":
        editable = new ASSET.GUI.Painters.ScenarioNoiseLevelPainter.NoiseLevelTest().getEditable();
        break;
    case "ASSET.GUI.Workbench.Plotters.ScenarioParticipantWrapper":
        editable = new ScenarioParticipantWrapper(new SSN(12), null);
        break;
    case "Debrief.Wrappers.PolygonWrapper":
        // get centre of area
        WorldLocation centre = new WorldLocation(12, 12, 12);
        // create the shape, based on the centre
        final Vector<PolygonNode> path2 = new Vector<PolygonNode>();
        final PolygonShape newShape = new PolygonShape(path2);
        // and now wrap the shape
        final PolygonWrapper theWrapper = new PolygonWrapper("New Polygon", newShape, PlainShape.DEFAULT_COLOR,
                null);
        // store the new point
        newShape.add(new PolygonNode("1", centre, (PolygonShape) theWrapper.getShape()));
        editable = theWrapper;
        break;
    case "Debrief.Wrappers.Track.AbsoluteTMASegment":
        WorldSpeed speed = new WorldSpeed(5, WorldSpeed.Kts);
        double course = 33;
        WorldLocation origin = new WorldLocation(12, 12, 12);
        HiResDate startTime = new HiResDate(11 * 60 * 1000);
        HiResDate endTime = new HiResDate(17 * 60 * 1000);
        editable = new AbsoluteTMASegment(course, speed, origin, startTime, endTime);
        break;
    case "Debrief.Wrappers.Track.RelativeTMASegment":
        speed = new WorldSpeed(5, WorldSpeed.Kts);
        course = 33;
        final WorldVector offset = new WorldVector(12, 12, 0);
        editable = new RelativeTMASegment(course, speed, offset, null);
        break;
    case "Debrief.Wrappers.Track.PlanningSegment":
        speed = new WorldSpeed(5, WorldSpeed.Kts);
        course = 33;
        final WorldDistance worldDistance = new WorldDistance(5, WorldDistance.MINUTES);
        editable = new PlanningSegment("test", course, speed, worldDistance, Color.WHITE);
        break;
    case "org.mwc.debrief.satc_interface.data.wrappers.BMC_Wrapper":
        BearingMeasurementContribution bmc = new BearingMeasurementContribution();
        bmc.setName("Measured bearing");
        bmc.setAutoDetect(false);
        editable = new BMC_Wrapper(bmc);
        break;
    case "org.mwc.debrief.satc_interface.data.wrappers.FMC_Wrapper":
        FrequencyMeasurementContribution fmc = new FrequencyMeasurementContribution();
        fmc.setName("Measured frequence");
        editable = new FMC_Wrapper(fmc);
        break;
    case "Debrief.Wrappers.SensorContactWrapper":
        origin = new WorldLocation(0, 0, 0);
        editable = new SensorContactWrapper("blank track", new HiResDate(new java.util.Date().getTime()),
                new WorldDistance(1, WorldDistance.DEGS), 55d, origin, java.awt.Color.red, "my label", 1,
                "theSensorName");
        break;
    case "Debrief.Wrappers.FixWrapper":
        final Fix fx = new Fix(new HiResDate(12, 0), new WorldLocation(2d, 2d, 2d), 2d, 2d);
        final TrackWrapper tw = new TrackWrapper();
        tw.setName("here ew arw");
        FixWrapper ed = new FixWrapper(fx);
        ed.setTrackWrapper(tw);
        editable = ed;
        break;
    case "Debrief.Wrappers.ShapeWrapper":
        centre = new WorldLocation(2d, 2d, 2d);
        editable = new ShapeWrapper("new ellipse", new EllipseShape(centre, 0,
                new WorldDistance(0, WorldDistance.DEGS), new WorldDistance(0, WorldDistance.DEGS)),
                java.awt.Color.red, null);
        break;
    case "Debrief.GUI.Tote.Painters.PainterManager":
        final StepControl stepper = new Debrief.GUI.Tote.Swing.SwingStepControl(null, null, null, null, null,
                null);
        editable = new PainterManager(stepper);
        break;
    case "Debrief.Wrappers.TMAContactWrapper":
        origin = new WorldLocation(2, 2, 0);
        final HiResDate theDTG = new HiResDate(new java.util.Date().getTime());
        final EllipseShape theEllipse = new EllipseShape(origin, 45, new WorldDistance(10, WorldDistance.DEGS),
                new WorldDistance(5, WorldDistance.DEGS));
        theEllipse.setName("test ellipse");
        editable = new TMAContactWrapper("blank sensor", "blank track", theDTG, origin, 5d, 6d, 1d, Color.pink,
                "my label", theEllipse, "some symbol");
        break;
    case "MWC.GUI.JFreeChart.NewFormattedJFreeChart":
        XYPlot plot = new XYPlot();
        DefaultXYItemRenderer renderer = new DefaultXYItemRenderer();
        plot.setRenderer(renderer);
        editable = new NewFormattedJFreeChart("test", new java.awt.Font("Dialog", 0, 18), plot, false);
        break;
    case "org.mwc.cmap.core.ui_support.swt.SWTCanvasAdapter":
        final Editable[] edit = new Editable[1];
        Display.getDefault().syncExec(new Runnable() {

            @Override
            public void run() {
                edit[0] = new SWTCanvasAdapter(null);
            }
        });
        editable = edit[0];
        break;
    case "ASSET.Models.Decision.Conditions.OrCondition":
        System.out.println(type.getFullyQualifiedName() + " hasn't public constructor.");
        return null;
    case "ASSET.Models.Decision.Movement.RectangleWander":
        final WorldLocation topLeft = SupportTesting.createLocation(0, 10000);
        final WorldLocation bottomRight = SupportTesting.createLocation(10000, 0);
        final WorldArea theArea = new WorldArea(topLeft, bottomRight);
        editable = new RectangleWander(theArea, "rect wander");
        break;
    case "org.mwc.debrief.satc_interface.data.wrappers.BMC_Wrapper$BearingMeasurementWrapper":
        bmc = new BearingMeasurementContribution();
        bmc.setName("Measured bearing");
        bmc.setAutoDetect(false);
        CoreMeasurement cm = new CoreMeasurement(new Date());
        BMC_Wrapper bmcw = new BMC_Wrapper(bmc);
        editable = bmcw.new BearingMeasurementWrapper(cm);
        break;
    case "org.mwc.debrief.satc_interface.data.wrappers.FMC_Wrapper$FrequencyMeasurementEditable":
        fmc = new FrequencyMeasurementContribution();
        fmc.setName("Measured frequence");
        FMC_Wrapper fmcw = new FMC_Wrapper(fmc);
        cm = new CoreMeasurement(new Date());
        editable = fmcw.new FrequencyMeasurementEditable(cm);
        break;
    case "ASSET.GUI.SuperSearch.Plotters.SSGuiSupport$ParticipantListener":
        SSGuiSupport ssgs = new SSGuiSupport();
        ssgs.setScenario(new MultiForceScenario());
        editable = new SSGuiSupport.ParticipantListener(new CoreParticipant(12), ssgs);
        break;
    case "ASSET.GUI.Workbench.Plotters.BasePlottable":
        // skip it
        return null;
    case "MWC.TacticalData.GND.GTrack":
        // skip it
        return null;
    default:
        break;
    }

    if (editable != null) {
        return editable;
    }
    Class<?> clazz;
    try {
        clazz = Class.forName(type.getFullyQualifiedName());
    } catch (ClassNotFoundException e1) {
        //e1.printStackTrace();
        System.out.println("CNFE " + e1.getMessage() + " " + type.getFullyQualifiedName());
        return null;
    }
    try {
        @SuppressWarnings("unused")
        Method infoMethod = clazz.getDeclaredMethod("getInfo", new Class[0]);
    } catch (Exception e) {
        return null;
    }
    try {
        editable = (Editable) clazz.newInstance();
    } catch (Exception e) {
        Constructor<?>[] constructors = clazz.getConstructors();
        for (Constructor<?> constructor : constructors) {
            try {
                Class<?>[] paramTypes = constructor.getParameterTypes();
                Object[] params = new Object[paramTypes.length];
                for (int i = 0; i < paramTypes.length; i++) {
                    Class<?> paramType = paramTypes[i];
                    if (HiResDate.class.equals(paramType)) {
                        params[i] = new HiResDate(new Date());
                    } else if (WorldDistance.class.equals(paramType)) {
                        params[i] = new WorldDistance(12d, WorldDistance.DEGS);
                    } else if (WorldSpeed.class.equals(paramType)) {
                        params[i] = new WorldSpeed(12, WorldSpeed.M_sec);
                    } else if (WorldLocation.class.equals(paramType)) {
                        params[i] = new WorldLocation(12, 12, 12);
                    } else if ("java.lang.String".equals(paramType.getName())) {
                        params[i] = "test";
                    } else if (!paramType.isPrimitive()) {
                        params[i] = null;
                    } else {
                        if (paramType.equals(int.class)) {
                            params[i] = new Integer("0");
                        }
                        if (paramType.equals(boolean.class)) {
                            params[i] = Boolean.FALSE;
                        }
                        if (paramType.equals(long.class)) {
                            params[i] = new Long("0");
                        }
                        if (paramType.equals(double.class)) {
                            params[i] = new Double("0");
                        }
                        if (paramType.equals(float.class)) {
                            params[i] = new Float("0");
                        }
                        if (paramType.equals(short.class)) {
                            params[i] = new Short("0");
                        }
                    }
                }
                editable = (Editable) constructor.newInstance(params);
                break;
            } catch (Exception e1) {
                // ignore
                //System.out.println(e1.getMessage());
                //e1.printStackTrace();
            }
        }
    }
    if (editable == null) {
        System.out.println("Can't instantiate type " + type.getFullyQualifiedName());
    }
    return editable;
}

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

public CFBamJavaFXTextDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamTextDefObj argFocus, Collection<ICFBamTextDefObj> argDataCollection,
        ICFRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from  ww  w .j ava 2 s.  co  m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamTextDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamTextDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, String> p) {
                    ICFBamTextDefObj 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamTextDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, Long>, TableCell<ICFBamTextDefObj, Long>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Long> call(TableColumn<ICFBamTextDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTextDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTextDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTextDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTextDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTextDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTextDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, Boolean>, TableCell<ICFBamTextDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Boolean> call(TableColumn<ICFBamTextDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTextDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, Boolean>, TableCell<ICFBamTextDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Boolean> call(TableColumn<ICFBamTextDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTextDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, Boolean>, TableCell<ICFBamTextDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Boolean> call(TableColumn<ICFBamTextDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTextDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, 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<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamTextDefObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamTextDefObj, Integer> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, Integer>, TableCell<ICFBamTextDefObj, Integer>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Integer> call(TableColumn<ICFBamTextDefObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnShowLines = new TableColumn<ICFBamTextDefObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamTextDefObj, Short> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, Short>, TableCell<ICFBamTextDefObj, Short>>() {
                @Override
                public TableCell<ICFBamTextDefObj, Short> call(TableColumn<ICFBamTextDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnInitValue = new TableColumn<ICFBamTextDefObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, String> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTextDefObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, String> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTextDefObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, String> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTextDefObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTextDefObj, String> p) {
                    ICFBamTextDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTextDefObj, String>, TableCell<ICFBamTextDefObj, String>>() {
                @Override
                public TableCell<ICFBamTextDefObj, String> call(TableColumn<ICFBamTextDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamTextDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTextDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTextDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTextDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamTextDefObj 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<ICFBamTextDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamTextDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTextDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTextDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTextDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTextDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTextDefObj> observable, ICFBamTextDefObj oldValue,
                ICFBamTextDefObj 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 (observableListOfTextDef != null) {
        dataTable.setItems(observableListOfTextDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXStringDefListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argContainer, ICFBamStringDefObj argFocus,
        Collection<ICFBamStringDefObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();// w w w  .j a  v  a 2  s . c o  m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    javafxRefreshCallback = refreshCallback;
    javafxSortByChain = sortByChain;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamStringDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamStringDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamStringDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Long>, TableCell<ICFBamStringDefObj, Long>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Long> call(TableColumn<ICFBamStringDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamStringDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamStringDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamStringDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamStringDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamStringDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamStringDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamStringDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamStringDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, Boolean>, TableCell<ICFBamStringDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Boolean> call(
                        TableColumn<ICFBamStringDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamStringDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, 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<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamStringDefObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamStringDefObj, Integer> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, Integer>, TableCell<ICFBamStringDefObj, Integer>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Integer> call(
                        TableColumn<ICFBamStringDefObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnShowLines = new TableColumn<ICFBamStringDefObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamStringDefObj, Short> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, Short>, TableCell<ICFBamStringDefObj, Short>>() {
                @Override
                public TableCell<ICFBamStringDefObj, Short> call(TableColumn<ICFBamStringDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnInitValue = new TableColumn<ICFBamStringDefObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamStringDefObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamStringDefObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamStringDefObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamStringDefObj, String> p) {
                    ICFBamStringDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamStringDefObj, String>, TableCell<ICFBamStringDefObj, String>>() {
                @Override
                public TableCell<ICFBamStringDefObj, String> call(TableColumn<ICFBamStringDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamStringDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamStringDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamStringDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamStringDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamStringDefObj 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<ICFBamStringDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamStringDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamStringDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamStringDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamStringDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamStringDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamStringDefObj> observable,
                ICFBamStringDefObj oldValue, ICFBamStringDefObj 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 (observableListOfStringDef != null) {
        dataTable.setItems(observableListOfStringDef);
    }
    adjustListButtons();
}

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

public CFBamJavaFXUuidGenPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamUuidGenObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamUuidGenObj> argDataCollection, ICFBamJavaFXUuidGenChosen whenChosen) {
    super();/* w ww  .  j  a v a 2 s  .c om*/
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamUuidGenObj>();
    tableColumnId = new TableColumn<ICFBamUuidGenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Long>, TableCell<ICFBamUuidGenObj, Long>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Long> call(TableColumn<ICFBamUuidGenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamUuidGenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamUuidGenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamUuidGenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamUuidGenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamUuidGenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamUuidGenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamUuidGenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamUuidGenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamUuidGenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamUuidGenObj, UUID>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamUuidGenObj, UUID>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamUuidGenObj, UUID>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamUuidGenObj, UUID>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamUuidGenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamUuidGenObj, Short> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, Short>, TableCell<ICFBamUuidGenObj, Short>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Short> call(TableColumn<ICFBamUuidGenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamUuidGenObj, Integer>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamUuidGenObj, Integer> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, Integer>, TableCell<ICFBamUuidGenObj, Integer>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Integer> call(TableColumn<ICFBamUuidGenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamUuidGenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamUuidGenObj, ICFBamSchemaDefObj> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, ICFBamSchemaDefObj>, TableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamUuidGenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamUuidGenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamUuidGenObj> observable, ICFBamUuidGenObj oldValue,
                ICFBamUuidGenObj newValue) {
            setJavaFXFocus(newValue);
            if (buttonChooseSelected != null) {
                if (newValue != null) {
                    buttonChooseSelected.setDisable(false);
                } else {
                    buttonChooseSelected.setDisable(true);
                }
            }
        }
    });
    hboxMenu = new CFHBox(10);
    buttonCancel = new CFButton();
    buttonCancel.setMinWidth(200);
    buttonCancel.setText("Cancel");
    buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonCancel);
    buttonChooseNone = new CFButton();
    buttonChooseNone.setMinWidth(200);
    buttonChooseNone.setText("ChooseNone");
    buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                invokeWhenChosen.choseUuidGen(null);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseNone);
    buttonChooseSelected = new CFButton();
    buttonChooseSelected.setMinWidth(200);
    buttonChooseSelected.setText("ChooseSelected");
    buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent e) {
            final String S_ProcName = "handle";
            try {
                ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                if (schemaObj == null) {
                    throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                            "schemaObj");
                }
                ICFBamUuidGenObj selectedInstance = getJavaFXFocusAsUuidGen();
                invokeWhenChosen.choseUuidGen(selectedInstance);
                cfFormManager.closeCurrentForm();
            } catch (Throwable t) {
                CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
            }
        }
    });
    hboxMenu.getChildren().add(buttonChooseSelected);
    if (argFocus != null) {
        dataTable.getSelectionModel().select(argFocus);
    }
    setTop(hboxMenu);
    setCenter(dataTable);
}

From source file:net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivity.java

/**
 * Converts array of (arrays of ...) elements to list (of list of ...) strings.
 * The dimension of the returned list is equal the dimension of the input array.
 *
 * @param obj 1 or more-dimensional array of elements that can be converted to strings
 * @return//from   ww w.  j  a  va2s.c o  m
 */
protected ArrayList<Object> convertArrayToListOfStrings(Object obj, int listDimension) {

    ArrayList<Object> objList = new ArrayList<Object>();

    if (listDimension == 1) {
        if (obj instanceof int[]) {
            for (int i = 0; i < ((int[]) obj).length; i++) {
                // Convert int[] to a list of string representations of integers
                objList.add(convertObjectToString(new Integer(((int[]) obj)[i])));
            }
        } else if (obj instanceof long[]) {
            for (int i = 0; i < ((long[]) obj).length; i++) {
                objList.add(convertObjectToString(new Long(((long[]) obj)[i])));
            }
        } else if (obj instanceof short[]) {
            for (int i = 0; i < ((short[]) obj).length; i++) {
                objList.add(convertObjectToString(new Short(((short[]) obj)[i])));
            }
        } else if (obj instanceof float[]) {
            for (int i = 0; i < ((float[]) obj).length; i++) {
                objList.add(convertObjectToString(new Float(((float[]) obj)[i])));
            }
        } else if (obj instanceof boolean[]) {
            for (int i = 0; i < ((boolean[]) obj).length; i++) {
                objList.add(convertObjectToString(new Boolean(((boolean[]) obj)[i])));
            }
        } else if (obj instanceof String[]) {
            for (int i = 0; i < ((String[]) obj).length; i++) {
                objList.add(((String[]) obj)[i]);
            }
        } else if (obj instanceof char[][]) {
            for (int i = 0; i < ((char[][]) obj).length; i++) {
                objList.add(convertObjectToString(((char[][]) obj)[i]));
            }
        } else if (obj instanceof BigInteger[]) {
            for (int i = 0; i < ((BigInteger[]) obj).length; i++) {
                objList.add(convertObjectToString(((BigInteger[]) obj)[i]));
            }
        } else if (obj instanceof BigDecimal[]) {
            for (int i = 0; i < ((BigDecimal[]) obj).length; i++) {
                objList.add(convertObjectToString(((BigDecimal[]) obj)[i]));
            }
        }
        //else -> Error; we should have exhausted all types that can be converted to a string
    } else // it is 2 or more-dimensional array - go recursively
    {
        for (int i = 0; i < ((Object[]) obj).length; i++) {
            ArrayList<Object> elementList = convertArrayToListOfStrings(((Object[]) obj)[i], listDimension - 1);
            objList.add(elementList);
        }
    }

    return objList;
}

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

public CFBamJavaFXUuidGenListPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argContainer, ICFBamUuidGenObj argFocus,
        Collection<ICFBamUuidGenObj> argDataCollection, ICFRefreshCallback refreshCallback,
        boolean sortByChain) {
    super();//from  w  w w  .  j  a  va 2  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<ICFBamUuidGenObj>();
    tableColumnId = new TableColumn<ICFBamUuidGenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Long>, TableCell<ICFBamUuidGenObj, Long>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Long> call(TableColumn<ICFBamUuidGenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamUuidGenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamUuidGenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamUuidGenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamUuidGenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamUuidGenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamUuidGenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamUuidGenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamUuidGenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, Boolean>, TableCell<ICFBamUuidGenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Boolean> call(TableColumn<ICFBamUuidGenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamUuidGenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, String>, TableCell<ICFBamUuidGenObj, String>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, String> call(TableColumn<ICFBamUuidGenObj, String> arg) {
                    return new CFStringTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamUuidGenObj, UUID>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamUuidGenObj, UUID>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamUuidGenObj, UUID>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamUuidGenObj, UUID>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, UUID>, ObservableValue<UUID>>() {
                public ObservableValue<UUID> call(CellDataFeatures<ICFBamUuidGenObj, 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<ICFBamUuidGenObj, UUID>, TableCell<ICFBamUuidGenObj, UUID>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, UUID> call(TableColumn<ICFBamUuidGenObj, UUID> arg) {
                    return new CFUuidTableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamUuidGenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamUuidGenObj, Short> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, Short>, TableCell<ICFBamUuidGenObj, Short>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Short> call(TableColumn<ICFBamUuidGenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamUuidGenObj, Integer>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamUuidGenObj, Integer> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, Integer>, TableCell<ICFBamUuidGenObj, Integer>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, Integer> call(TableColumn<ICFBamUuidGenObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamUuidGenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamUuidGenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUuidGenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamUuidGenObj, ICFBamSchemaDefObj> p) {
                    ICFBamUuidGenObj 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<ICFBamUuidGenObj, ICFBamSchemaDefObj>, TableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamUuidGenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamUuidGenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamUuidGenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamUuidGenObj> observable, ICFBamUuidGenObj oldValue,
                ICFBamUuidGenObj 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 (observableListOfUuidGen != null) {
        dataTable.setItems(observableListOfUuidGen);
    }
    adjustListButtons();
}