Example usage for javafx.event ActionEvent getSource

List of usage examples for javafx.event ActionEvent getSource

Introduction

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

Prototype

public Object getSource() 

Source Link

Document

The object on which the Event initially occurred.

Usage

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

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddTZTimestampType = new CFButton();
        buttonAddTZTimestampType.setMinWidth(200);
        buttonAddTZTimestampType.setText("Add TZTimestampType");
        buttonAddTZTimestampType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from w  w w.  ja  va  2  s .  c  o m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTZTimestampTypeObj obj = (ICFBamTZTimestampTypeObj) schemaObj
                            .getTZTimestampTypeTableObj().newInstance();
                    ICFBamTZTimestampTypeEditObj edit = (ICFBamTZTimestampTypeEditObj) (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.getTZTimestampTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXTZTimestampTypePaneCommon jpanelCommon = (ICFBamJavaFXTZTimestampTypePaneCommon) 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(buttonAddTZTimestampType);
        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");
                    }
                    ICFBamTZTimestampTypeObj selectedInstance = getJavaFXFocusAsTZTimestampType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ZSTT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimestampTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimestampTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTZTimestampTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTZTimestampTypeObj selectedInstance = getJavaFXFocusAsTZTimestampType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ZSTT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimestampTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTZTimestampTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTZTimestampTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTZTimestampTypeObj selectedInstance = getJavaFXFocusAsTZTimestampType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ZSTT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTZTimestampTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTZTimestampTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTZTimestampTypeObj");
                        }
                    }
                } 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.CFBamJavaFXNumberTypeListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddNumberType = new CFButton();
        buttonAddNumberType.setMinWidth(200);
        buttonAddNumberType.setText("Add NumberType");
        buttonAddNumberType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from   www  . ja  va 2 s.  co m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamNumberTypeObj obj = (ICFBamNumberTypeObj) schemaObj.getNumberTypeTableObj()
                            .newInstance();
                    ICFBamNumberTypeEditObj edit = (ICFBamNumberTypeEditObj) (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.getNumberTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXNumberTypePaneCommon jpanelCommon = (ICFBamJavaFXNumberTypePaneCommon) 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(buttonAddNumberType);
        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");
                    }
                    ICFBamNumberTypeObj selectedInstance = getJavaFXFocusAsNumberType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("NUMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getNumberTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXNumberTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamNumberTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamNumberTypeObj selectedInstance = getJavaFXFocusAsNumberType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("NUMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getNumberTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXNumberTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamNumberTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamNumberTypeObj selectedInstance = getJavaFXFocusAsNumberType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("NUMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getNumberTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXNumberTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamNumberTypeObj");
                        }
                    }
                } 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.CFBamJavaFXSchemaDefPickerPane.java

public CFBamJavaFXSchemaDefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaDefObj argFocus, ICFInternetDomainBaseObj argContainer,
        Collection<ICFBamSchemaDefObj> argDataCollection, ICFBamJavaFXSchemaDefChosen whenChosen) {
    super();/*from   w w  w  . ja  v a2 s  . c  o m*/
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    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<ICFBamSchemaDefObj>();
    tableColumnId = new TableColumn<ICFBamSchemaDefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamSchemaDefObj, Long> p) {
                    ICFBamScopeObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredId();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnId.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, Long>, TableCell<ICFBamSchemaDefObj, Long>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, Long> call(TableColumn<ICFBamSchemaDefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamSchemaDefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnDbName = new TableColumn<ICFBamSchemaDefObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnShortName = new TableColumn<ICFBamSchemaDefObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamSchemaDefObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamSchemaDefObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamSchemaDefObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj 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<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnExtendCFCore = new TableColumn<ICFBamSchemaDefObj, Boolean>("Extend CF Core");
    tableColumnExtendCFCore.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamSchemaDefObj, Boolean> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredExtendCFCore();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnExtendCFCore.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, Boolean>, TableCell<ICFBamSchemaDefObj, Boolean>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, Boolean> call(
                        TableColumn<ICFBamSchemaDefObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnExtendCFCore);
    tableColumnCopyrightPeriod = new TableColumn<ICFBamSchemaDefObj, String>("Copyright Period");
    tableColumnCopyrightPeriod.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredCopyrightPeriod();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnCopyrightPeriod.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnCopyrightPeriod);
    tableColumnCopyrightHolder = new TableColumn<ICFBamSchemaDefObj, String>("Copyright Holder");
    tableColumnCopyrightHolder.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredCopyrightHolder();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnCopyrightHolder.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnCopyrightHolder);
    tableColumnPublishURI = new TableColumn<ICFBamSchemaDefObj, String>("Publish URI");
    tableColumnPublishURI.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredPublishURI();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnPublishURI.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnPublishURI);
    tableColumnJSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JSchemaObjImport");
    tableColumnJSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSchemaObjImport);
    tableColumnJSchemaObjInterface = new TableColumn<ICFBamSchemaDefObj, String>("JSchemaObjInterface");
    tableColumnJSchemaObjInterface.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSchemaObjInterface();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSchemaObjInterface.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSchemaObjInterface);
    tableColumnJSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JSchemaObjMembers");
    tableColumnJSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSchemaObjMembers);
    tableColumnJSchemaObjImplementation = new TableColumn<ICFBamSchemaDefObj, String>(
            "JSchemaObjImplementation");
    tableColumnJSchemaObjImplementation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSchemaObjImplementation();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSchemaObjImplementation.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSchemaObjImplementation);
    tableColumnJDb2LUWSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JDb2LUWSchemaObjMembers");
    tableColumnJDb2LUWSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJDb2LUWSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJDb2LUWSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJDb2LUWSchemaObjMembers);
    tableColumnJDb2LUWSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JDb2LUWSchemaObjImpl");
    tableColumnJDb2LUWSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJDb2LUWSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJDb2LUWSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJDb2LUWSchemaObjImpl);
    tableColumnJDb2LUWSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JDb2LUWSchemaObjImport");
    tableColumnJDb2LUWSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJDb2LUWSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJDb2LUWSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJDb2LUWSchemaObjImport);
    tableColumnJMSSqlSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JMSSqlSchemaObjMembers");
    tableColumnJMSSqlSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMSSqlSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMSSqlSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMSSqlSchemaObjMembers);
    tableColumnJMSSqlSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JMSSqlSchemaObjImpl");
    tableColumnJMSSqlSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMSSqlSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMSSqlSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMSSqlSchemaObjImpl);
    tableColumnJMSSqlSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JMSSqlSchemaObjImport");
    tableColumnJMSSqlSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMSSqlSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMSSqlSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMSSqlSchemaObjImport);
    tableColumnJMySqlSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JMySqlSchemaObjMembers");
    tableColumnJMySqlSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMySqlSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMySqlSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMySqlSchemaObjMembers);
    tableColumnJMySqlSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JMySqlSchemaObjImpl");
    tableColumnJMySqlSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMySqlSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMySqlSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMySqlSchemaObjImpl);
    tableColumnJMySqlSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JMySqlSchemaObjImport");
    tableColumnJMySqlSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJMySqlSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJMySqlSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJMySqlSchemaObjImport);
    tableColumnJOracleSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JOracleSchemaObjMembers");
    tableColumnJOracleSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJOracleSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJOracleSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJOracleSchemaObjMembers);
    tableColumnJOracleSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JOracleSchemaObjImpl");
    tableColumnJOracleSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJOracleSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJOracleSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJOracleSchemaObjImpl);
    tableColumnJOracleSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JOracleSchemaObjImport");
    tableColumnJOracleSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJOracleSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJOracleSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJOracleSchemaObjImport);
    tableColumnJPgSqlSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JPgSqlSchemaObjMembers");
    tableColumnJPgSqlSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJPgSqlSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJPgSqlSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJPgSqlSchemaObjMembers);
    tableColumnJPgSqlSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JPgSqlSchemaObjImpl");
    tableColumnJPgSqlSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJPgSqlSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJPgSqlSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJPgSqlSchemaObjImpl);
    tableColumnJPgSqlSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JPgSqlSchemaObjImport");
    tableColumnJPgSqlSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJPgSqlSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJPgSqlSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJPgSqlSchemaObjImport);
    tableColumnJSybaseSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JSybaseSchemaObjMembers");
    tableColumnJSybaseSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSybaseSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSybaseSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSybaseSchemaObjMembers);
    tableColumnJSybaseSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JSybaseSchemaObjImpl");
    tableColumnJSybaseSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSybaseSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSybaseSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSybaseSchemaObjImpl);
    tableColumnJSybaseSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JSybaseSchemaObjImport");
    tableColumnJSybaseSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJSybaseSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJSybaseSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJSybaseSchemaObjImport);
    tableColumnJRamSchemaObjMembers = new TableColumn<ICFBamSchemaDefObj, String>("JRamSchemaObjMembers");
    tableColumnJRamSchemaObjMembers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJRamSchemaObjMembers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJRamSchemaObjMembers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJRamSchemaObjMembers);
    tableColumnJRamSchemaObjImpl = new TableColumn<ICFBamSchemaDefObj, String>("JRamSchemaObjImpl");
    tableColumnJRamSchemaObjImpl.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJRamSchemaObjImpl();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJRamSchemaObjImpl.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJRamSchemaObjImpl);
    tableColumnJRamSchemaObjImport = new TableColumn<ICFBamSchemaDefObj, String>("JRamSchemaObjImport");
    tableColumnJRamSchemaObjImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJRamSchemaObjImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJRamSchemaObjImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJRamSchemaObjImport);
    tableColumnJXMsgSchemaImport = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgSchemaImport");
    tableColumnJXMsgSchemaImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgSchemaImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgSchemaImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgSchemaImport);
    tableColumnJXMsgSchemaFormatters = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgSchemaFormatters");
    tableColumnJXMsgSchemaFormatters.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgSchemaFormatters();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgSchemaFormatters.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgSchemaFormatters);
    tableColumnJXMsgClientSchemaImport = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgClientSchemaImport");
    tableColumnJXMsgClientSchemaImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgClientSchemaImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgClientSchemaImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgClientSchemaImport);
    tableColumnJXMsgClientSchemaBody = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgClientSchemaBody");
    tableColumnJXMsgClientSchemaBody.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgClientSchemaBody();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgClientSchemaBody.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgClientSchemaBody);
    tableColumnJXMsgRqstSchemaBody = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRqstSchemaBody");
    tableColumnJXMsgRqstSchemaBody.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRqstSchemaBody();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRqstSchemaBody.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRqstSchemaBody);
    tableColumnJXMsgRqstSchemaImport = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRqstSchemaImport");
    tableColumnJXMsgRqstSchemaImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRqstSchemaImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRqstSchemaImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRqstSchemaImport);
    tableColumnJXMsgRqstSchemaWireParsers = new TableColumn<ICFBamSchemaDefObj, String>(
            "JXMsgRqstSchemaWireParsers");
    tableColumnJXMsgRqstSchemaWireParsers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRqstSchemaWireParsers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRqstSchemaWireParsers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRqstSchemaWireParsers);
    tableColumnJXMsgRqstSchemaXsdSpec = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRqstSchemaXsdSpec");
    tableColumnJXMsgRqstSchemaXsdSpec.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRqstSchemaXsdSpec();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRqstSchemaXsdSpec.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRqstSchemaXsdSpec);
    tableColumnJXMsgRqstSchemaXsdElementList = new TableColumn<ICFBamSchemaDefObj, String>(
            "JXMsgRqstSchemaXsdElementList");
    tableColumnJXMsgRqstSchemaXsdElementList.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRqstSchemaXsdElementList();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRqstSchemaXsdElementList.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRqstSchemaXsdElementList);
    tableColumnJXMsgRspnSchemaBody = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRspnSchemaBody");
    tableColumnJXMsgRspnSchemaBody.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRspnSchemaBody();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRspnSchemaBody.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRspnSchemaBody);
    tableColumnJXMsgRspnSchemaImport = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRspnSchemaImport");
    tableColumnJXMsgRspnSchemaImport.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRspnSchemaImport();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRspnSchemaImport.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRspnSchemaImport);
    tableColumnJXMsgRspnSchemaWireParsers = new TableColumn<ICFBamSchemaDefObj, String>(
            "JXMsgRspnSchemaWireParsers");
    tableColumnJXMsgRspnSchemaWireParsers.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRspnSchemaWireParsers();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRspnSchemaWireParsers.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRspnSchemaWireParsers);
    tableColumnJXMsgRspnSchemaXsdElementList = new TableColumn<ICFBamSchemaDefObj, String>(
            "JXMsgRspnSchemaXsdElementList");
    tableColumnJXMsgRspnSchemaXsdElementList.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRspnSchemaXsdElementList();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRspnSchemaXsdElementList.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRspnSchemaXsdElementList);
    tableColumnJXMsgRspnSchemaXsdSpec = new TableColumn<ICFBamSchemaDefObj, String>("JXMsgRspnSchemaXsdSpec");
    tableColumnJXMsgRspnSchemaXsdSpec.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaDefObj, String> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalJXMsgRspnSchemaXsdSpec();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnJXMsgRspnSchemaXsdSpec.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, String>, TableCell<ICFBamSchemaDefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, String> call(TableColumn<ICFBamSchemaDefObj, String> arg) {
                    return new CFTextTableCell<ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnJXMsgRspnSchemaXsdSpec);
    tableColumnLookupDefaultLicense = new TableColumn<ICFBamSchemaDefObj, ICFInternetLicenseObj>(
            "Default License");
    tableColumnLookupDefaultLicense.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaDefObj, ICFInternetLicenseObj>, ObservableValue<ICFInternetLicenseObj>>() {
                public ObservableValue<ICFInternetLicenseObj> call(
                        CellDataFeatures<ICFBamSchemaDefObj, ICFInternetLicenseObj> p) {
                    ICFBamSchemaDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFInternetLicenseObj ref = obj.getOptionalLookupDefaultLicense();
                        ReadOnlyObjectWrapper<ICFInternetLicenseObj> observable = new ReadOnlyObjectWrapper<ICFInternetLicenseObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDefaultLicense.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaDefObj, ICFInternetLicenseObj>, TableCell<ICFBamSchemaDefObj, ICFInternetLicenseObj>>() {
                @Override
                public TableCell<ICFBamSchemaDefObj, ICFInternetLicenseObj> call(
                        TableColumn<ICFBamSchemaDefObj, ICFInternetLicenseObj> arg) {
                    return new CFReferenceTableCell<ICFBamSchemaDefObj, ICFInternetLicenseObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefaultLicense);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamSchemaDefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamSchemaDefObj> observable,
                ICFBamSchemaDefObj oldValue, ICFBamSchemaDefObj 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.choseSchemaDef(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");
                }
                ICFBamSchemaDefObj selectedInstance = getJavaFXFocusAsSchemaDef();
                invokeWhenChosen.choseSchemaDef(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.CFBamJavaFXBlobDefListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddBlobType = new CFButton();
        buttonAddBlobType.setMinWidth(200);
        buttonAddBlobType.setText("Add BlobType");
        buttonAddBlobType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/* w w w  . j av  a 2  s .  c om*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamBlobTypeObj obj = (ICFBamBlobTypeObj) schemaObj.getBlobTypeTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getBlobTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamBlobTypeEditObj edit = (ICFBamBlobTypeEditObj) (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);
                    ICFBamJavaFXBlobTypePaneCommon jpanelCommon = (ICFBamJavaFXBlobTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamSchemaDefObj) {
            list.add(buttonAddBlobType);
        }
        buttonAddBlobCol = new CFButton();
        buttonAddBlobCol.setMinWidth(200);
        buttonAddBlobCol.setText("Add BlobCol");
        buttonAddBlobCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamBlobColObj obj = (ICFBamBlobColObj) schemaObj.getBlobColTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getBlobColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamBlobColEditObj edit = (ICFBamBlobColEditObj) (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);
                    ICFBamJavaFXBlobColPaneCommon jpanelCommon = (ICFBamJavaFXBlobColPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamTableObj) {
            list.add(buttonAddBlobCol);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamBlobDefObj selectedInstance = getJavaFXFocusAsBlobDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BLBD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBlobDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBT".equals(classCode)) {
                            ICFBamBlobTypeObj obj = (ICFBamBlobTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBC".equals(classCode)) {
                            ICFBamBlobColObj obj = (ICFBamBlobColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobColFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamBlobDefObj, ICFBamBlobTypeObj, ICFBamBlobColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamBlobDefObj selectedInstance = getJavaFXFocusAsBlobDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BLBD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBlobDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBT".equals(classCode)) {
                            ICFBamBlobTypeObj obj = (ICFBamBlobTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBC".equals(classCode)) {
                            ICFBamBlobColObj obj = (ICFBamBlobColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobColFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXBlobColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamBlobDefObj, ICFBamBlobTypeObj, ICFBamBlobColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamBlobDefObj selectedInstance = getJavaFXFocusAsBlobDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("BLBD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getBlobDefFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXBlobDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBT".equals(classCode)) {
                            ICFBamBlobTypeObj obj = (ICFBamBlobTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobTypeFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXBlobTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("BLBC".equals(classCode)) {
                            ICFBamBlobColObj obj = (ICFBamBlobColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getBlobColFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXBlobColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamBlobDefObj, ICFBamBlobTypeObj, ICFBamBlobColObj");
                        }
                    }
                } 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.CFBamJavaFXEnumDefListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddEnumType = new CFButton();
        buttonAddEnumType.setMinWidth(200);
        buttonAddEnumType.setText("Add EnumType");
        buttonAddEnumType.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from  ww w  . ja  v a2 s.  com
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamEnumTypeObj obj = (ICFBamEnumTypeObj) schemaObj.getEnumTypeTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getEnumTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamEnumTypeEditObj edit = (ICFBamEnumTypeEditObj) (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);
                    ICFBamJavaFXEnumTypePaneCommon jpanelCommon = (ICFBamJavaFXEnumTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamSchemaDefObj) {
            list.add(buttonAddEnumType);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamEnumDefObj selectedInstance = getJavaFXFocusAsEnumDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ENMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getEnumDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXEnumDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("ENMT".equals(classCode)) {
                            ICFBamEnumTypeObj obj = (ICFBamEnumTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getEnumTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamEnumDefObj, ICFBamEnumTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamEnumDefObj selectedInstance = getJavaFXFocusAsEnumDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ENMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getEnumDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXEnumDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("ENMT".equals(classCode)) {
                            ICFBamEnumTypeObj obj = (ICFBamEnumTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getEnumTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamEnumDefObj, ICFBamEnumTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamEnumDefObj selectedInstance = getJavaFXFocusAsEnumDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("ENMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getEnumDefFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXEnumDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("ENMT".equals(classCode)) {
                            ICFBamEnumTypeObj obj = (ICFBamEnumTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getEnumTypeFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamEnumDefObj, ICFBamEnumTypeObj");
                        }
                    }
                } 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.CFBamJavaFXUuidTypeListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddUuidType = new CFButton();
        buttonAddUuidType.setMinWidth(200);
        buttonAddUuidType.setText("Add UuidType");
        buttonAddUuidType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*ww  w . j  a  va 2  s  .c  om*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamUuidTypeObj obj = (ICFBamUuidTypeObj) schemaObj.getUuidTypeTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getUuidTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamUuidTypeEditObj edit = (ICFBamUuidTypeEditObj) (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);
                    ICFBamJavaFXUuidTypePaneCommon jpanelCommon = (ICFBamJavaFXUuidTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamSchemaDefObj) {
            list.add(buttonAddUuidType);
        }
        buttonAddUuidGen = new CFButton();
        buttonAddUuidGen.setMinWidth(200);
        buttonAddUuidGen.setText("Add UuidGen");
        buttonAddUuidGen.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamUuidGenObj obj = (ICFBamUuidGenObj) schemaObj.getUuidGenTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getUuidGenFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamUuidGenEditObj edit = (ICFBamUuidGenEditObj) (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);
                    ICFBamJavaFXUuidGenPaneCommon jpanelCommon = (ICFBamJavaFXUuidGenPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamSchemaDefObj) {
            list.add(buttonAddUuidGen);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamUuidTypeObj selectedInstance = getJavaFXFocusAsUuidType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("IGUU".equals(classCode)) {
                            ICFBamUuidGenObj obj = (ICFBamUuidGenObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getUuidGenFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamUuidTypeObj, ICFBamUuidGenObj");
                        }
                    }
                } 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");
                    }
                    ICFBamUuidTypeObj selectedInstance = getJavaFXFocusAsUuidType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("IGUU".equals(classCode)) {
                            ICFBamUuidGenObj obj = (ICFBamUuidGenObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getUuidGenFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamUuidTypeObj, ICFBamUuidGenObj");
                        }
                    }
                } 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");
                    }
                    ICFBamUuidTypeObj selectedInstance = getJavaFXFocusAsUuidType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXUuidTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("IGUU".equals(classCode)) {
                            ICFBamUuidGenObj obj = (ICFBamUuidGenObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getUuidGenFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamUuidTypeObj, ICFBamUuidGenObj");
                        }
                    }
                } 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.CFBamJavaFXDelDepListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddDelSubDep1 = new CFButton();
        buttonAddDelSubDep1.setMinWidth(200);
        buttonAddDelSubDep1.setText("Add DelSubDep1");
        buttonAddDelSubDep1.setOnAction(new EventHandler<ActionEvent>() {
            @Override//w w w . ja va  2 s . c o  m
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamDelSubDep1Obj obj = (ICFBamDelSubDep1Obj) schemaObj.getDelSubDep1TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getDelSubDep1Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamDelSubDep1EditObj edit = (ICFBamDelSubDep1EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamDelTopDepObj container = (ICFBamDelTopDepObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerDelTopDep(container);
                    ICFBamJavaFXDelSubDep1PaneCommon jpanelCommon = (ICFBamJavaFXDelSubDep1PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamDelTopDepObj) {
            list.add(buttonAddDelSubDep1);
        }
        buttonAddDelSubDep2 = new CFButton();
        buttonAddDelSubDep2.setMinWidth(200);
        buttonAddDelSubDep2.setText("Add DelSubDep2");
        buttonAddDelSubDep2.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamDelSubDep2Obj obj = (ICFBamDelSubDep2Obj) schemaObj.getDelSubDep2TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getDelSubDep2Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamDelSubDep2EditObj edit = (ICFBamDelSubDep2EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamDelSubDep1Obj container = (ICFBamDelSubDep1Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerDelSubDep1(container);
                    ICFBamJavaFXDelSubDep2PaneCommon jpanelCommon = (ICFBamJavaFXDelSubDep2PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamDelSubDep1Obj) {
            list.add(buttonAddDelSubDep2);
        }
        buttonAddDelSubDep3 = new CFButton();
        buttonAddDelSubDep3.setMinWidth(200);
        buttonAddDelSubDep3.setText("Add DelSubDep3");
        buttonAddDelSubDep3.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamDelSubDep3Obj obj = (ICFBamDelSubDep3Obj) schemaObj.getDelSubDep3TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getDelSubDep3Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamDelSubDep3EditObj edit = (ICFBamDelSubDep3EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamDelSubDep2Obj container = (ICFBamDelSubDep2Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerDelSubDep2(container);
                    ICFBamJavaFXDelSubDep3PaneCommon jpanelCommon = (ICFBamJavaFXDelSubDep3PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamDelSubDep2Obj) {
            list.add(buttonAddDelSubDep3);
        }
        buttonAddDelTopDep = new CFButton();
        buttonAddDelTopDep.setMinWidth(200);
        buttonAddDelTopDep.setText("Add DelTopDep");
        buttonAddDelTopDep.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamDelTopDepObj obj = (ICFBamDelTopDepObj) schemaObj.getDelTopDepTableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getDelTopDepFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamDelTopDepEditObj edit = (ICFBamDelTopDepEditObj) (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);
                    ICFBamJavaFXDelTopDepPaneCommon jpanelCommon = (ICFBamJavaFXDelTopDepPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamTableObj) {
            list.add(buttonAddDelTopDep);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamDelDepObj selectedInstance = getJavaFXFocusAsDelDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("DELD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getDelDepFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL1".equals(classCode)) {
                            ICFBamDelSubDep1Obj obj = (ICFBamDelSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL2".equals(classCode)) {
                            ICFBamDelSubDep2Obj obj = (ICFBamDelSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL3".equals(classCode)) {
                            ICFBamDelSubDep3Obj obj = (ICFBamDelSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DELT".equals(classCode)) {
                            ICFBamDelTopDepObj obj = (ICFBamDelTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamDelDepObj, ICFBamDelSubDep1Obj, ICFBamDelSubDep2Obj, ICFBamDelSubDep3Obj, ICFBamDelTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamDelDepObj selectedInstance = getJavaFXFocusAsDelDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("DELD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getDelDepFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL1".equals(classCode)) {
                            ICFBamDelSubDep1Obj obj = (ICFBamDelSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL2".equals(classCode)) {
                            ICFBamDelSubDep2Obj obj = (ICFBamDelSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL3".equals(classCode)) {
                            ICFBamDelSubDep3Obj obj = (ICFBamDelSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("DELT".equals(classCode)) {
                            ICFBamDelTopDepObj obj = (ICFBamDelTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXDelTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamDelDepObj, ICFBamDelSubDep1Obj, ICFBamDelSubDep2Obj, ICFBamDelSubDep3Obj, ICFBamDelTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamDelDepObj selectedInstance = getJavaFXFocusAsDelDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("DELD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getDelDepFactory().newAskDeleteForm(cfFormManager,
                                    selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXDelDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL1".equals(classCode)) {
                            ICFBamDelSubDep1Obj obj = (ICFBamDelSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep1Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXDelSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL2".equals(classCode)) {
                            ICFBamDelSubDep2Obj obj = (ICFBamDelSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep2Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXDelSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DEL3".equals(classCode)) {
                            ICFBamDelSubDep3Obj obj = (ICFBamDelSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelSubDep3Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXDelSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("DELT".equals(classCode)) {
                            ICFBamDelTopDepObj obj = (ICFBamDelTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getDelTopDepFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXDelTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamDelDepObj, ICFBamDelSubDep1Obj, ICFBamDelSubDep2Obj, ICFBamDelSubDep3Obj, ICFBamDelTopDepObj");
                        }
                    }
                } 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.CFBamJavaFXTimeDefListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddTimeType = new CFButton();
        buttonAddTimeType.setMinWidth(200);
        buttonAddTimeType.setText("Add TimeType");
        buttonAddTimeType.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from w ww. j a  va  2s  . c  o  m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTimeTypeObj obj = (ICFBamTimeTypeObj) schemaObj.getTimeTypeTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getTimeTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamTimeTypeEditObj edit = (ICFBamTimeTypeEditObj) (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);
                    ICFBamJavaFXTimeTypePaneCommon jpanelCommon = (ICFBamJavaFXTimeTypePaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamSchemaDefObj) {
            list.add(buttonAddTimeType);
        }
        buttonAddTimeCol = new CFButton();
        buttonAddTimeCol.setMinWidth(200);
        buttonAddTimeCol.setText("Add TimeCol");
        buttonAddTimeCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTimeColObj obj = (ICFBamTimeColObj) schemaObj.getTimeColTableObj().newInstance();
                    CFBorderPane frame = javafxSchema.getTimeColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamTimeColEditObj edit = (ICFBamTimeColEditObj) (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);
                    ICFBamJavaFXTimeColPaneCommon jpanelCommon = (ICFBamJavaFXTimeColPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamTableObj) {
            list.add(buttonAddTimeCol);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamTimeDefObj selectedInstance = getJavaFXFocusAsTimeDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMT".equals(classCode)) {
                            ICFBamTimeTypeObj obj = (ICFBamTimeTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMC".equals(classCode)) {
                            ICFBamTimeColObj obj = (ICFBamTimeColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeColFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTimeDefObj, ICFBamTimeTypeObj, ICFBamTimeColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTimeDefObj selectedInstance = getJavaFXFocusAsTimeDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeDefFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMT".equals(classCode)) {
                            ICFBamTimeTypeObj obj = (ICFBamTimeTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMC".equals(classCode)) {
                            ICFBamTimeColObj obj = (ICFBamTimeColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeColFactory().newViewEditForm(cfFormManager,
                                    obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTimeDefObj, ICFBamTimeTypeObj, ICFBamTimeColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTimeDefObj selectedInstance = getJavaFXFocusAsTimeDef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeDefFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTimeDefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMT".equals(classCode)) {
                            ICFBamTimeTypeObj obj = (ICFBamTimeTypeObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("TIMC".equals(classCode)) {
                            ICFBamTimeColObj obj = (ICFBamTimeColObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getTimeColFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamTimeDefObj, ICFBamTimeTypeObj, ICFBamTimeColObj");
                        }
                    }
                } 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.CFBamJavaFXPopDepListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddPopSubDep1 = new CFButton();
        buttonAddPopSubDep1.setMinWidth(200);
        buttonAddPopSubDep1.setText("Add PopSubDep1");
        buttonAddPopSubDep1.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*w w w .ja  va  2  s  .  c  o m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamPopSubDep1Obj obj = (ICFBamPopSubDep1Obj) schemaObj.getPopSubDep1TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getPopSubDep1Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamPopSubDep1EditObj edit = (ICFBamPopSubDep1EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamPopTopDepObj container = (ICFBamPopTopDepObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerContPopTopDep(container);
                    ICFBamJavaFXPopSubDep1PaneCommon jpanelCommon = (ICFBamJavaFXPopSubDep1PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamPopTopDepObj) {
            list.add(buttonAddPopSubDep1);
        }
        buttonAddPopSubDep2 = new CFButton();
        buttonAddPopSubDep2.setMinWidth(200);
        buttonAddPopSubDep2.setText("Add PopSubDep2");
        buttonAddPopSubDep2.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamPopSubDep2Obj obj = (ICFBamPopSubDep2Obj) schemaObj.getPopSubDep2TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getPopSubDep2Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamPopSubDep2EditObj edit = (ICFBamPopSubDep2EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamPopSubDep1Obj container = (ICFBamPopSubDep1Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerPopSubDep1(container);
                    ICFBamJavaFXPopSubDep2PaneCommon jpanelCommon = (ICFBamJavaFXPopSubDep2PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamPopSubDep1Obj) {
            list.add(buttonAddPopSubDep2);
        }
        buttonAddPopSubDep3 = new CFButton();
        buttonAddPopSubDep3.setMinWidth(200);
        buttonAddPopSubDep3.setText("Add PopSubDep3");
        buttonAddPopSubDep3.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamPopSubDep3Obj obj = (ICFBamPopSubDep3Obj) schemaObj.getPopSubDep3TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getPopSubDep3Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamPopSubDep3EditObj edit = (ICFBamPopSubDep3EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamPopSubDep2Obj container = (ICFBamPopSubDep2Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerPopSubDep2(container);
                    ICFBamJavaFXPopSubDep3PaneCommon jpanelCommon = (ICFBamJavaFXPopSubDep3PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamPopSubDep2Obj) {
            list.add(buttonAddPopSubDep3);
        }
        buttonAddPopTopDep = new CFButton();
        buttonAddPopTopDep.setMinWidth(200);
        buttonAddPopTopDep.setText("Add PopTopDep");
        buttonAddPopTopDep.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamPopTopDepObj obj = (ICFBamPopTopDepObj) schemaObj.getPopTopDepTableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getPopTopDepFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamPopTopDepEditObj edit = (ICFBamPopTopDepEditObj) (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.setRequiredContainerContRelation(container);
                    ICFBamJavaFXPopTopDepPaneCommon jpanelCommon = (ICFBamJavaFXPopTopDepPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamRelationObj) {
            list.add(buttonAddPopTopDep);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamPopDepObj selectedInstance = getJavaFXFocusAsPopDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("POPD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getPopDepFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP1".equals(classCode)) {
                            ICFBamPopSubDep1Obj obj = (ICFBamPopSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP2".equals(classCode)) {
                            ICFBamPopSubDep2Obj obj = (ICFBamPopSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP3".equals(classCode)) {
                            ICFBamPopSubDep3Obj obj = (ICFBamPopSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POPT".equals(classCode)) {
                            ICFBamPopTopDepObj obj = (ICFBamPopTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamPopDepObj, ICFBamPopSubDep1Obj, ICFBamPopSubDep2Obj, ICFBamPopSubDep3Obj, ICFBamPopTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamPopDepObj selectedInstance = getJavaFXFocusAsPopDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("POPD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getPopDepFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("POP1".equals(classCode)) {
                            ICFBamPopSubDep1Obj obj = (ICFBamPopSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("POP2".equals(classCode)) {
                            ICFBamPopSubDep2Obj obj = (ICFBamPopSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("POP3".equals(classCode)) {
                            ICFBamPopSubDep3Obj obj = (ICFBamPopSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("POPT".equals(classCode)) {
                            ICFBamPopTopDepObj obj = (ICFBamPopTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXPopTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamPopDepObj, ICFBamPopSubDep1Obj, ICFBamPopSubDep2Obj, ICFBamPopSubDep3Obj, ICFBamPopTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamPopDepObj selectedInstance = getJavaFXFocusAsPopDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("POPD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getPopDepFactory().newAskDeleteForm(cfFormManager,
                                    selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXPopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP1".equals(classCode)) {
                            ICFBamPopSubDep1Obj obj = (ICFBamPopSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep1Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXPopSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP2".equals(classCode)) {
                            ICFBamPopSubDep2Obj obj = (ICFBamPopSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep2Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXPopSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POP3".equals(classCode)) {
                            ICFBamPopSubDep3Obj obj = (ICFBamPopSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopSubDep3Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXPopSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("POPT".equals(classCode)) {
                            ICFBamPopTopDepObj obj = (ICFBamPopTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getPopTopDepFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXPopTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamPopDepObj, ICFBamPopSubDep1Obj, ICFBamPopSubDep2Obj, ICFBamPopSubDep3Obj, ICFBamPopTopDepObj");
                        }
                    }
                } 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.CFBamJavaFXClearDepListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        LinkedList<CFButton> list = new LinkedList<CFButton>();

        vboxMenuAdd = new CFVBox(10);
        buttonAddClearSubDep1 = new CFButton();
        buttonAddClearSubDep1.setMinWidth(200);
        buttonAddClearSubDep1.setText("Add ClearSubDep1");
        buttonAddClearSubDep1.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from   w ww .ja  va2 s  .c om
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamClearSubDep1Obj obj = (ICFBamClearSubDep1Obj) schemaObj.getClearSubDep1TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getClearSubDep1Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamClearSubDep1EditObj edit = (ICFBamClearSubDep1EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamClearTopDepObj container = (ICFBamClearTopDepObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerClearTopDep(container);
                    ICFBamJavaFXClearSubDep1PaneCommon jpanelCommon = (ICFBamJavaFXClearSubDep1PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamClearTopDepObj) {
            list.add(buttonAddClearSubDep1);
        }
        buttonAddClearSubDep2 = new CFButton();
        buttonAddClearSubDep2.setMinWidth(200);
        buttonAddClearSubDep2.setText("Add ClearSubDep2");
        buttonAddClearSubDep2.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamClearSubDep2Obj obj = (ICFBamClearSubDep2Obj) schemaObj.getClearSubDep2TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getClearSubDep2Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamClearSubDep2EditObj edit = (ICFBamClearSubDep2EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamClearSubDep1Obj container = (ICFBamClearSubDep1Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerClearSubDep1(container);
                    ICFBamJavaFXClearSubDep2PaneCommon jpanelCommon = (ICFBamJavaFXClearSubDep2PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamClearSubDep1Obj) {
            list.add(buttonAddClearSubDep2);
        }
        buttonAddClearSubDep3 = new CFButton();
        buttonAddClearSubDep3.setMinWidth(200);
        buttonAddClearSubDep3.setText("Add ClearSubDep3");
        buttonAddClearSubDep3.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamClearSubDep3Obj obj = (ICFBamClearSubDep3Obj) schemaObj.getClearSubDep3TableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getClearSubDep3Factory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamClearSubDep3EditObj edit = (ICFBamClearSubDep3EditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamClearSubDep2Obj container = (ICFBamClearSubDep2Obj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerClearSubDep2(container);
                    ICFBamJavaFXClearSubDep3PaneCommon jpanelCommon = (ICFBamJavaFXClearSubDep3PaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamClearSubDep2Obj) {
            list.add(buttonAddClearSubDep3);
        }
        buttonAddClearTopDep = new CFButton();
        buttonAddClearTopDep.setMinWidth(200);
        buttonAddClearTopDep.setText("Add ClearTopDep");
        buttonAddClearTopDep.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamClearTopDepObj obj = (ICFBamClearTopDepObj) schemaObj.getClearTopDepTableObj()
                            .newInstance();
                    CFBorderPane frame = javafxSchema.getClearTopDepFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamClearTopDepEditObj edit = (ICFBamClearTopDepEditObj) (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);
                    ICFBamJavaFXClearTopDepPaneCommon jpanelCommon = (ICFBamJavaFXClearTopDepPaneCommon) frame;
                    jpanelCommon.setJavaFXFocus(obj);
                    jpanelCommon.setPaneMode(CFPane.PaneMode.Add);
                    cfFormManager.pushForm(frame);
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        if (javafxContainer instanceof ICFBamTableObj) {
            list.add(buttonAddClearTopDep);
        }

        int len = list.size();
        CFButton arr[] = new CFButton[len];
        Iterator<CFButton> iter = list.iterator();
        int idx = 0;
        while (iter.hasNext()) {
            arr[idx++] = iter.next();
        }
        Arrays.sort(arr, new CompareCFButtonByText());
        for (idx = 0; idx < len; idx++) {
            vboxMenuAdd.getChildren().add(arr[idx]);
        }

        buttonCancelAdd = new CFButton();
        buttonCancelAdd.setMinWidth(200);
        buttonCancelAdd.setText("Cancel Add...");
        buttonCancelAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(null);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        vboxMenuAdd.getChildren().add(buttonCancelAdd);

        scrollMenuAdd = new ScrollPane();
        scrollMenuAdd.setMinWidth(240);
        scrollMenuAdd.setMaxWidth(240);
        scrollMenuAdd.setFitToWidth(true);
        scrollMenuAdd.setHbarPolicy(ScrollBarPolicy.NEVER);
        scrollMenuAdd.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
        scrollMenuAdd.setContent(vboxMenuAdd);

        buttonAdd = new CFButton();
        buttonAdd.setMinWidth(200);
        buttonAdd.setText("Add...");
        buttonAdd.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    setLeft(scrollMenuAdd);
                    adjustListButtons();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonAdd);

        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");
                    }
                    ICFBamClearDepObj selectedInstance = getJavaFXFocusAsClearDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("CLRD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getClearDepFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR1".equals(classCode)) {
                            ICFBamClearSubDep1Obj obj = (ICFBamClearSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR2".equals(classCode)) {
                            ICFBamClearSubDep2Obj obj = (ICFBamClearSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR3".equals(classCode)) {
                            ICFBamClearSubDep3Obj obj = (ICFBamClearSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLRT".equals(classCode)) {
                            ICFBamClearTopDepObj obj = (ICFBamClearTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamClearDepObj, ICFBamClearSubDep1Obj, ICFBamClearSubDep2Obj, ICFBamClearSubDep3Obj, ICFBamClearTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamClearDepObj selectedInstance = getJavaFXFocusAsClearDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("CLRD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getClearDepFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR1".equals(classCode)) {
                            ICFBamClearSubDep1Obj obj = (ICFBamClearSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep1Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR2".equals(classCode)) {
                            ICFBamClearSubDep2Obj obj = (ICFBamClearSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep2Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR3".equals(classCode)) {
                            ICFBamClearSubDep3Obj obj = (ICFBamClearSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep3Factory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else if ("CLRT".equals(classCode)) {
                            ICFBamClearTopDepObj obj = (ICFBamClearTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearTopDepFactory()
                                    .newViewEditForm(cfFormManager, obj, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXClearTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamClearDepObj, ICFBamClearSubDep1Obj, ICFBamClearSubDep2Obj, ICFBamClearSubDep3Obj, ICFBamClearTopDepObj");
                        }
                    }
                } 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");
                    }
                    ICFBamClearDepObj selectedInstance = getJavaFXFocusAsClearDep();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("CLRD".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getClearDepFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXClearDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR1".equals(classCode)) {
                            ICFBamClearSubDep1Obj obj = (ICFBamClearSubDep1Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep1Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXClearSubDep1PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR2".equals(classCode)) {
                            ICFBamClearSubDep2Obj obj = (ICFBamClearSubDep2Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep2Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXClearSubDep2PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLR3".equals(classCode)) {
                            ICFBamClearSubDep3Obj obj = (ICFBamClearSubDep3Obj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearSubDep3Factory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXClearSubDep3PaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else if ("CLRT".equals(classCode)) {
                            ICFBamClearTopDepObj obj = (ICFBamClearTopDepObj) selectedInstance;
                            CFBorderPane frame = javafxSchema.getClearTopDepFactory()
                                    .newAskDeleteForm(cfFormManager, obj, getDeleteCallback());
                            ((ICFBamJavaFXClearTopDepPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamClearDepObj, ICFBamClearSubDep1Obj, ICFBamClearSubDep2Obj, ICFBamClearSubDep3Obj, ICFBamClearTopDepObj");
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonDeleteSelected);

    }
    return (hboxMenu);
}