List of usage examples for javafx.event ActionEvent getSource
public Object getSource()
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTextTypeListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTextType = new CFButton(); buttonAddTextType.setMinWidth(200); buttonAddTextType.setText("Add TextType"); buttonAddTextType.setOnAction(new EventHandler<ActionEvent>() { @Override//from w w w .jav a 2 s. com public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTextTypeObj obj = (ICFBamTextTypeObj) schemaObj.getTextTypeTableObj().newInstance(); ICFBamTextTypeEditObj edit = (ICFBamTextTypeEditObj) (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.getTextTypeFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTextTypePaneCommon jpanelCommon = (ICFBamJavaFXTextTypePaneCommon) 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(buttonAddTextType); 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"); } ICFBamTextTypeObj selectedInstance = getJavaFXFocusAsTextType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTextTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextTypeObj"); } } } 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"); } ICFBamTextTypeObj selectedInstance = getJavaFXFocusAsTextType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTextTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextTypeObj"); } } } 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"); } ICFBamTextTypeObj selectedInstance = getJavaFXFocusAsTextType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TXTT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTextTypeFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTextTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTextTypeObj"); } } } 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.CFBamJavaFXDateTypeListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddDateType = new CFButton(); buttonAddDateType.setMinWidth(200); buttonAddDateType.setText("Add DateType"); buttonAddDateType.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(); ICFBamDateTypeObj obj = (ICFBamDateTypeObj) schemaObj.getDateTypeTableObj().newInstance(); ICFBamDateTypeEditObj edit = (ICFBamDateTypeEditObj) (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.getDateTypeFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXDateTypePaneCommon jpanelCommon = (ICFBamJavaFXDateTypePaneCommon) 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(buttonAddDateType); 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"); } ICFBamDateTypeObj selectedInstance = getJavaFXFocusAsDateType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATT".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDateTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateTypeObj"); } } } 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"); } ICFBamDateTypeObj selectedInstance = getJavaFXFocusAsDateType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATT".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDateTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateTypeObj"); } } } 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"); } ICFBamDateTypeObj selectedInstance = getJavaFXFocusAsDateType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DATT".equals(classCode)) { CFBorderPane frame = javafxSchema.getDateTypeFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXDateTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDateTypeObj"); } } } 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.CFBamJavaFXTZTimeTypeListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTZTimeType = new CFButton(); buttonAddTZTimeType.setMinWidth(200); buttonAddTZTimeType.setText("Add TZTimeType"); buttonAddTZTimeType.setOnAction(new EventHandler<ActionEvent>() { @Override//from w w w.ja v a 2 s .co m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTZTimeTypeObj obj = (ICFBamTZTimeTypeObj) schemaObj.getTZTimeTypeTableObj() .newInstance(); ICFBamTZTimeTypeEditObj edit = (ICFBamTZTimeTypeEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerTenant(secTenant); ICFBamSchemaDefObj container = (ICFBamSchemaDefObj) (getJavaFXContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "JavaFXContainer"); } edit.setRequiredContainerSchemaDef(container); CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTZTimeTypePaneCommon jpanelCommon = (ICFBamJavaFXTZTimeTypePaneCommon) frame; jpanelCommon.setJavaFXFocus(obj); jpanelCommon.setPaneMode(CFPane.PaneMode.Add); cfFormManager.pushForm(frame); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonAddTZTimeType); buttonViewSelected = new CFButton(); buttonViewSelected.setMinWidth(200); buttonViewSelected.setText("View Selected"); buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonViewSelected); buttonEditSelected = new CFButton(); buttonEditSelected.setMinWidth(200); buttonEditSelected.setText("Edit Selected"); buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeTypeFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonEditSelected); buttonDeleteSelected = new CFButton(); buttonDeleteSelected.setMinWidth(200); buttonDeleteSelected.setText("Delete Selected"); buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamTZTimeTypeObj selectedInstance = getJavaFXFocusAsTZTimeType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("TMZT".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZTimeTypeFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTZTimeTypePaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZTimeTypeObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonDeleteSelected); } return (hboxMenu); }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXRelationListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddRelation = new CFButton(); buttonAddRelation.setMinWidth(200); buttonAddRelation.setText("Add Relation"); buttonAddRelation.setOnAction(new EventHandler<ActionEvent>() { @Override/*from ww w. java 2s .co m*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamRelationObj obj = (ICFBamRelationObj) schemaObj.getRelationTableObj().newInstance(); ICFBamRelationEditObj edit = (ICFBamRelationEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerRelTenant(secTenant); ICFBamTableObj container = (ICFBamTableObj) (getJavaFXContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "JavaFXContainer"); } edit.setRequiredContainerFromTable(container); CFBorderPane frame = javafxSchema.getRelationFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXRelationPaneCommon jpanelCommon = (ICFBamJavaFXRelationPaneCommon) 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(buttonAddRelation); 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"); } ICFBamRelationObj selectedInstance = getJavaFXFocusAsRelation(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELD".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXRelationPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationObj"); } } } 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"); } ICFBamRelationObj selectedInstance = getJavaFXFocusAsRelation(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELD".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXRelationPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationObj"); } } } 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"); } ICFBamRelationObj selectedInstance = getJavaFXFocusAsRelation(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELD".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXRelationPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationObj"); } } } 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.CFBamJavaFXDoubleColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddDoubleCol = new CFButton(); buttonAddDoubleCol.setMinWidth(200); buttonAddDoubleCol.setText("Add DoubleCol"); buttonAddDoubleCol.setOnAction(new EventHandler<ActionEvent>() { @Override/*from w w w . j ava2 s. c o m*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamDoubleColObj obj = (ICFBamDoubleColObj) schemaObj.getDoubleColTableObj() .newInstance(); ICFBamDoubleColEditObj edit = (ICFBamDoubleColEditObj) (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.getDoubleColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXDoubleColPaneCommon jpanelCommon = (ICFBamJavaFXDoubleColPaneCommon) 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(buttonAddDoubleCol); 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"); } ICFBamDoubleColObj selectedInstance = getJavaFXFocusAsDoubleCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DBLC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDoubleColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDoubleColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDoubleColObj"); } } } 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"); } ICFBamDoubleColObj selectedInstance = getJavaFXFocusAsDoubleCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DBLC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDoubleColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXDoubleColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDoubleColObj"); } } } 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"); } ICFBamDoubleColObj selectedInstance = getJavaFXFocusAsDoubleCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DBLC".equals(classCode)) { CFBorderPane frame = javafxSchema.getDoubleColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXDoubleColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamDoubleColObj"); } } } 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.CFBamJavaFXUInt32ColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddUInt32Col = new CFButton(); buttonAddUInt32Col.setMinWidth(200); buttonAddUInt32Col.setText("Add UInt32Col"); buttonAddUInt32Col.setOnAction(new EventHandler<ActionEvent>() { @Override//w w w . ja va 2 s.co m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamUInt32ColObj obj = (ICFBamUInt32ColObj) schemaObj.getUInt32ColTableObj() .newInstance(); ICFBamUInt32ColEditObj edit = (ICFBamUInt32ColEditObj) (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.getUInt32ColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXUInt32ColPaneCommon jpanelCommon = (ICFBamJavaFXUInt32ColPaneCommon) 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(buttonAddUInt32Col); 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"); } ICFBamUInt32ColObj selectedInstance = getJavaFXFocusAsUInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt32ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt32ColObj"); } } } 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"); } ICFBamUInt32ColObj selectedInstance = getJavaFXFocusAsUInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt32ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt32ColObj"); } } } 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"); } ICFBamUInt32ColObj selectedInstance = getJavaFXFocusAsUInt32Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U32C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt32ColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXUInt32ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt32ColObj"); } } } 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.CFBamJavaFXStringColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddStringCol = new CFButton(); buttonAddStringCol.setMinWidth(200); buttonAddStringCol.setText("Add StringCol"); buttonAddStringCol.setOnAction(new EventHandler<ActionEvent>() { @Override//from w w w. j a v a2 s .c om public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamStringColObj obj = (ICFBamStringColObj) schemaObj.getStringColTableObj() .newInstance(); ICFBamStringColEditObj edit = (ICFBamStringColEditObj) (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.getStringColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXStringColPaneCommon jpanelCommon = (ICFBamJavaFXStringColPaneCommon) 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(buttonAddStringCol); 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"); } ICFBamStringColObj selectedInstance = getJavaFXFocusAsStringCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("STRC".equals(classCode)) { CFBorderPane frame = javafxSchema.getStringColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXStringColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamStringColObj"); } } } 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"); } ICFBamStringColObj selectedInstance = getJavaFXFocusAsStringCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("STRC".equals(classCode)) { CFBorderPane frame = javafxSchema.getStringColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXStringColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamStringColObj"); } } } 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"); } ICFBamStringColObj selectedInstance = getJavaFXFocusAsStringCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("STRC".equals(classCode)) { CFBorderPane frame = javafxSchema.getStringColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXStringColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamStringColObj"); } } } 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.CFBamJavaFXRelationColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddRelationCol = new CFButton(); buttonAddRelationCol.setMinWidth(200); buttonAddRelationCol.setText("Add RelationCol"); buttonAddRelationCol.setOnAction(new EventHandler<ActionEvent>() { @Override/*from w ww .ja v a 2 s . c o m*/ public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamRelationColObj obj = (ICFBamRelationColObj) schemaObj.getRelationColTableObj() .newInstance(); ICFBamRelationColEditObj edit = (ICFBamRelationColEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerTenant(secTenant); ICFBamRelationObj container = (ICFBamRelationObj) (getJavaFXContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "JavaFXContainer"); } edit.setRequiredContainerRelation(container); CFBorderPane frame = javafxSchema.getRelationColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXRelationColPaneCommon jpanelCommon = (ICFBamJavaFXRelationColPaneCommon) frame; jpanelCommon.setJavaFXFocus(obj); jpanelCommon.setPaneMode(CFPane.PaneMode.Add); cfFormManager.pushForm(frame); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonAddRelationCol); buttonMoveUpSelected = new CFButton(); buttonMoveUpSelected.setMinWidth(200); buttonMoveUpSelected.setText("Move Up Selected"); buttonMoveUpSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol(); if (selectedInstance != null) { if (null != selectedInstance.getOptionalLookupPrev()) { selectedInstance.moveUp(); refreshMe(); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonMoveUpSelected); buttonMoveDownSelected = new CFButton(); buttonMoveDownSelected.setMinWidth(200); buttonMoveDownSelected.setText("Move Down Selected"); buttonMoveDownSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol(); if (selectedInstance != null) { if (null != selectedInstance.getOptionalLookupNext()) { selectedInstance.moveDown(); refreshMe(); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonMoveDownSelected); buttonViewSelected = new CFButton(); buttonViewSelected.setMinWidth(200); buttonViewSelected.setText("View Selected"); buttonViewSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELC".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonViewSelected); buttonEditSelected = new CFButton(); buttonEditSelected.setMinWidth(200); buttonEditSelected.setText("Edit Selected"); buttonEditSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELC".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonEditSelected); buttonDeleteSelected = new CFButton(); buttonDeleteSelected.setMinWidth(200); buttonDeleteSelected.setText("Delete Selected"); buttonDeleteSelected.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamRelationColObj selectedInstance = getJavaFXFocusAsRelationCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("RELC".equals(classCode)) { CFBorderPane frame = javafxSchema.getRelationColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXRelationColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamRelationColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonDeleteSelected); } return (hboxMenu); }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTZDateColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddTZDateCol = new CFButton(); buttonAddTZDateCol.setMinWidth(200); buttonAddTZDateCol.setText("Add TZDateCol"); buttonAddTZDateCol.setOnAction(new EventHandler<ActionEvent>() { @Override//from w w w. ja va2 s. co m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamTZDateColObj obj = (ICFBamTZDateColObj) schemaObj.getTZDateColTableObj() .newInstance(); ICFBamTZDateColEditObj edit = (ICFBamTZDateColEditObj) (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.getTZDateColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXTZDateColPaneCommon jpanelCommon = (ICFBamJavaFXTZDateColPaneCommon) 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(buttonAddTZDateCol); 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"); } ICFBamTZDateColObj selectedInstance = getJavaFXFocusAsTZDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DAZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZDateColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZDateColObj"); } } } 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"); } ICFBamTZDateColObj selectedInstance = getJavaFXFocusAsTZDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DAZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZDateColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXTZDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZDateColObj"); } } } 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"); } ICFBamTZDateColObj selectedInstance = getJavaFXFocusAsTZDateCol(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DAZC".equals(classCode)) { CFBorderPane frame = javafxSchema.getTZDateColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXTZDateColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamTZDateColObj"); } } } 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.CFBamJavaFXUInt16ColListPane.java
public CFHBox getPanelHBoxMenu() { if (hboxMenu == null) { hboxMenu = new CFHBox(10); buttonAddUInt16Col = new CFButton(); buttonAddUInt16Col.setMinWidth(200); buttonAddUInt16Col.setText("Add UInt16Col"); buttonAddUInt16Col.setOnAction(new EventHandler<ActionEvent>() { @Override//from ww w . j a v a 2 s . c o m public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema(); ICFBamUInt16ColObj obj = (ICFBamUInt16ColObj) schemaObj.getUInt16ColTableObj() .newInstance(); ICFBamUInt16ColEditObj edit = (ICFBamUInt16ColEditObj) (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.getUInt16ColFactory().newAddForm(cfFormManager, obj, getViewEditClosedCallback(), true); ICFBamJavaFXUInt16ColPaneCommon jpanelCommon = (ICFBamJavaFXUInt16ColPaneCommon) 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(buttonAddUInt16Col); 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"); } ICFBamUInt16ColObj selectedInstance = getJavaFXFocusAsUInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt16ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt16ColObj"); } } } 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"); } ICFBamUInt16ColObj selectedInstance = getJavaFXFocusAsUInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt16ColFactory().newViewEditForm( cfFormManager, selectedInstance, getViewEditClosedCallback(), false); ((ICFBamJavaFXUInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.Edit); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt16ColObj"); } } } 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"); } ICFBamUInt16ColObj selectedInstance = getJavaFXFocusAsUInt16Col(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("U16C".equals(classCode)) { CFBorderPane frame = javafxSchema.getUInt16ColFactory() .newAskDeleteForm(cfFormManager, selectedInstance, getDeleteCallback()); ((ICFBamJavaFXUInt16ColPaneCommon) frame).setPaneMode(CFPane.PaneMode.View); cfFormManager.pushForm(frame); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFBamUInt16ColObj"); } } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonDeleteSelected); } return (hboxMenu); }