Example usage for javafx.beans.value ChangeListener ChangeListener

List of usage examples for javafx.beans.value ChangeListener ChangeListener

Introduction

In this page you can find the example usage for javafx.beans.value ChangeListener ChangeListener.

Prototype

ChangeListener

Source Link

Usage

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

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

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

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

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

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

public CFBamJavaFXUInt64DefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamUInt64DefObj argFocus, ICFBamScopeObj argContainer,
        Collection<ICFBamUInt64DefObj> argDataCollection, ICFBamJavaFXUInt64DefChosen whenChosen) {
    super();/* ww w . j a v a 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");
    }
    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<ICFBamUInt64DefObj>();
    tableColumnObjKind = new TableColumn<ICFBamUInt64DefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, String> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamUInt64DefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, Long>, TableCell<ICFBamUInt64DefObj, Long>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, Long> call(TableColumn<ICFBamUInt64DefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamUInt64DefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamUInt64DefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamUInt64DefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamUInt64DefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamUInt64DefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamUInt64DefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, Boolean>, TableCell<ICFBamUInt64DefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, Boolean> call(
                        TableColumn<ICFBamUInt64DefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamUInt64DefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, Boolean>, TableCell<ICFBamUInt64DefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, Boolean> call(
                        TableColumn<ICFBamUInt64DefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamUInt64DefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, Boolean>, TableCell<ICFBamUInt64DefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, Boolean> call(
                        TableColumn<ICFBamUInt64DefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamUInt64DefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamUInt64DefObj, 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<ICFBamUInt64DefObj, String>, TableCell<ICFBamUInt64DefObj, String>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, String> call(TableColumn<ICFBamUInt64DefObj, String> arg) {
                    return new CFStringTableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamUInt64DefObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamUInt64DefObj, BigDecimal> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, BigDecimal>, TableCell<ICFBamUInt64DefObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, BigDecimal> call(
                        TableColumn<ICFBamUInt64DefObj, BigDecimal> arg) {
                    return new CFUInt64TableCell<ICFBamUInt64DefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamUInt64DefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamUInt64DefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamUInt64DefObj, ICFBamSchemaDefObj> p) {
                    ICFBamUInt64DefObj 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<ICFBamUInt64DefObj, ICFBamSchemaDefObj>, TableCell<ICFBamUInt64DefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamUInt64DefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamUInt64DefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamUInt64DefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamUInt64DefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamUInt64DefObj> observable,
                ICFBamUInt64DefObj oldValue, ICFBamUInt64DefObj 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.choseUInt64Def(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");
                }
                ICFBamUInt64DefObj selectedInstance = getJavaFXFocusAsUInt64Def();
                invokeWhenChosen.choseUInt64Def(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.CFBamJavaFXUInt16TypeListPane.java

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

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();//  ww w  .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");
    }
    // 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.CFBamJavaFXNmTokenColListPane.java

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

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

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

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

public CFBamJavaFXNmTokenDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNmTokenDefObj argFocus, ICFBamScopeObj argContainer,
        Collection<ICFBamNmTokenDefObj> argDataCollection, ICFBamJavaFXNmTokenDefChosen whenChosen) {
    super();//from  www  .  ja v  a 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");
    }
    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<ICFBamNmTokenDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamNmTokenDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, String> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamNmTokenDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, Long>, TableCell<ICFBamNmTokenDefObj, Long>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Long> call(TableColumn<ICFBamNmTokenDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNmTokenDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNmTokenDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNmTokenDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNmTokenDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNmTokenDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNmTokenDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, Boolean>, TableCell<ICFBamNmTokenDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Boolean> call(
                        TableColumn<ICFBamNmTokenDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNmTokenDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, Boolean>, TableCell<ICFBamNmTokenDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Boolean> call(
                        TableColumn<ICFBamNmTokenDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNmTokenDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, Boolean>, TableCell<ICFBamNmTokenDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Boolean> call(
                        TableColumn<ICFBamNmTokenDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNmTokenDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamNmTokenDefObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamNmTokenDefObj, Integer> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, Integer>, TableCell<ICFBamNmTokenDefObj, Integer>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Integer> call(
                        TableColumn<ICFBamNmTokenDefObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamNmTokenDefObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, String> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNmTokenDefObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, String> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamNmTokenDefObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, String> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNmTokenDefObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenDefObj, String> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, String>, TableCell<ICFBamNmTokenDefObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, String> call(
                        TableColumn<ICFBamNmTokenDefObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamNmTokenDefObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNmTokenDefObj, Short> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, Short>, TableCell<ICFBamNmTokenDefObj, Short>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, Short> call(TableColumn<ICFBamNmTokenDefObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNmTokenDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNmTokenDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNmTokenDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamNmTokenDefObj 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<ICFBamNmTokenDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamNmTokenDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNmTokenDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNmTokenDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNmTokenDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNmTokenDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNmTokenDefObj> observable,
                ICFBamNmTokenDefObj oldValue, ICFBamNmTokenDefObj 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.choseNmTokenDef(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");
                }
                ICFBamNmTokenDefObj selectedInstance = getJavaFXFocusAsNmTokenDef();
                invokeWhenChosen.choseNmTokenDef(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.CFBamJavaFXUInt64TypeListPane.java

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