public CFBamJavaFXUInt64ColAskDeleteForm( ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamUInt64ColObj argFocus, ICFDeleteCallback callback) { super(); final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; javaFXFocus = argFocus; deleteCallback = callback; // Construct the various objects textAreaMessage = new CFTextArea(); textAreaMessage.setText("Are you sure you want to delete this UInt64Col?"); hboxButtons = new CFHBox(10); buttonOk = new CFButton(); buttonOk.setMinWidth(200); buttonOk.setText("Ok"); buttonOk.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "actionOkPerformed"; try { ICFBamUInt64ColObj obj = getJavaFXFocusAsUInt64Col(); ICFBamUInt64ColEditObj editObj = (ICFBamUInt64ColEditObj) obj.beginEdit(); editObj.delete(); editObj.endEdit(); cfFormManager.closeCurrentForm(); if (deleteCallback != null) { deleteCallback.formClosed(null); deleteCallback.deleted(obj); } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); buttonCancel = new CFButton(); buttonCancel.setMinWidth(200); buttonCancel.setText("Cancel"); buttonCancel.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "actionCancelPerformed"; try { cfFormManager.closeCurrentForm(); if (deleteCallback != null) { deleteCallback.formClosed(null); } } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxButtons.getChildren().addAll(buttonOk, buttonCancel); attrPane = argSchema.getUInt64ColFactory().newAttrPane(cfFormManager, argFocus); scrollPane = new ScrollPane(); scrollPane.setFitToWidth(true); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setContent(attrPane); setTop(textAreaMessage); setCenter(scrollPane); setBottom(hboxButtons); }