List of usage examples for javafx.event ActionEvent getSource
public Object getSource()
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXDateColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddDateCol = new CFButton(); buttonAddDateCol.setMinWidth(200); buttonAddDateCol.setText("Add DateCol"); buttonAddDateCol.setOnAction(new EventHandler<ActionEvent>() { @Override//from ww w . j a v a2s . co m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamDateColObj obj = (ICFBamDateColObj) schemaObj.getDateColTableObj().newInstance(); ICFBamDateColEditObj edit = (ICFBamDateColEditObj) (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.getDateColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXDateColPaneCommon jpanelCommon = (ICFBamJavaFXDateColPaneCommon) 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(buttonAddDateCol); 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"); } ICFBamDateColObj selectedInstance = getJavaFXFocusAsDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateColFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateColObj"); } } } 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"); } ICFBamDateColObj selectedInstance = getJavaFXFocusAsDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateColFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateColObj"); } } } 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"); } ICFBamDateColObj selectedInstance = getJavaFXFocusAsDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateColObj"); } } } 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.CFBamJavaFXTextColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTextCol = new CFButton(); buttonAddTextCol.setMinWidth(200); buttonAddTextCol.setText("Add TextCol"); buttonAddTextCol.setOnAction(new EventHandler<ActionEvent>() { @Override// w w w . ja v a 2s . co m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTextColObj obj = (ICFBamTextColObj) schemaObj.getTextColTableObj().newInstance(); ICFBamTextColEditObj edit = (ICFBamTextColEditObj) (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.getTextColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTextColPaneCommon jpanelCommon = (ICFBamJavaFXTextColPaneCommon) 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(buttonAddTextCol); 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"); } ICFBamTextColObj selectedInstance = getJavaFXFocusAsTextCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextColFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTextColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextColObj"); } } } 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"); } ICFBamTextColObj selectedInstance = getJavaFXFocusAsTextCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextColFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTextColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextColObj"); } } } 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"); } ICFBamTextColObj selectedInstance = getJavaFXFocusAsTextCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTextColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextColObj"); } } } 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.CFBamJavaFXFloatColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddFloatCol = new CFButton(); buttonAddFloatCol.setMinWidth(200); buttonAddFloatCol.setText("Add FloatCol"); buttonAddFloatCol.setOnAction(new EventHandler<ActionEvent>() { @Override/*from w w w . ja va 2s. com*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamFloatColObj obj = (ICFBamFloatColObj) schemaObj.getFloatColTableObj().newInstance(); ICFBamFloatColEditObj edit = (ICFBamFloatColEditObj) (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.getFloatColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXFloatColPaneCommon jpanelCommon = (ICFBamJavaFXFloatColPaneCommon) 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(buttonAddFloatCol); 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"); } ICFBamFloatColObj selectedInstance = getJavaFXFocusAsFloatCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("FLTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getFloatColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXFloatColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamFloatColObj"); } } } 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"); } ICFBamFloatColObj selectedInstance = getJavaFXFocusAsFloatCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("FLTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getFloatColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXFloatColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamFloatColObj"); } } } 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"); } ICFBamFloatColObj selectedInstance = getJavaFXFocusAsFloatCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("FLTC".equals(classCode)) { CFBorderPane frame = javafxSchema.getFloatColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXFloatColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamFloatColObj"); } } } 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.CFBamJavaFXInt16ColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddInt16Col = new CFButton(); buttonAddInt16Col.setMinWidth(200); buttonAddInt16Col.setText("Add Int16Col"); buttonAddInt16Col.setOnAction(new EventHandler<ActionEvent>() { @Override//from w ww .jav a 2 s . c o m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamInt16ColObj obj = (ICFBamInt16ColObj) schemaObj.getInt16ColTableObj().newInstance(); ICFBamInt16ColEditObj edit = (ICFBamInt16ColEditObj) (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.getInt16ColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXInt16ColPaneCommon jpanelCommon = (ICFBamJavaFXInt16ColPaneCommon) 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(buttonAddInt16Col); 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"); } ICFBamInt16ColObj selectedInstance = getJavaFXFocusAsInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt16ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt16ColObj"); } } } 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"); } ICFBamInt16ColObj selectedInstance = getJavaFXFocusAsInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt16ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt16ColObj"); } } } 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"); } ICFBamInt16ColObj selectedInstance = getJavaFXFocusAsInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt16ColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt16ColObj"); } } } 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.CFBamJavaFXInt32ColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddInt32Col = new CFButton(); buttonAddInt32Col.setMinWidth(200); buttonAddInt32Col.setText("Add Int32Col"); buttonAddInt32Col.setOnAction(new EventHandler<ActionEvent>() { @Override// ww w .jav a 2s . c o m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamInt32ColObj obj = (ICFBamInt32ColObj) schemaObj.getInt32ColTableObj().newInstance(); ICFBamInt32ColEditObj edit = (ICFBamInt32ColEditObj) (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.getInt32ColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXInt32ColPaneCommon jpanelCommon = (ICFBamJavaFXInt32ColPaneCommon) 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(buttonAddInt32Col); 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"); } ICFBamInt32ColObj selectedInstance = getJavaFXFocusAsInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt32ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt32ColObj"); } } } 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"); } ICFBamInt32ColObj selectedInstance = getJavaFXFocusAsInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt32ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt32ColObj"); } } } 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"); } ICFBamInt32ColObj selectedInstance = getJavaFXFocusAsInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt32ColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt32ColObj"); } } } 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.CFBamJavaFXInt64ColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddInt64Col = new CFButton(); buttonAddInt64Col.setMinWidth(200); buttonAddInt64Col.setText("Add Int64Col"); buttonAddInt64Col.setOnAction(new EventHandler<ActionEvent>() { @Override/*from w w w .j a v a 2s. c o m*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamInt64ColObj obj = (ICFBamInt64ColObj) schemaObj.getInt64ColTableObj().newInstance(); ICFBamInt64ColEditObj edit = (ICFBamInt64ColEditObj) (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.getInt64ColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXInt64ColPaneCommon jpanelCommon = (ICFBamJavaFXInt64ColPaneCommon) 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(buttonAddInt64Col); 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"); } ICFBamInt64ColObj selectedInstance = getJavaFXFocusAsInt64Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I64C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt64ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt64ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt64ColObj"); } } } 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"); } ICFBamInt64ColObj selectedInstance = getJavaFXFocusAsInt64Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I64C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt64ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXInt64ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt64ColObj"); } } } 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"); } ICFBamInt64ColObj selectedInstance = getJavaFXFocusAsInt64Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("I64C".equals(classCode)) { CFBorderPane frame = javafxSchema.getInt64ColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXInt64ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamInt64ColObj"); } } } 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.CFBamJavaFXTokenColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTokenCol = new CFButton(); buttonAddTokenCol.setMinWidth(200); buttonAddTokenCol.setText("Add TokenCol"); buttonAddTokenCol.setOnAction(new EventHandler<ActionEvent>() { @Override/*w w w .j av a 2s .c om*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTokenColObj obj = (ICFBamTokenColObj) schemaObj.getTokenColTableObj().newInstance(); ICFBamTokenColEditObj edit = (ICFBamTokenColEditObj) (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.getTokenColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTokenColPaneCommon jpanelCommon = (ICFBamJavaFXTokenColPaneCommon) 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(buttonAddTokenCol); 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"); } ICFBamTokenColObj selectedInstance = getJavaFXFocusAsTokenCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TKNC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTokenColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTokenColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTokenColObj"); } } } 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"); } ICFBamTokenColObj selectedInstance = getJavaFXFocusAsTokenCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TKNC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTokenColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTokenColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTokenColObj"); } } } 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"); } ICFBamTokenColObj selectedInstance = getJavaFXFocusAsTokenCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TKNC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTokenColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTokenColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTokenColObj"); } } } 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.CFBamJavaFXTZTimeColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTZTimeCol = new CFButton(); buttonAddTZTimeCol.setMinWidth(200); buttonAddTZTimeCol.setText("Add TZTimeCol"); buttonAddTZTimeCol.setOnAction(new EventHandler<ActionEvent>() { @Override/* w w w . j a va 2 s . c om*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTZTimeColObj obj = (ICFBamTZTimeColObj) schemaObj.getTZTimeColTableObj() .newInstance(); ICFBamTZTimeColEditObj edit = (ICFBamTZTimeColEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerTenant(secTenant); ICFBamTableObj container = (ICFBamTableObj) (getJavaFXContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "JavaFXContainer"); } edit.setRequiredContainerTable(container); CFBorderPane frame = javafxSchema.getTZTimeColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTZTimeColPaneCommon jpanelCommon = (ICFBamJavaFXTZTimeColPaneCommon) frame; jpanelCommon.setJavaFXFocus(obj); jpanelCommon.setPaneMode(CFPane.PaneMode.Add); cfFormManager.pushForm(frame); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonAddTZTimeCol); buttonViewSelected = new CFButton(); buttonViewSelected.setMinWidth(200); buttonViewSelected.setText("View Selected"); buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonViewSelected); buttonEditSelected = new CFButton(); buttonEditSelected.setMinWidth(200); buttonEditSelected.setText("Edit Selected"); buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonEditSelected); buttonDeleteSelected = new CFButton(); buttonDeleteSelected.setMinWidth(200); buttonDeleteSelected.setText("Delete Selected"); buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeColObj selectedInstance = getJavaFXFocusAsTZTimeCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTZTimeColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonDeleteSelected); } return (hboxMenu); }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXUuidGenListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddUuidGen = new CFButton(); buttonAddUuidGen.setMinWidth(200); buttonAddUuidGen.setText("Add UuidGen"); buttonAddUuidGen.setOnAction(new EventHandler<ActionEvent>() { @Override/*from ww w. j a va 2 s . c o m*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamUuidGenObj obj = (ICFBamUuidGenObj) schemaObj.getUuidGenTableObj().newInstance(); 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); CFBorderPane frame = javafxSchema.getUuidGenFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXUuidGenPaneCommon jpanelCommon = (ICFBamJavaFXUuidGenPaneCommon) 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(buttonAddUuidGen); 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"); } ICFBamUuidGenObj selectedInstance = getJavaFXFocusAsUuidGen(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("IGUU".equals(classCode)) { CFBorderPane frame = javafxSchema.getUuidGenFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "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"); } ICFBamUuidGenObj selectedInstance = getJavaFXFocusAsUuidGen(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("IGUU".equals(classCode)) { CFBorderPane frame = javafxSchema.getUuidGenFactory().newViewEditForm(cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "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"); } ICFBamUuidGenObj selectedInstance = getJavaFXFocusAsUuidGen(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("IGUU".equals(classCode)) { CFBorderPane frame = javafxSchema.getUuidGenFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXUuidGenPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "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.CFBamJavaFXEnumTypeListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddEnumType = new CFButton(); buttonAddEnumType.setMinWidth(200); buttonAddEnumType.setText("Add EnumType"); buttonAddEnumType.setOnAction(new EventHandler<ActionEvent>() { @Override//from w w w . j a v a2 s . c o m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamEnumTypeObj obj = (ICFBamEnumTypeObj) schemaObj.getEnumTypeTableObj().newInstance(); 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); CFBorderPane frame = javafxSchema.getEnumTypeFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXEnumTypePaneCommon jpanelCommon = (ICFBamJavaFXEnumTypePaneCommon) 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(buttonAddEnumType); 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"); } ICFBamEnumTypeObj selectedInstance = getJavaFXFocusAsEnumType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("ENMT".equals(classCode)) { CFBorderPane frame = javafxSchema.getEnumTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "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"); } ICFBamEnumTypeObj selectedInstance = getJavaFXFocusAsEnumType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("ENMT".equals(classCode)) { CFBorderPane frame = javafxSchema.getEnumTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "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"); } ICFBamEnumTypeObj selectedInstance = getJavaFXFocusAsEnumType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("ENMT".equals(classCode)) { CFBorderPane frame = javafxSchema.getEnumTypeFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXEnumTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamEnumTypeObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonDeleteSelected); } return (hboxMenu); }