public CFBorderPane getTabViewChildrenRefListPane() { if (tabViewChildrenRefListPane == null) { Collection<ICFDbTestTableColObj> dataCollection; ICFDbTestEnumTypeObj focus = (ICFDbTestEnumTypeObj) getJavaFXFocusAsEnumType(); if (focus != null) { dataCollection = focus.getOptionalChildrenRef(javafxIsInitializing); } else { dataCollection = null; } ICFDbTestTableObj javafxContainer; if ((focus != null) && (focus instanceof ICFDbTestTableObj)) { javafxContainer = (ICFDbTestTableObj) focus; } else { javafxContainer = null; } tabViewChildrenRefListPane = javafxSchema .getTableColFactory() .newListPane( cfFormManager, javafxContainer, null, dataCollection, new RefreshChildrenRefList(), false); } return (tabViewChildrenRefListPane); }
public CFDbTestJavaFXStringDefViewEditPane( ICFFormManager formManager, ICFDbTestJavaFXSchema argSchema, ICFDbTestStringDefObj argFocus) { 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; setJavaFXFocus(argFocus); attrPane = argSchema.getStringDefFactory().newAttrPane(cfFormManager, argFocus); attrScrollPane = new ScrollPane(); attrScrollPane.setFitToWidth(true); attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); attrScrollPane.setContent(attrPane); setOrientation(Orientation.VERTICAL); getItems().add(attrScrollPane); }
public CFDbTestJavaFXNmTokenTypeViewEditForm( ICFFormManager formManager, ICFDbTestJavaFXSchema argSchema, ICFDbTestNmTokenTypeObj argFocus, ICFFormClosedCallback closeCallback, boolean cameFromAdd) { super(); final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; formClosedCallback = closeCallback; 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; if ((argFocus != null) && (!argFocus.getIsNew())) { argFocus = (ICFDbTestNmTokenTypeObj) argFocus.read(true); javaFXFocus = argFocus; } javafxViewEditPane = argSchema.getNmTokenTypeFactory().newViewEditPane(cfFormManager, argFocus); if (cameFromAdd) { dataChanged = true; } scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getHBoxMenu()); setTop(scrollMenu); setCenter(javafxViewEditPane); }
public CFDbTestJavaFXOptFullRangeAskDeleteForm( ICFFormManager formManager, ICFDbTestJavaFXSchema argSchema, ICFDbTestOptFullRangeObj 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 OptFullRange?"); 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 { ICFDbTestOptFullRangeObj obj = getJavaFXFocusAsOptFullRange(); ICFDbTestOptFullRangeEditObj editObj = (ICFDbTestOptFullRangeEditObj) 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.getOptFullRangeFactory().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); }