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.CFBamJavaFXSchemaRefListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddSchemaRef = new CFButton();
        buttonAddSchemaRef.setMinWidth(200);
        buttonAddSchemaRef.setText("Add SchemaRef");
        buttonAddSchemaRef.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*w w w. ja  v  a  2 s .com*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamSchemaRefObj obj = (ICFBamSchemaRefObj) schemaObj.getSchemaRefTableObj()
                            .newInstance();
                    ICFBamSchemaRefEditObj edit = (ICFBamSchemaRefEditObj) (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.setRequiredContainerSchema(container);
                    CFBorderPane frame = javafxSchema.getSchemaRefFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXSchemaRefPaneCommon jpanelCommon = (ICFBamJavaFXSchemaRefPaneCommon) 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(buttonAddSchemaRef);
        buttonMoveUpSelected = new CFButton();
        buttonMoveUpSelected.setMinWidth(200);
        buttonMoveUpSelected.setText("Move Up Selected");
        buttonMoveUpSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupPrev()) {
                            selectedInstance.moveUp();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonMoveUpSelected);

        buttonMoveDownSelected = new CFButton();
        buttonMoveDownSelected.setMinWidth(200);
        buttonMoveDownSelected.setText("Move Down Selected");
        buttonMoveDownSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupNext()) {
                            selectedInstance.moveDown();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonMoveDownSelected);

        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SCRF".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getSchemaRefFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXSchemaRefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamSchemaRefObj");
                        }
                    }
                } 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");
                    }
                    ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SCRF".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getSchemaRefFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXSchemaRefPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamSchemaRefObj");
                        }
                    }
                } 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");
                    }
                    ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SCRF".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getSchemaRefFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXSchemaRefPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamSchemaRefObj");
                        }
                    }
                } 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.CFBamJavaFXTimeColListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddTimeCol = new CFButton();
        buttonAddTimeCol.setMinWidth(200);
        buttonAddTimeCol.setText("Add TimeCol");
        buttonAddTimeCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override// w  ww.ja  va 2 s.com
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamTimeColObj obj = (ICFBamTimeColObj) schemaObj.getTimeColTableObj().newInstance();
                    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);
                    CFBorderPane frame = javafxSchema.getTimeColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXTimeColPaneCommon jpanelCommon = (ICFBamJavaFXTimeColPaneCommon) 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(buttonAddTimeCol);
        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");
                    }
                    ICFBamTimeColObj selectedInstance = getJavaFXFocusAsTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "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");
                    }
                    ICFBamTimeColObj selectedInstance = getJavaFXFocusAsTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "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");
                    }
                    ICFBamTimeColObj selectedInstance = getJavaFXFocusAsTimeCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "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.CFBamJavaFXUuidColListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddUuidCol = new CFButton();
        buttonAddUuidCol.setMinWidth(200);
        buttonAddUuidCol.setText("Add UuidCol");
        buttonAddUuidCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from www.ja  v a  2 s . com*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamUuidColObj obj = (ICFBamUuidColObj) schemaObj.getUuidColTableObj().newInstance();
                    ICFBamUuidColEditObj edit = (ICFBamUuidColEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamTableObj container = (ICFBamTableObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerTable(container);
                    CFBorderPane frame = javafxSchema.getUuidColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXUuidColPaneCommon jpanelCommon = (ICFBamJavaFXUuidColPaneCommon) 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(buttonAddUuidCol);
        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");
                    }
                    ICFBamUuidColObj selectedInstance = getJavaFXFocusAsUuidCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamUuidColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamUuidColObj selectedInstance = getJavaFXFocusAsUuidCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidColFactory().newViewEditForm(cfFormManager,
                                    selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXUuidColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamUuidColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamUuidColObj selectedInstance = getJavaFXFocusAsUuidCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("UIDC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getUuidColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXUuidColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamUuidColObj");
                        }
                    }
                } 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.CFBamJavaFXServerProcListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddServerProc = new CFButton();
        buttonAddServerProc.setMinWidth(200);
        buttonAddServerProc.setText("Add ServerProc");
        buttonAddServerProc.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from   w  ww.  ja v a  2s.  com*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamServerProcObj obj = (ICFBamServerProcObj) schemaObj.getServerProcTableObj()
                            .newInstance();
                    ICFBamServerProcEditObj edit = (ICFBamServerProcEditObj) (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.setRequiredContainerForTable(container);
                    CFBorderPane frame = javafxSchema.getServerProcFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXServerProcPaneCommon jpanelCommon = (ICFBamJavaFXServerProcPaneCommon) 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(buttonAddServerProc);
        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");
                    }
                    ICFBamServerProcObj selectedInstance = getJavaFXFocusAsServerProc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVP".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerProcFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerProcPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerProcObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerProcObj selectedInstance = getJavaFXFocusAsServerProc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVP".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerProcFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerProcPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerProcObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerProcObj selectedInstance = getJavaFXFocusAsServerProc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVP".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerProcFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXServerProcPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerProcObj");
                        }
                    }
                } 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.CFBamJavaFXBoolColListPane.java

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

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

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

    }
    return (hboxMenu);
}

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

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddTimeType = new CFButton();
        buttonAddTimeType.setMinWidth(200);
        buttonAddTimeType.setText("Add TimeType");
        buttonAddTimeType.setOnAction(new EventHandler<ActionEvent>() {
            @Override//  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();
                    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);
                    CFBorderPane frame = javafxSchema.getTimeTypeFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXTimeTypePaneCommon jpanelCommon = (ICFBamJavaFXTimeTypePaneCommon) 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(buttonAddTimeType);
        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");
                    }
                    ICFBamTimeTypeObj selectedInstance = getJavaFXFocusAsTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTimeTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTimeTypeObj selectedInstance = getJavaFXFocusAsTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTimeTypeObj");
                        }
                    }
                } 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");
                    }
                    ICFBamTimeTypeObj selectedInstance = getJavaFXFocusAsTimeType();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("TIMT".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getTimeTypeFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamTimeTypeObj");
                        }
                    }
                } 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.CFBamJavaFXServerObjFuncListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddServerObjFunc = new CFButton();
        buttonAddServerObjFunc.setMinWidth(200);
        buttonAddServerObjFunc.setText("Add ServerObjFunc");
        buttonAddServerObjFunc.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from   ww  w .ja v a 2s.  com
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamServerObjFuncObj obj = (ICFBamServerObjFuncObj) schemaObj.getServerObjFuncTableObj()
                            .newInstance();
                    ICFBamServerObjFuncEditObj edit = (ICFBamServerObjFuncEditObj) (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.setRequiredContainerForTable(container);
                    CFBorderPane frame = javafxSchema.getServerObjFuncFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXServerObjFuncPaneCommon jpanelCommon = (ICFBamJavaFXServerObjFuncPaneCommon) 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(buttonAddServerObjFunc);
        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");
                    }
                    ICFBamServerObjFuncObj selectedInstance = getJavaFXFocusAsServerObjFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVO".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerObjFuncFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerObjFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerObjFuncObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerObjFuncObj selectedInstance = getJavaFXFocusAsServerObjFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVO".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerObjFuncFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerObjFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerObjFuncObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerObjFuncObj selectedInstance = getJavaFXFocusAsServerObjFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVO".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerObjFuncFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXServerObjFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamServerObjFuncObj");
                        }
                    }
                } 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.CFBamJavaFXIndexColListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddIndexCol = new CFButton();
        buttonAddIndexCol.setMinWidth(200);
        buttonAddIndexCol.setText("Add IndexCol");
        buttonAddIndexCol.setOnAction(new EventHandler<ActionEvent>() {
            @Override//from w ww . j a v  a 2 s. co m
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamIndexColObj obj = (ICFBamIndexColObj) schemaObj.getIndexColTableObj().newInstance();
                    ICFBamIndexColEditObj edit = (ICFBamIndexColEditObj) (obj.beginEdit());
                    if (edit == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "edit");
                    }
                    ICFSecurityTenantObj secTenant = schemaObj.getSecTenant();
                    edit.setRequiredOwnerTenant(secTenant);
                    ICFBamIndexObj container = (ICFBamIndexObj) (getJavaFXContainer());
                    if (container == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "JavaFXContainer");
                    }
                    edit.setRequiredContainerIndex(container);
                    CFBorderPane frame = javafxSchema.getIndexColFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXIndexColPaneCommon jpanelCommon = (ICFBamJavaFXIndexColPaneCommon) 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(buttonAddIndexCol);
        buttonMoveUpSelected = new CFButton();
        buttonMoveUpSelected.setMinWidth(200);
        buttonMoveUpSelected.setText("Move Up Selected");
        buttonMoveUpSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupPrev()) {
                            selectedInstance.moveUp();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonMoveUpSelected);

        buttonMoveDownSelected = new CFButton();
        buttonMoveDownSelected.setMinWidth(200);
        buttonMoveDownSelected.setText("Move Down Selected");
        buttonMoveDownSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                    if (selectedInstance != null) {
                        if (null != selectedInstance.getOptionalLookupNext()) {
                            selectedInstance.moveDown();
                            refreshMe();
                        }
                    }
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonMoveDownSelected);

        buttonViewSelected = new CFButton();
        buttonViewSelected.setMinWidth(200);
        buttonViewSelected.setText("View Selected");
        buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(),
                                S_ProcName, 0, "schemaObj");
                    }
                    ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("IDXC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getIndexColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXIndexColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamIndexColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("IDXC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getIndexColFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXIndexColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamIndexColObj");
                        }
                    }
                } 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");
                    }
                    ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("IDXC".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getIndexColFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXIndexColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance, "ICFBamIndexColObj");
                        }
                    }
                } 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.CFBamJavaFXServerListFuncListPane.java

