public CFDbTestJavaFXNumberTypePickerPane( ICFFormManager formManager, ICFDbTestJavaFXSchema argSchema, ICFDbTestNumberTypeObj argFocus, ICFDbTestSchemaDefObj argContainer, Collection<ICFDbTestNumberTypeObj> argDataCollection, ICFDbTestJavaFXNumberTypeChosen whenChosen) { 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"); } if (whenChosen == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 6, "whenChosen"); } invokeWhenChosen = whenChosen; // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; javaFXFocus = argFocus; javafxContainer = argContainer; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFDbTestNumberTypeObj>(); tableColumnId = new TableColumn<ICFDbTestNumberTypeObj, Long>("Id"); tableColumnId.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestNumberTypeObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call(CellDataFeatures<ICFDbTestNumberTypeObj, Long> p) { ICFDbTestValueObj obj = p.getValue(); if (obj == null) { return (null); } else { long value = obj.getRequiredId(); Long wrapped = new Long(value); ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>(); observable.setValue(wrapped); return (observable); } } }); tableColumnId.setCellFactory( new Callback< TableColumn<ICFDbTestNumberTypeObj, Long>, TableCell<ICFDbTestNumberTypeObj, Long>>() { @Override public TableCell<ICFDbTestNumberTypeObj, Long> call( TableColumn<ICFDbTestNumberTypeObj, Long> arg) { return new CFInt64TableCell<ICFDbTestNumberTypeObj>(); } }); dataTable.getColumns().add(tableColumnId); tableColumnName = new TableColumn<ICFDbTestNumberTypeObj, String>("Name"); tableColumnName.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestNumberTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFDbTestNumberTypeObj, String> p) { ICFDbTestValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnName.setCellFactory( new Callback< TableColumn<ICFDbTestNumberTypeObj, String>, TableCell<ICFDbTestNumberTypeObj, String>>() { @Override public TableCell<ICFDbTestNumberTypeObj, String> call( TableColumn<ICFDbTestNumberTypeObj, String> arg) { return new CFStringTableCell<ICFDbTestNumberTypeObj>(); } }); dataTable.getColumns().add(tableColumnName); tableColumnDefaultVisibility = new TableColumn<ICFDbTestNumberTypeObj, Boolean>("DefaultVisibility"); tableColumnDefaultVisibility.setCellValueFactory( new Callback< CellDataFeatures<ICFDbTestNumberTypeObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call( CellDataFeatures<ICFDbTestNumberTypeObj, Boolean> p) { ICFDbTestValueObj obj = p.getValue(); if (obj == null) { return (null); } else { boolean value = obj.getRequiredDefaultVisibility(); Boolean wrapped = new Boolean(value); ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>(); observable.setValue(wrapped); return (observable); } } }); tableColumnDefaultVisibility.setCellFactory( new Callback< TableColumn<ICFDbTestNumberTypeObj, Boolean>, TableCell<ICFDbTestNumberTypeObj, Boolean>>() { @Override public TableCell<ICFDbTestNumberTypeObj, Boolean> call( TableColumn<ICFDbTestNumberTypeObj, Boolean> arg) { return new CFBoolTableCell<ICFDbTestNumberTypeObj>(); } }); dataTable.getColumns().add(tableColumnDefaultVisibility); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFDbTestNumberTypeObj>() { @Override public void changed( ObservableValue<? extends ICFDbTestNumberTypeObj> observable, ICFDbTestNumberTypeObj oldValue, ICFDbTestNumberTypeObj newValue) { setJavaFXFocus(newValue); if (buttonChooseSelected != null) { if (newValue != null) { buttonChooseSelected.setDisable(false); } else { buttonChooseSelected.setDisable(true); } } } }); hboxMenu = new CFHBox(10); buttonCancel = new CFButton(); buttonCancel.setMinWidth(200); buttonCancel.setText("Cancel"); buttonCancel.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonCancel); buttonChooseNone = new CFButton(); buttonChooseNone.setMinWidth(200); buttonChooseNone.setText("ChooseNone"); buttonChooseNone.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFDbTestSchemaObj schemaObj = (ICFDbTestSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } invokeWhenChosen.choseNumberType(null); cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonChooseNone); buttonChooseSelected = new CFButton(); buttonChooseSelected.setMinWidth(200); buttonChooseSelected.setText("ChooseSelected"); buttonChooseSelected.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { ICFDbTestSchemaObj schemaObj = (ICFDbTestSchemaObj) javafxSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFDbTestNumberTypeObj selectedInstance = getJavaFXFocusAsNumberType(); invokeWhenChosen.choseNumberType(selectedInstance); cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonChooseSelected); if (argFocus != null) { dataTable.getSelectionModel().select(argFocus); } setTop(hboxMenu); setCenter(dataTable); }
public CFBamJavaFXFloatDefPickerPane( ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamFloatDefObj argFocus, ICFBamScopeObj argContainer, Collection<ICFBamFloatDefObj> argDataCollection, ICFBamJavaFXFloatDefChosen whenChosen) { 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"); } if (whenChosen == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 6, "whenChosen"); } invokeWhenChosen = whenChosen; // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; javaFXFocus = argFocus; javafxContainer = argContainer; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFBamFloatDefObj>(); tableColumnObjKind = new TableColumn<ICFBamFloatDefObj, String>("Class Code"); tableColumnObjKind.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { @Override public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { String classCode = obj.getClassCode(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(classCode); return (observable); } } }); tableColumnObjKind.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnObjKind); tableColumnId = new TableColumn<ICFBamFloatDefObj, Long>("Id"); tableColumnId.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call(CellDataFeatures<ICFBamFloatDefObj, Long> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { long value = obj.getRequiredId(); Long wrapped = new Long(value); ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>(); observable.setValue(wrapped); return (observable); } } }); tableColumnId.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Long>, TableCell<ICFBamFloatDefObj, Long>>() { @Override public TableCell<ICFBamFloatDefObj, Long> call(TableColumn<ICFBamFloatDefObj, Long> arg) { return new CFInt64TableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnId); tableColumnName = new TableColumn<ICFBamFloatDefObj, String>("Name"); tableColumnName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnName.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnName); tableColumnShortName = new TableColumn<ICFBamFloatDefObj, String>("ShortName"); tableColumnShortName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalShortName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnShortName.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnShortName); tableColumnLabel = new TableColumn<ICFBamFloatDefObj, String>("Label"); tableColumnLabel.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalLabel(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnLabel.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnLabel); tableColumnShortDescription = new TableColumn<ICFBamFloatDefObj, String>("ShortDescription"); tableColumnShortDescription.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalShortDescription(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnShortDescription.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnShortDescription); tableColumnDescription = new TableColumn<ICFBamFloatDefObj, String>("Description"); tableColumnDescription.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalDescription(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnDescription.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnDescription); tableColumnIsNullable = new TableColumn<ICFBamFloatDefObj, Boolean>("IsNullable"); tableColumnIsNullable.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatDefObj, Boolean> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { boolean value = obj.getRequiredIsNullable(); Boolean wrapped = new Boolean(value); ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>(); observable.setValue(wrapped); return (observable); } } }); tableColumnIsNullable.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, Boolean>, TableCell<ICFBamFloatDefObj, Boolean>>() { @Override public TableCell<ICFBamFloatDefObj, Boolean> call( TableColumn<ICFBamFloatDefObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnIsNullable); tableColumnGenerateId = new TableColumn<ICFBamFloatDefObj, Boolean>("GenerateId"); tableColumnGenerateId.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatDefObj, Boolean> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { Boolean value = obj.getOptionalGenerateId(); ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>(); observable.setValue(value); return (observable); } } }); tableColumnGenerateId.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, Boolean>, TableCell<ICFBamFloatDefObj, Boolean>>() { @Override public TableCell<ICFBamFloatDefObj, Boolean> call( TableColumn<ICFBamFloatDefObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnGenerateId); tableColumnDataScope = new TableColumn<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum>("DataScope"); tableColumnDataScope.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum>, ObservableValue<ICFBamSchema.DataScopeEnum>>() { public ObservableValue<ICFBamSchema.DataScopeEnum> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchema.DataScopeEnum value = obj.getOptionalDataScope(); ReadOnlyObjectWrapper<ICFBamSchema.DataScopeEnum> observable = new ReadOnlyObjectWrapper<ICFBamSchema.DataScopeEnum>(); observable.setValue(value); return (observable); } } }); tableColumnDataScope.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum>, TableCell<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum> call( TableColumn<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum> arg) { return new CFEnumTableCell<ICFBamFloatDefObj, ICFBamSchema.DataScopeEnum>(); } }); dataTable.getColumns().add(tableColumnDataScope); tableColumnViewAccessSecurity = new TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>("ViewAccessSecurity"); tableColumnViewAccessSecurity.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>, ObservableValue<ICFBamSchema.AccessSecurityEnum>>() { public ObservableValue<ICFBamSchema.AccessSecurityEnum> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchema.AccessSecurityEnum value = obj.getOptionalViewAccessSecurity(); ReadOnlyObjectWrapper<ICFBamSchema.AccessSecurityEnum> observable = new ReadOnlyObjectWrapper<ICFBamSchema.AccessSecurityEnum>(); observable.setValue(value); return (observable); } } }); tableColumnViewAccessSecurity.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>, TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> call( TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> arg) { return new CFEnumTableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>(); } }); dataTable.getColumns().add(tableColumnViewAccessSecurity); tableColumnEditAccessSecurity = new TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>("EditAccessSecurity"); tableColumnEditAccessSecurity.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>, ObservableValue<ICFBamSchema.AccessSecurityEnum>>() { public ObservableValue<ICFBamSchema.AccessSecurityEnum> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchema.AccessSecurityEnum value = obj.getOptionalEditAccessSecurity(); ReadOnlyObjectWrapper<ICFBamSchema.AccessSecurityEnum> observable = new ReadOnlyObjectWrapper<ICFBamSchema.AccessSecurityEnum>(); observable.setValue(value); return (observable); } } }); tableColumnEditAccessSecurity.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>, TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> call( TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum> arg) { return new CFEnumTableCell<ICFBamFloatDefObj, ICFBamSchema.AccessSecurityEnum>(); } }); dataTable.getColumns().add(tableColumnEditAccessSecurity); tableColumnViewAccessFrequency = new TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>("ViewAccessFrequency"); tableColumnViewAccessFrequency.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>, ObservableValue<ICFBamSchema.AccessFrequencyEnum>>() { public ObservableValue<ICFBamSchema.AccessFrequencyEnum> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchema.AccessFrequencyEnum value = obj.getOptionalViewAccessFrequency(); ReadOnlyObjectWrapper<ICFBamSchema.AccessFrequencyEnum> observable = new ReadOnlyObjectWrapper<ICFBamSchema.AccessFrequencyEnum>(); observable.setValue(value); return (observable); } } }); tableColumnViewAccessFrequency.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>, TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> call( TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> arg) { return new CFEnumTableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>(); } }); dataTable.getColumns().add(tableColumnViewAccessFrequency); tableColumnEditAccessFrequency = new TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>("EditAccessFrequency"); tableColumnEditAccessFrequency.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>, ObservableValue<ICFBamSchema.AccessFrequencyEnum>>() { public ObservableValue<ICFBamSchema.AccessFrequencyEnum> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchema.AccessFrequencyEnum value = obj.getOptionalEditAccessFrequency(); ReadOnlyObjectWrapper<ICFBamSchema.AccessFrequencyEnum> observable = new ReadOnlyObjectWrapper<ICFBamSchema.AccessFrequencyEnum>(); observable.setValue(value); return (observable); } } }); tableColumnEditAccessFrequency.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>, TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> call( TableColumn<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum> arg) { return new CFEnumTableCell<ICFBamFloatDefObj, ICFBamSchema.AccessFrequencyEnum>(); } }); dataTable.getColumns().add(tableColumnEditAccessFrequency); tableColumnDefaultVisibility = new TableColumn<ICFBamFloatDefObj, Boolean>("DefaultVisibility"); tableColumnDefaultVisibility.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatDefObj, Boolean> p) { ICFBamValueObj obj = p.getValue(); if (obj == null) { return (null); } else { boolean value = obj.getRequiredDefaultVisibility(); Boolean wrapped = new Boolean(value); ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>(); observable.setValue(wrapped); return (observable); } } }); tableColumnDefaultVisibility.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, Boolean>, TableCell<ICFBamFloatDefObj, Boolean>>() { @Override public TableCell<ICFBamFloatDefObj, Boolean> call( TableColumn<ICFBamFloatDefObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnDefaultVisibility); tableColumnDbName = new TableColumn<ICFBamFloatDefObj, String>("DbName"); tableColumnDbName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatDefObj, String> p) { ICFBamAtomObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalDbName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnDbName.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, String>, TableCell<ICFBamFloatDefObj, String>>() { @Override public TableCell<ICFBamFloatDefObj, String> call( TableColumn<ICFBamFloatDefObj, String> arg) { return new CFStringTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnDbName); tableColumnInitValue = new TableColumn<ICFBamFloatDefObj, Float>("InitValue"); tableColumnInitValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalInitValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnInitValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnInitValue); tableColumnDefaultValue = new TableColumn<ICFBamFloatDefObj, Float>("DefaultValue"); tableColumnDefaultValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalDefaultValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnDefaultValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnDefaultValue); tableColumnMinValue = new TableColumn<ICFBamFloatDefObj, Float>("MinValue"); tableColumnMinValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalMinValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnMinValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnMinValue); tableColumnMaxValue = new TableColumn<ICFBamFloatDefObj, Float>("MaxValue"); tableColumnMaxValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalMaxValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnMaxValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnMaxValue); tableColumnNullValue = new TableColumn<ICFBamFloatDefObj, Float>("NullValue"); tableColumnNullValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalNullValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnNullValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnNullValue); tableColumnUnknownValue = new TableColumn<ICFBamFloatDefObj, Float>("UnknownValue"); tableColumnUnknownValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatDefObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatDefObj, Float> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { Float value = obj.getOptionalUnknownValue(); ReadOnlyObjectWrapper<Float> observable = new ReadOnlyObjectWrapper<Float>(); observable.setValue(value); return (observable); } } }); tableColumnUnknownValue.setCellFactory( new Callback<TableColumn<ICFBamFloatDefObj, Float>, TableCell<ICFBamFloatDefObj, Float>>() { @Override public TableCell<ICFBamFloatDefObj, Float> call( TableColumn<ICFBamFloatDefObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatDefObj>(); } }); dataTable.getColumns().add(tableColumnUnknownValue); tableColumnLookupDefSchema = new TableColumn<ICFBamFloatDefObj, ICFBamSchemaDefObj>("Defining Schema Definition"); tableColumnLookupDefSchema.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatDefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() { public ObservableValue<ICFBamSchemaDefObj> call( CellDataFeatures<ICFBamFloatDefObj, ICFBamSchemaDefObj> p) { ICFBamFloatDefObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema(); ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>(); observable.setValue(ref); return (observable); } } }); tableColumnLookupDefSchema.setCellFactory( new Callback< TableColumn<ICFBamFloatDefObj, ICFBamSchemaDefObj>, TableCell<ICFBamFloatDefObj, ICFBamSchemaDefObj>>() { @Override public TableCell<ICFBamFloatDefObj, ICFBamSchemaDefObj> call( TableColumn<ICFBamFloatDefObj, ICFBamSchemaDefObj> arg) { return new CFReferenceTableCell<ICFBamFloatDefObj, ICFBamSchemaDefObj>(); } }); dataTable.getColumns().add(tableColumnLookupDefSchema); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFBamFloatDefObj>() { @Override public void changed( ObservableValue<? extends ICFBamFloatDefObj> observable, ICFBamFloatDefObj oldValue, ICFBamFloatDefObj newValue) { setJavaFXFocus(newValue); if (buttonChooseSelected != null) { if (newValue != null) { buttonChooseSelected.setDisable(false); } else { buttonChooseSelected.setDisable(true); } } } }); hboxMenu = new CFHBox(10); buttonCancel = new CFButton(); buttonCancel.setMinWidth(200); buttonCancel.setText("Cancel"); buttonCancel.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { final String S_ProcName = "handle"; try { cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonCancel); buttonChooseNone = new CFButton(); buttonChooseNone.setMinWidth(200); buttonChooseNone.setText("ChooseNone"); buttonChooseNone.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"); } invokeWhenChosen.choseFloatDef(null); cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonChooseNone); buttonChooseSelected = new CFButton(); buttonChooseSelected.setMinWidth(200); buttonChooseSelected.setText("ChooseSelected"); buttonChooseSelected.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"); } ICFBamFloatDefObj selectedInstance = getJavaFXFocusAsFloatDef(); invokeWhenChosen.choseFloatDef(selectedInstance); cfFormManager.closeCurrentForm(); } catch (Throwable t) { CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t); } } }); hboxMenu.getChildren().add(buttonChooseSelected); if (argFocus != null) { dataTable.getSelectionModel().select(argFocus); } setTop(hboxMenu); setCenter(dataTable); }