Example usage for javafx.event EventHandler EventHandler

List of usage examples for javafx.event EventHandler EventHandler

Introduction

In this page you can find the example usage for javafx.event EventHandler EventHandler.

Prototype

EventHandler

Source Link

Usage

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

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddTZTimeCol = new CFButton();
        buttonAddTZTimeCol.setMinWidth(200);
        buttonAddTZTimeCol.setText("Add TZTimeCol");
        buttonAddTZTimeCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override//  ww  w.  ja va2 s.  c  o  m
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTZTimeColObj obj = (ICFBamTZTimeColObj) schemaObj.getTZTimeColTableObj()
                            .newInstance();
                    ICFBamTZTimeColEditObj edit = (ICFBamTZTimeColEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamTableObj container = (ICFBamTableObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerTable(container);
                    CFBorderPane frame = javafxSchema.getTZTimeColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXTZTimeColPaneCommon jpanelCommon = (ICFBamJavaFXTZTimeColPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAddTZTimeCol);
        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.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");
                    }
                    ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonViewSelected);

        buttonEditSelected = new CFButton();
        buttonEditSelected.setMinWidth(200);
        buttonEditSelected.setText("Edit Selected");
        buttonEditSelected.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");
                    }
                    ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonEditSelected);

        buttonDeleteSelected = new CFButton();
        buttonDeleteSelected.setMinWidth(200);
        buttonDeleteSelected.setText("Delete Selected");
        buttonDeleteSelected.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");
                    }
                    ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonDeleteSelected);

    }
    return (hboxMenu);
}

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

public CFBamJavaFXTimestampDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTimestampDefObj argFocus, ICFBamScopeObj argContainer,
        Collection<ICFBamTimestampDefObj> argDataCollection, ICFBamJavaFXTimestampDefChosen whenChosen) {
    super();//www  . j ava 2s.c o  m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    javaFXFocus = argFocus;
    javafxContainer = argContainer;
    setJavaFXDataCollection(argDataCollection);
    dataTable = new TableView<ICFBamTimestampDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamTimestampDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, String> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamTimestampDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, Long>, TableCell<ICFBamTimestampDefObj, Long>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Long> call(
                        TableColumn<ICFBamTimestampDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTimestampDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTimestampDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTimestampDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTimestampDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTimestampDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTimestampDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, Boolean>, TableCell<ICFBamTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTimestampDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, Boolean>, TableCell<ICFBamTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTimestampDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, Boolean>, TableCell<ICFBamTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTimestampDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTimestampDefObj, 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<ICFBamTimestampDefObj, String>, TableCell<ICFBamTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, String> call(
                        TableColumn<ICFBamTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTimestampDefObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTimestampDefObj, Calendar> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, Calendar>, TableCell<ICFBamTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTimestampDefObj, Calendar> arg) {
                    return new CFTimestampTableCell<ICFBamTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTimestampDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTimestampDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTimestampDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamTimestampDefObj 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<ICFBamTimestampDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamTimestampDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTimestampDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTimestampDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTimestampDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamTimestampDefObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamTimestampDefObj> observable,
                        ICFBamTimestampDefObj oldValue, ICFBamTimestampDefObj 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.choseTimestampDef(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");
                }
                ICFBamTimestampDefObj selectedInstance = getJavaFXFocusAsTimestampDef();
                invokeWhenChosen.choseTimestampDef(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.cfbamcustom.v2_7.CFBamCustomEditor.CFBamCustomEditorRelationColListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddRelationCol = new CFButton();
        buttonAddRelationCol.setMinWidth(200);
        buttonAddRelationCol.setText("Add RelationCol");
        buttonAddRelationCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from   w  w w  . ja  v  a 2  s  . com
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamRelationColObj obj = (ICFBamRelationColObj) schemaObj.getRelationColTableObj()
                            .newInstance();
                    ICFBamRelationColEditObj edit = (ICFBamRelationColEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamRelationObj container = (ICFBamRelationObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerRelation(container);
                    CFBorderPane frame = javafxSchema.getRelationColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXRelationColPaneCommon jpanelCommon = (ICFBamJavaFXRelationColPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if ((javafxContainer != null) && javafxContainer.getOptionalLookupDefSchema() == null) {
            hboxMenu.getChildren().add(buttonAddRelationCol);
        }
        buttonMoveUpSelected = new CFButton();
        buttonMoveUpSelected.setMinWidth(200);
        buttonMoveUpSelected.setText("Move Up Selected");
        buttonMoveUpSelected.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");
                    }
                    ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupPrev()) {
                            selectedInstance.moveUp();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if ((javafxContainer != null) && javafxContainer.getOptionalLookupDefSchema() == null) {
            hboxMenu.getChildren().add(buttonMoveUpSelected);
        }

        buttonMoveDownSelected = new CFButton();
        buttonMoveDownSelected.setMinWidth(200);
        buttonMoveDownSelected.setText("Move Down Selected");
        buttonMoveDownSelected.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");
                    }
                    ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupNext()) {
                            selectedInstance.moveDown();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if ((javafxContainer != null) && javafxContainer.getOptionalLookupDefSchema() == null) {
            hboxMenu.getChildren().add(buttonMoveDownSelected);
        }

        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.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");
                    }
                    ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("RELC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getRelationColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonViewSelected);

        buttonEditSelected = new CFButton();
        buttonEditSelected.setMinWidth(200);
        buttonEditSelected.setText("Edit Selected");
        buttonEditSelected.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");
                    }
                    ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("RELC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getRelationColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if ((javafxContainer != null) && javafxContainer.getOptionalLookupDefSchema() == null) {
            hboxMenu.getChildren().add(buttonEditSelected);
        }

        buttonDeleteSelected = new CFButton();
        buttonDeleteSelected.setMinWidth(200);
        buttonDeleteSelected.setText("Delete Selected");
        buttonDeleteSelected.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");
                    }
                    ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("RELC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getRelationColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if ((javafxContainer != null) && javafxContainer.getOptionalLookupDefSchema() == null) {
            hboxMenu.getChildren().add(buttonDeleteSelected);
        }

    }
    return (hboxMenu);
}

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

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddTZTimeType = new CFButton();
        buttonAddTZTimeType.setMinWidth(200);
        buttonAddTZTimeType.setText("Add TZTimeType");
        buttonAddTZTimeType.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from   ww  w . j  ava2s  .com
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTZTimeTypeObj obj = (ICFBamTZTimeTypeObj) schemaObj.getTZTimeTypeTableObj()
                            .newInstance();
                    ICFBamTZTimeTypeEditObj edit = (ICFBamTZTimeTypeEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamSchemaDefObj container = (ICFBamSchemaDefObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerSchemaDef(container);
                    CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXTZTimeTypePaneCommon jpanelCommon = (ICFBamJavaFXTZTimeTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAddTZTimeType);
        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonViewSelected);

        buttonEditSelected = new CFButton();
        buttonEditSelected.setMinWidth(200);
        buttonEditSelected.setText("Edit Selected");
        buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonEditSelected);

        buttonDeleteSelected = new CFButton();
        buttonDeleteSelected.setMinWidth(200);
        buttonDeleteSelected.setText("Delete Selected");
        buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TMZT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimeTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonDeleteSelected);

    }
    return (hboxMenu);
}

From source file:com.panemu.tiwulfx.table.TableControl.java

private MenuItem getPasteMenuItem() {
    if (miPaste == null) {
        miPaste = new MenuItem(TiwulFXUtil.getLiteral("paste"));
        miPaste.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from  ww  w  . j  ava  2s.co  m*/
            public void handle(ActionEvent event) {
                paste();
            }
        });
    }
    return miPaste;
}

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

public CFBamJavaFXTZTimestampDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTZTimestampDefObj argFocus, ICFBamScopeObj argContainer,
        Collection<ICFBamTZTimestampDefObj> argDataCollection, ICFBamJavaFXTZTimestampDefChosen whenChosen) {
    super();/*from   w  w w  .  ja  v a2  s . co m*/
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    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<ICFBamTZTimestampDefObj>();
    tableColumnObjKind = new TableColumn<ICFBamTZTimestampDefObj, String>("Class Code");
    tableColumnObjKind.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, String> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnObjKind);
    tableColumnId = new TableColumn<ICFBamTZTimestampDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, Long>, TableCell<ICFBamTZTimestampDefObj, Long>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Long> call(
                        TableColumn<ICFBamTZTimestampDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTZTimestampDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTZTimestampDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTZTimestampDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTZTimestampDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTZTimestampDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTZTimestampDefObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, Boolean>, TableCell<ICFBamTZTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTZTimestampDefObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, Boolean>, TableCell<ICFBamTZTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTZTimestampDefObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, Boolean>, TableCell<ICFBamTZTimestampDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Boolean> call(
                        TableColumn<ICFBamTZTimestampDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTZTimestampDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTZTimestampDefObj, 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<ICFBamTZTimestampDefObj, String>, TableCell<ICFBamTZTimestampDefObj, String>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, String> call(
                        TableColumn<ICFBamTZTimestampDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTZTimestampDefObj, Calendar>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, Calendar>, ObservableValue<Calendar>>() {
                public ObservableValue<Calendar> call(CellDataFeatures<ICFBamTZTimestampDefObj, Calendar> p) {
                    ICFBamTZTimestampDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Calendar value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTZTimestampDefObj, Calendar>, TableCell<ICFBamTZTimestampDefObj, Calendar>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, Calendar> call(
                        TableColumn<ICFBamTZTimestampDefObj, Calendar> arg) {
                    return new CFTZTimestampTableCell<ICFBamTZTimestampDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj> p) {
                    ICFBamTZTimestampDefObj 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<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTZTimestampDefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamTZTimestampDefObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamTZTimestampDefObj> observable,
                        ICFBamTZTimestampDefObj oldValue, ICFBamTZTimestampDefObj 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.choseTZTimestampDef(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");
                }
                ICFBamTZTimestampDefObj selectedInstance = getJavaFXFocusAsTZTimestampDef();
                invokeWhenChosen.choseTZTimestampDef(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.CFBamJavaFXBoolColListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddBoolCol = new CFButton();
        buttonAddBoolCol.setMinWidth(200);
        buttonAddBoolCol.setText("Add BoolCol");
        buttonAddBoolCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override// w w  w . j a  v  a 2  s.  c  o  m
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamBoolColObj obj = (ICFBamBoolColObj) schemaObj.getBoolColTableObj().newInstance();
                    ICFBamBoolColEditObj edit = (ICFBamBoolColEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamTableObj container = (ICFBamTableObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerTable(container);
                    CFBorderPane frame = javafxSchema.getBoolColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXBoolColPaneCommon jpanelCommon = (ICFBamJavaFXBoolColPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAddBoolCol);
        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolColObj selectedInstance = getJavaFXFocusAsBoolCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBoolColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonViewSelected);

        buttonEditSelected = new CFButton();
        buttonEditSelected.setMinWidth(200);
        buttonEditSelected.setText("Edit Selected");
        buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolColObj selectedInstance = getJavaFXFocusAsBoolCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBoolColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonEditSelected);

        buttonDeleteSelected = new CFButton();
        buttonDeleteSelected.setMinWidth(200);
        buttonDeleteSelected.setText("Delete Selected");
        buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolColObj selectedInstance = getJavaFXFocusAsBoolCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXBoolColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolColObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonDeleteSelected);

    }
    return (hboxMenu);
}

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

public CFBamJavaFXNumberColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNumberColObj argFocus, ICFBamTableObj argContainer,
        Collection<ICFBamNumberColObj> argDataCollection, ICFBamJavaFXNumberColChosen whenChosen) {
    super();/*  w  w w  . j  a  va 2  s  .  c  om*/
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    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<ICFBamNumberColObj>();
    tableColumnId = new TableColumn<ICFBamNumberColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberColObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Long>, TableCell<ICFBamNumberColObj, Long>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Long> call(TableColumn<ICFBamNumberColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNumberColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNumberColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNumberColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNumberColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNumberColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNumberColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNumberColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNumberColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Boolean> call(
                        TableColumn<ICFBamNumberColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNumberColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                @Override
                public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnDigits = new TableColumn<ICFBamNumberColObj, Short>("Digits");
    tableColumnDigits.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredDigits();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDigits.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDigits);
    tableColumnPrecis = new TableColumn<ICFBamNumberColObj, Short>("Precision");
    tableColumnPrecis.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredPrecis();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnPrecis.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPrecis);
    tableColumnInitValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberColObj, BigDecimal> call(
                        TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj> p) {
                    ICFBamNumberColObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNumberColObj> observable,
                ICFBamNumberColObj oldValue, ICFBamNumberColObj newValue) {
            setJavaFXFocus(newValue);
            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.choseNumberCol(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");
                }
                ICFBamNumberColObj selectedInstance = getJavaFXFocusAsNumberCol();
                invokeWhenChosen.choseNumberCol(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.CFBamJavaFXBoolTypeListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddBoolType = new CFButton();
        buttonAddBoolType.setMinWidth(200);
        buttonAddBoolType.setText("Add BoolType");
        buttonAddBoolType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from  ww  w  .ja  v  a2s. co  m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamBoolTypeObj obj = (ICFBamBoolTypeObj) schemaObj.getBoolTypeTableObj().newInstance();
                    ICFBamBoolTypeEditObj edit = (ICFBamBoolTypeEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamSchemaDefObj container = (ICFBamSchemaDefObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerSchemaDef(container);
                    CFBorderPane frame = javafxSchema.getBoolTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXBoolTypePaneCommon jpanelCommon = (ICFBamJavaFXBoolTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAddBoolType);
        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolTypeObj selectedInstance = getJavaFXFocusAsBoolType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBoolTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonViewSelected);

        buttonEditSelected = new CFButton();
        buttonEditSelected.setMinWidth(200);
        buttonEditSelected.setText("Edit Selected");
        buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolTypeObj selectedInstance = getJavaFXFocusAsBoolType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBoolTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonEditSelected);

        buttonDeleteSelected = new CFButton();
        buttonDeleteSelected.setMinWidth(200);
        buttonDeleteSelected.setText("Delete Selected");
        buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamBoolTypeObj selectedInstance = getJavaFXFocusAsBoolType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BOLT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBoolTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXBoolTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamBoolTypeObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonDeleteSelected);

    }
    return (hboxMenu);
}

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

public CFBamJavaFXNumberTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNumberTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamNumberTypeObj> argDataCollection, ICFBamJavaFXNumberTypeChosen whenChosen) {
    super();//from w  w  w.  ja va  2 s.  co m
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    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<ICFBamNumberTypeObj>();
    tableColumnId = new TableColumn<ICFBamNumberTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberTypeObj, Long> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Long>, TableCell<ICFBamNumberTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Long> call(TableColumn<ICFBamNumberTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNumberTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNumberTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNumberTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalLabel();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnLabel.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNumberTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalShortDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnShortDescription.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNumberTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDescription();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDescription.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNumberTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsNullable();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsNullable.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNumberTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Boolean value = obj.getOptionalGenerateId();
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnGenerateId.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNumberTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberTypeObj, Boolean> p) {
                    ICFBamValueObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredDefaultVisibility();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultVisibility.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Boolean>, TableCell<ICFBamNumberTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Boolean> call(
                        TableColumn<ICFBamNumberTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNumberTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNumberTypeObj, String> p) {
                    ICFBamAtomObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDbName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDbName.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, String>, TableCell<ICFBamNumberTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, String> call(
                        TableColumn<ICFBamNumberTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnDigits = new TableColumn<ICFBamNumberTypeObj, Short>("Digits");
    tableColumnDigits.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberTypeObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredDigits();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnDigits.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Short>, TableCell<ICFBamNumberTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Short> call(TableColumn<ICFBamNumberTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDigits);
    tableColumnPrecis = new TableColumn<ICFBamNumberTypeObj, Short>("Precision");
    tableColumnPrecis.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberTypeObj, Short> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredPrecis();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnPrecis.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, Short>, TableCell<ICFBamNumberTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, Short> call(TableColumn<ICFBamNumberTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNumberTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPrecis);
    tableColumnInitValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNumberTypeObj, BigDecimal>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberTypeObj, BigDecimal> p) {
                    ICFBamNumberDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        BigDecimal value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, BigDecimal>, TableCell<ICFBamNumberTypeObj, BigDecimal>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, BigDecimal> call(
                        TableColumn<ICFBamNumberTypeObj, BigDecimal> arg) {
                    return new CFNumberTableCell<ICFBamNumberTypeObj>(31, 5);
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNumberTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNumberTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNumberTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamNumberTypeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamNumberTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNumberTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNumberTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNumberTypeObj> observable,
                ICFBamNumberTypeObj oldValue, ICFBamNumberTypeObj newValue) {
            setJavaFXFocus(newValue);
            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.choseNumberType(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");
                }
                ICFBamNumberTypeObj selectedInstance = getJavaFXFocusAsNumberType();
                invokeWhenChosen.choseNumberType(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);
}