public CFHBox getPanelHBoxMenu() {
    if (hboxMenu == null) {
        hboxMenu = new CFHBox(10);
        buttonAddServerListFunc = new CFButton();
        buttonAddServerListFunc.setMinWidth(200);
        buttonAddServerListFunc.setText("Add ServerListFunc");
        buttonAddServerListFunc.setOnAction(new EventHandler<ActionEvent>() {
            @Override/*from   w  w w .ja v a  2 s .  c o  m*/
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    ICFBamServerListFuncObj obj = (ICFBamServerListFuncObj) schemaObj
                            .getServerListFuncTableObj().newInstance();
                    ICFBamServerListFuncEditObj edit = (ICFBamServerListFuncEditObj) (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.setRequiredContainerForTable(container);
                    CFBorderPane frame = javafxSchema.getServerListFuncFactory().newAddForm(cfFormManager, obj,
                            getViewEditClosedCallback(), true);
                    ICFBamJavaFXServerListFuncPaneCommon jpanelCommon = (ICFBamJavaFXServerListFuncPaneCommon) 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(buttonAddServerListFunc);
        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");
                    }
                    ICFBamServerListFuncObj selectedInstance = getJavaFXFocusAsServerListFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVL".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerListFuncFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerListFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamServerListFuncObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerListFuncObj selectedInstance = getJavaFXFocusAsServerListFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVL".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerListFuncFactory().newViewEditForm(
                                    cfFormManager, selectedInstance, getViewEditClosedCallback(), false);
                            ((ICFBamJavaFXServerListFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamServerListFuncObj");
                        }
                    }
                } 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");
                    }
                    ICFBamServerListFuncObj selectedInstance = getJavaFXFocusAsServerListFunc();
                    if (selectedInstance != null) {
                        String classCode = selectedInstance.getClassCode();
                        if ("SRVL".equals(classCode)) {
                            CFBorderPane frame = javafxSchema.getServerListFuncFactory()
                                    .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback());
                            ((ICFBamJavaFXServerListFuncPaneCommon) frame).setPaneMode(CFPane.PaneMode.View);
                            cfFormManager.pushForm(frame);
                        } else {
                            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(),
                                    S_ProcName, "selectedInstance", selectedInstance,
                                    "ICFBamServerListFuncObj");
                        }
                    }
                } 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.CFBamJavaFXBoolTypeListPane.java

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

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

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

    }
    return (hboxMenu);
}