@Override public void start(Stage stage) throws Exception { stage.setTitle("Script Creator"); // Center events = new VBox(); eventsScrollPane = new ScrollPane(); eventsScrollPane.setVbarPolicy(ScrollBarPolicy.ALWAYS); eventsScrollPane.setContent(events); // Left VBox left = new VBox(); Button record = new Button("Record"), add = new Button("Add"); CheckBox recordWheel = new CheckBox("Wheel"), recordMouseMovements = new CheckBox("Movement"), recordTime = new CheckBox("Time"); add.setOnAction(e -> events.getChildren().add(new EditableLabel())); left.getChildren().addAll(add, record, recordWheel, recordTime, recordMouseMovements); // Bottom // Container BorderPane mainLayout = new BorderPane(); mainLayout.setCenter(eventsScrollPane); mainLayout.setLeft(left); main = new Scene(mainLayout, 300, 250); stage.setScene(main); stage.show(); }
public CFBamJavaFXUInt32TypeAddPane( ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamUInt32TypeObj 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.getUInt32TypeFactory().newAttrPane(cfFormManager, argFocus); attrScrollPane = new ScrollPane(attrPane); attrScrollPane.setFitToWidth(true); attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); attrScrollPane.setContent(attrPane); setOrientation(Orientation.VERTICAL); getItems().add(attrScrollPane); }
public void displayPane() throws IOException { addStationsToCB(); paneTop.getColumnConstraints().add(new ColumnConstraints(60)); paneTop.getColumnConstraints().add(new ColumnConstraints(200)); paneTop.getColumnConstraints().add(new ColumnConstraints(100)); paneBot.getColumnConstraints().add(new ColumnConstraints(60)); paneBot.getColumnConstraints().add(new ColumnConstraints(200)); paneBot.getColumnConstraints().add(new ColumnConstraints(100)); paneCenter.getColumnConstraints().add(new ColumnConstraints(300)); paneTop.setPadding(new Insets(10, 10, 10, 10)); paneTop.setAlignment(Pos.CENTER); paneTop.setHgap(5); paneTop.setVgap(5); paneBot.setPadding(new Insets(10, 10, 10, 10)); paneBot.setAlignment(Pos.CENTER); paneBot.setHgap(5); paneBot.setVgap(5); paneTop.add(new Label("Station :"), 0, 0); paneTop.add(cbStations, 1, 0); paneTop.add(btOpen, 2, 0); paneBot.add(new Label("Quantity :"), 0, 0); paneBot.add(cbQuantity, 1, 0); paneBot.add(btShow, 2, 0); paneTop.setHalignment(btOpen, HPos.RIGHT); paneBot.setHalignment(btShow, HPos.RIGHT); paneCenter.setHgap(5); paneCenter.setVgap(5); paneCenter.setAlignment(Pos.CENTER); sp.setContent(paneCenter); sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS); bp.setMargin(sp, new Insets(20, 50, 40, 50)); bp.setTop(paneTop); bp.setCenter(sp); bp.setBottom(paneBot); btOpen.setOnAction( e -> { try { open(); } catch (IOException er) { er.printStackTrace(); } }); btShow.setOnAction(e -> showGraph()); }
@Override public VetoableObjectSelectionView<HeroTemplate> addObjectSelectionList() { ListSelectionView<HeroTemplate> view = new ListSelectionView<>(); ScrollPane scrollPane = new ScrollPane(); scrollPane.setHbarPolicy(NEVER); scrollPane.setVbarPolicy(AS_NEEDED); scrollPane.setContent(view.getNode()); component.add(scrollPane, new CC().grow().push()); return view; }
public ReceiptDisplay() { mScrollPane = new ScrollPane(); mScrollPane.setStyle( "-fx-border-color:gray;-fx-border-width:25;" + "-fx-background-color:gray;"); mScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); mScrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); mImage = new Image("foggitops/resources/DefaultPic.jpg"); mImageView = new ImageView(); fitToScreen(); mScrollPane.setContent(mImageView); }
public void addImageTab(Path imagePath) { TabPane previewTabPane = controller.getPreviewTabPane(); ImageTab tab = new ImageTab(); tab.setPath(imagePath); tab.setText(imagePath.getFileName().toString()); if (previewTabPane.getTabs().contains(tab)) { previewTabPane.getSelectionModel().select(tab); return; } Image image = new Image(IOHelper.pathToUrl(imagePath)); ImageView imageView = new ImageView(image); imageView.setPreserveRatio(true); imageView.setFitWidth(previewTabPane.getWidth()); previewTabPane .widthProperty() .addListener( (observable, oldValue, newValue) -> { imageView.setFitWidth(previewTabPane.getWidth()); }); Tooltip tip = new Tooltip(imagePath.toString()); Tooltip.install(tab.getGraphic(), tip); ScrollPane scrollPane = new ScrollPane(); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); scrollPane.setContent(imageView); scrollPane.addEventFilter( ScrollEvent.SCROLL, e -> { if (e.isControlDown() && e.getDeltaY() > 0) { // zoom in imageView.setFitWidth(imageView.getFitWidth() + 16.0); } else if (e.isControlDown() && e.getDeltaY() < 0) { // zoom out imageView.setFitWidth(imageView.getFitWidth() - 16.0); } }); tab.setContent(scrollPane); TabPane tabPane = previewTabPane; tabPane.getTabs().add(tab); tabPane.getSelectionModel().select(tab); }
/** Creates the album playback view. */ private void display() { scrollPos = 0; songScroller = new ScrollPane(); songScroller.setMinWidth(PaneUtil.WIDTH - GoogleUINaviController.COVER_SIZE - 10); songScroller.setStyle("-fx-background-color:transparent;"); songScroller.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); songBox = new VBox(6); songBox.setPadding(new Insets(3, 2, 2, 2)); int track = 1; for (Song song : album.getSongs()) { HBox trackBox = new HBox(); trackBox.setId(String.valueOf(song.getMID())); trackBox.setAlignment(Pos.BASELINE_LEFT); trackBox.setPadding(new Insets(2, 5, 2, 5)); if (track == 1) { trackBox.setStyle(STYLE_ACTIVE); lastSongSelection = trackBox; } else { trackBox.setStyle(STYLE_INACTIVE); } BorderPane innerTrackBox = new BorderPane(); HBox posBox = new HBox(5); posBox.setMinWidth(40); posBox.getChildren().add(createTrackText(track + ".")); innerTrackBox.setLeft(posBox); HBox nameBox = new HBox(5); nameBox.setMinWidth(385); String name = song.getName(); if (name.endsWith(".mp3")) { name = name.substring(0, name.length() - 4); } nameBox.getChildren().add(createTrackText(" " + name)); innerTrackBox.setCenter(nameBox); innerTrackBox.setRight(createTrackText(song.getDuration())); trackBox.getChildren().add(innerTrackBox); songBox.getChildren().add(trackBox); track++; } songScroller.setOpacity(0); songScroller.setContent(songBox); albumNode.getChildren().add(songScroller); }
protected PastCommandsAbstract( GUIManager guiManager, Scene scene, ResourceBundle resource, String label) { myScene = scene; myResource = resource; myGuiManager = guiManager; addLabel(label); myScroller.setPrefHeight(scene.getHeight() * 4 / 5); myScroller.setContent(myVbox); myScroller.setVbarPolicy(ScrollBarPolicy.ALWAYS); myScroller.setHbarPolicy(ScrollBarPolicy.ALWAYS); setPrefWidth(scene.getWidth() / 7); getChildren().add(myScroller); getChildren().add(myVbox); }
private static void showAdvancedSearch(Application app) { WorkbenchView view = new WorkbenchView(); FormLayout formLayout = new FormLayout(); formLayout.addHeader("Advanced Search"); formLayout.addField("Name"); formLayout.addActions(new Action("Save"), new Action("Cancel")); ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(formLayout); scrollPane.setFitToWidth(true); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); view.setCenterNode(scrollPane); app.setWorkbench(view); app.clearGlobalActions(); }
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 EventPopoverPage(final DataService dataService, final Event event, boolean showBack) { this.showBack = showBack; getStyleClass().add("event-popover-page"); final Session session = event.getSession(); scrollPane = new ScrollPane(); scrollPane.setFitToWidth(true); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); content = session == null ? new EventContent(event, dataService) : new SessionContent(session, event, dataService); scrollPane.setContent(content); getChildren().add(scrollPane); if (CHECK_AVAIL_TASK != null) { CHECK_AVAIL_TASK.cancel(); } if (!ConferenceScheduleApp.getInstance().getSessionManagement().isGuestProperty().get() && content instanceof SessionContent) { CHECK_AVAIL_TASK = dataService.checkAvailability(event); CHECK_AVAIL_TASK.setOnSucceeded( new EventHandler<WorkerStateEvent>() { @Override public void handle(WorkerStateEvent event) { final SessionContent sc = (SessionContent) content; final Availability avail = CHECK_AVAIL_TASK.getValue(); if (!sc.fav) { sc.button.setText(avail.full ? "Session Full" : "Register"); full.set(avail.full); } } }); FILTER_EXECUTOR.submit(CHECK_AVAIL_TASK); } }
public CFBamJavaFXServerMethodAddForm( ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamServerMethodObj argFocus, ICFFormClosedCallback closeCallback, boolean argAllowSave) { super(); final String S_ProcName = "construct-schema-focus"; allowSave = argAllowSave; 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 = (ICFBamServerMethodObj) argFocus.read(true); javaFXFocus = argFocus; } javafxAddPane = argSchema.getServerMethodFactory().newAddPane(cfFormManager, argFocus); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getHBoxMenu()); setTop(scrollMenu); setCenter(javafxAddPane); }
private void initDialog() { dialog.initOwner(mainApp.getPrimaryStage()); dialog.initModality(Modality.APPLICATION_MODAL); dialog.initStyle(StageStyle.DECORATED); dialog.setResizable(true); dialog.setTitle("Recordings Already Exist"); dialog.setHeaderText("Replace or rename recordings?"); dialog.getDialogPane().setPadding(new Insets(10)); VBox vbox = new VBox(); vbox.setSpacing(10); dialog.getDialogPane().setContent(vbox); Label label = new Label( "Archiving the following recordings will replace files on your computer unless you rename them:"); vbox.getChildren().add(label); VBox recordingBox = new VBox(); recordingBox.setSpacing(20); for (Recording recording : recordingsToDisplay) { recording.setFileExistsAction(Recording.FileExistsAction.REPLACE); recordingBox.getChildren().add(buildRecordingGrid(recording)); } ScrollPane scrollPane = new ScrollPane(); scrollPane.getStyleClass().add("recording-exists-list"); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); scrollPane.setFitToWidth(true); scrollPane.setFitToHeight(true); scrollPane.setContent(recordingBox); scrollPane.setPadding(new Insets(10)); vbox.getChildren().add(scrollPane); dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL); }
private static void showCustomizeResults(Application app) { WorkbenchView view = new WorkbenchView(); FormLayout formLayout = new FormLayout(); formLayout.addHeader("Customize Results"); formLayout.addField("Return related associations", EditorType.CHECKBOX); formLayout.addField("Return concurrent observations", EditorType.CHECKBOX); formLayout.addField("Return concept hierarchy", EditorType.CHECKBOX); formLayout.addField("Return basic organism phylogeny", EditorType.CHECKBOX); formLayout.addField("Return detailed organism phylogeny", EditorType.CHECKBOX); formLayout.addField("Categorize associations into columns", EditorType.CHECKBOX); ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(formLayout); scrollPane.setFitToWidth(true); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); view.setCenterNode(scrollPane); app.setWorkbench(view); app.clearGlobalActions(); }
public CFAccJavaFXFeeListPane( ICFFormManager formManager, ICFAccJavaFXSchema argSchema, ICFAccAccountObj argContainer, ICFAccFeeObj argFocus, Collection<ICFAccFeeObj> argDataCollection, ICFRefreshCallback refreshCallback, boolean sortByChain) { 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; javafxContainer = argContainer; javafxRefreshCallback = refreshCallback; javafxSortByChain = sortByChain; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFAccFeeObj>(); tableColumnFeeId = new TableColumn<ICFAccFeeObj, Long>("FeeId"); tableColumnFeeId.setCellValueFactory( new Callback<CellDataFeatures<ICFAccFeeObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call(CellDataFeatures<ICFAccFeeObj, Long> p) { ICFAccFeeObj obj = p.getValue(); if (obj == null) { return (null); } else { long value = obj.getRequiredFeeId(); Long wrapped = new Long(value); ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>(); observable.setValue(wrapped); return (observable); } } }); tableColumnFeeId.setCellFactory( new Callback<TableColumn<ICFAccFeeObj, Long>, TableCell<ICFAccFeeObj, Long>>() { @Override public TableCell<ICFAccFeeObj, Long> call(TableColumn<ICFAccFeeObj, Long> arg) { return new CFInt64TableCell<ICFAccFeeObj>(); } }); dataTable.getColumns().add(tableColumnFeeId); tableColumnFeeDate = new TableColumn<ICFAccFeeObj, Calendar>("FeeDate"); tableColumnFeeDate.setCellValueFactory( new Callback<CellDataFeatures<ICFAccFeeObj, Calendar>, ObservableValue<Calendar>>() { public ObservableValue<Calendar> call(CellDataFeatures<ICFAccFeeObj, Calendar> p) { ICFAccFeeObj obj = p.getValue(); if (obj == null) { return (null); } else { Calendar value = obj.getRequiredFeeDate(); ReadOnlyObjectWrapper<Calendar> observable = new ReadOnlyObjectWrapper<Calendar>(); observable.setValue(value); return (observable); } } }); tableColumnFeeDate.setCellFactory( new Callback<TableColumn<ICFAccFeeObj, Calendar>, TableCell<ICFAccFeeObj, Calendar>>() { @Override public TableCell<ICFAccFeeObj, Calendar> call(TableColumn<ICFAccFeeObj, Calendar> arg) { return new CFDateTableCell<ICFAccFeeObj>(); } }); dataTable.getColumns().add(tableColumnFeeDate); tableColumnDescription = new TableColumn<ICFAccFeeObj, String>("Description"); tableColumnDescription.setCellValueFactory( new Callback<CellDataFeatures<ICFAccFeeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFAccFeeObj, String> p) { ICFAccFeeObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredDescription(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnDescription.setCellFactory( new Callback<TableColumn<ICFAccFeeObj, String>, TableCell<ICFAccFeeObj, String>>() { @Override public TableCell<ICFAccFeeObj, String> call(TableColumn<ICFAccFeeObj, String> arg) { return new CFStringTableCell<ICFAccFeeObj>(); } }); dataTable.getColumns().add(tableColumnDescription); tableColumnAmount = new TableColumn<ICFAccFeeObj, BigDecimal>("Amount"); tableColumnAmount.setCellValueFactory( new Callback<CellDataFeatures<ICFAccFeeObj, BigDecimal>, ObservableValue<BigDecimal>>() { public ObservableValue<BigDecimal> call(CellDataFeatures<ICFAccFeeObj, BigDecimal> p) { ICFAccFeeObj obj = p.getValue(); if (obj == null) { return (null); } else { BigDecimal value = obj.getOptionalAmount(); ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>(); observable.setValue(value); return (observable); } } }); tableColumnAmount.setCellFactory( new Callback<TableColumn<ICFAccFeeObj, BigDecimal>, TableCell<ICFAccFeeObj, BigDecimal>>() { @Override public TableCell<ICFAccFeeObj, BigDecimal> call( TableColumn<ICFAccFeeObj, BigDecimal> arg) { return new CFNumberTableCell<ICFAccFeeObj>(50, 5); } }); dataTable.getColumns().add(tableColumnAmount); tableColumnLookupLedger = new TableColumn<ICFAccFeeObj, ICFAccLedgerObj>("Fee Ledger Entry"); tableColumnLookupLedger.setCellValueFactory( new Callback< CellDataFeatures<ICFAccFeeObj, ICFAccLedgerObj>, ObservableValue<ICFAccLedgerObj>>() { public ObservableValue<ICFAccLedgerObj> call( CellDataFeatures<ICFAccFeeObj, ICFAccLedgerObj> p) { ICFAccFeeObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFAccLedgerObj ref = obj.getOptionalLookupLedger(); ReadOnlyObjectWrapper<ICFAccLedgerObj> observable = new ReadOnlyObjectWrapper<ICFAccLedgerObj>(); observable.setValue(ref); return (observable); } } }); tableColumnLookupLedger.setCellFactory( new Callback< TableColumn<ICFAccFeeObj, ICFAccLedgerObj>, TableCell<ICFAccFeeObj, ICFAccLedgerObj>>() { @Override public TableCell<ICFAccFeeObj, ICFAccLedgerObj> call( TableColumn<ICFAccFeeObj, ICFAccLedgerObj> arg) { return new CFReferenceTableCell<ICFAccFeeObj, ICFAccLedgerObj>(); } }); dataTable.getColumns().add(tableColumnLookupLedger); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFAccFeeObj>() { @Override public void changed( ObservableValue<? extends ICFAccFeeObj> observable, ICFAccFeeObj oldValue, ICFAccFeeObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getPanelHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); javafxIsInitializing = false; if (observableListOfFee != null) { dataTable.setItems(observableListOfFee); } adjustListButtons(); }
public CFBamJavaFXFloatTypeListPane( ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamSchemaDefObj argContainer, ICFBamFloatTypeObj argFocus, Collection<ICFBamFloatTypeObj> argDataCollection, ICFRefreshCallback refreshCallback, boolean sortByChain) { 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; javafxContainer = argContainer; javafxRefreshCallback = refreshCallback; javafxSortByChain = sortByChain; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFBamFloatTypeObj>(); tableColumnId = new TableColumn<ICFBamFloatTypeObj, Long>("Id"); tableColumnId.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Long>, TableCell<ICFBamFloatTypeObj, Long>>() { @Override public TableCell<ICFBamFloatTypeObj, Long> call( TableColumn<ICFBamFloatTypeObj, Long> arg) { return new CFInt64TableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnId); tableColumnName = new TableColumn<ICFBamFloatTypeObj, String>("Name"); tableColumnName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnName); tableColumnShortName = new TableColumn<ICFBamFloatTypeObj, String>("ShortName"); tableColumnShortName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnShortName); tableColumnLabel = new TableColumn<ICFBamFloatTypeObj, String>("Label"); tableColumnLabel.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnLabel); tableColumnShortDescription = new TableColumn<ICFBamFloatTypeObj, String>("ShortDescription"); tableColumnShortDescription.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnShortDescription); tableColumnDescription = new TableColumn<ICFBamFloatTypeObj, String>("Description"); tableColumnDescription.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnDescription); tableColumnIsNullable = new TableColumn<ICFBamFloatTypeObj, Boolean>("IsNullable"); tableColumnIsNullable.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Boolean>, TableCell<ICFBamFloatTypeObj, Boolean>>() { @Override public TableCell<ICFBamFloatTypeObj, Boolean> call( TableColumn<ICFBamFloatTypeObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnIsNullable); tableColumnGenerateId = new TableColumn<ICFBamFloatTypeObj, Boolean>("GenerateId"); tableColumnGenerateId.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Boolean>, TableCell<ICFBamFloatTypeObj, Boolean>>() { @Override public TableCell<ICFBamFloatTypeObj, Boolean> call( TableColumn<ICFBamFloatTypeObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnGenerateId); tableColumnDataScope = new TableColumn<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum>("DataScope"); tableColumnDataScope.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum>, ObservableValue<ICFBamSchema.DataScopeEnum>>() { public ObservableValue<ICFBamSchema.DataScopeEnum> call( CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum>, TableCell<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum> arg) { return new CFEnumTableCell<ICFBamFloatTypeObj, ICFBamSchema.DataScopeEnum>(); } }); dataTable.getColumns().add(tableColumnDataScope); tableColumnViewAccessSecurity = new TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>("ViewAccessSecurity"); tableColumnViewAccessSecurity.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>, ObservableValue<ICFBamSchema.AccessSecurityEnum>>() { public ObservableValue<ICFBamSchema.AccessSecurityEnum> call( CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>, TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum> arg) { return new CFEnumTableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>(); } }); dataTable.getColumns().add(tableColumnViewAccessSecurity); tableColumnEditAccessSecurity = new TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>("EditAccessSecurity"); tableColumnEditAccessSecurity.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>, ObservableValue<ICFBamSchema.AccessSecurityEnum>>() { public ObservableValue<ICFBamSchema.AccessSecurityEnum> call( CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>, TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum> arg) { return new CFEnumTableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessSecurityEnum>(); } }); dataTable.getColumns().add(tableColumnEditAccessSecurity); tableColumnViewAccessFrequency = new TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>( "ViewAccessFrequency"); tableColumnViewAccessFrequency.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>, ObservableValue<ICFBamSchema.AccessFrequencyEnum>>() { public ObservableValue<ICFBamSchema.AccessFrequencyEnum> call( CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>, TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum> arg) { return new CFEnumTableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>(); } }); dataTable.getColumns().add(tableColumnViewAccessFrequency); tableColumnEditAccessFrequency = new TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>( "EditAccessFrequency"); tableColumnEditAccessFrequency.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>, ObservableValue<ICFBamSchema.AccessFrequencyEnum>>() { public ObservableValue<ICFBamSchema.AccessFrequencyEnum> call( CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>, TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum> arg) { return new CFEnumTableCell<ICFBamFloatTypeObj, ICFBamSchema.AccessFrequencyEnum>(); } }); dataTable.getColumns().add(tableColumnEditAccessFrequency); tableColumnDefaultVisibility = new TableColumn<ICFBamFloatTypeObj, Boolean>("DefaultVisibility"); tableColumnDefaultVisibility.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Boolean>, TableCell<ICFBamFloatTypeObj, Boolean>>() { @Override public TableCell<ICFBamFloatTypeObj, Boolean> call( TableColumn<ICFBamFloatTypeObj, Boolean> arg) { return new CFBoolTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnDefaultVisibility); tableColumnDbName = new TableColumn<ICFBamFloatTypeObj, String>("DbName"); tableColumnDbName.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, String>, TableCell<ICFBamFloatTypeObj, String>>() { @Override public TableCell<ICFBamFloatTypeObj, String> call( TableColumn<ICFBamFloatTypeObj, String> arg) { return new CFStringTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnDbName); tableColumnInitValue = new TableColumn<ICFBamFloatTypeObj, Float>("InitValue"); tableColumnInitValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnInitValue); tableColumnDefaultValue = new TableColumn<ICFBamFloatTypeObj, Float>("DefaultValue"); tableColumnDefaultValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnDefaultValue); tableColumnMinValue = new TableColumn<ICFBamFloatTypeObj, Float>("MinValue"); tableColumnMinValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnMinValue); tableColumnMaxValue = new TableColumn<ICFBamFloatTypeObj, Float>("MaxValue"); tableColumnMaxValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnMaxValue); tableColumnNullValue = new TableColumn<ICFBamFloatTypeObj, Float>("NullValue"); tableColumnNullValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnNullValue); tableColumnUnknownValue = new TableColumn<ICFBamFloatTypeObj, Float>("UnknownValue"); tableColumnUnknownValue.setCellValueFactory( new Callback<CellDataFeatures<ICFBamFloatTypeObj, Float>, ObservableValue<Float>>() { public ObservableValue<Float> call(CellDataFeatures<ICFBamFloatTypeObj, 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<ICFBamFloatTypeObj, Float>, TableCell<ICFBamFloatTypeObj, Float>>() { @Override public TableCell<ICFBamFloatTypeObj, Float> call( TableColumn<ICFBamFloatTypeObj, Float> arg) { return new CFFloatTableCell<ICFBamFloatTypeObj>(); } }); dataTable.getColumns().add(tableColumnUnknownValue); tableColumnLookupDefSchema = new TableColumn<ICFBamFloatTypeObj, ICFBamSchemaDefObj>("Defining Schema Definition"); tableColumnLookupDefSchema.setCellValueFactory( new Callback< CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() { public ObservableValue<ICFBamSchemaDefObj> call( CellDataFeatures<ICFBamFloatTypeObj, ICFBamSchemaDefObj> p) { ICFBamFloatTypeObj 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<ICFBamFloatTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamFloatTypeObj, ICFBamSchemaDefObj>>() { @Override public TableCell<ICFBamFloatTypeObj, ICFBamSchemaDefObj> call( TableColumn<ICFBamFloatTypeObj, ICFBamSchemaDefObj> arg) { return new CFReferenceTableCell<ICFBamFloatTypeObj, ICFBamSchemaDefObj>(); } }); dataTable.getColumns().add(tableColumnLookupDefSchema); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFBamFloatTypeObj>() { @Override public void changed( ObservableValue<? extends ICFBamFloatTypeObj> observable, ICFBamFloatTypeObj oldValue, ICFBamFloatTypeObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getPanelHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); javafxIsInitializing = false; if (observableListOfFloatType != null) { dataTable.setItems(observableListOfFloatType); } adjustListButtons(); }
public CFSecurityJavaFXSysClusterFinderForm( ICFFormManager formManager, ICFSecurityJavaFXSchema argSchema) { 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"); } javafxSchema = argSchema; dataTable = new TableView<ICFSecuritySysClusterObj>(); tableColumnSingletonId = new TableColumn<ICFSecuritySysClusterObj, Integer>("Singleton"); tableColumnSingletonId.setCellValueFactory( new Callback< CellDataFeatures<ICFSecuritySysClusterObj, Integer>, ObservableValue<Integer>>() { public ObservableValue<Integer> call( CellDataFeatures<ICFSecuritySysClusterObj, Integer> p) { ICFSecuritySysClusterObj obj = p.getValue(); if (obj == null) { return (null); } else { int value = obj.getRequiredSingletonId(); Integer wrapped = new Integer(value); ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>(); observable.setValue(wrapped); return (observable); } } }); tableColumnSingletonId.setCellFactory( new Callback< TableColumn<ICFSecuritySysClusterObj, Integer>, TableCell<ICFSecuritySysClusterObj, Integer>>() { @Override public TableCell<ICFSecuritySysClusterObj, Integer> call( TableColumn<ICFSecuritySysClusterObj, Integer> arg) { return new CFInt32TableCell<ICFSecuritySysClusterObj>(); } }); dataTable.getColumns().add(tableColumnSingletonId); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFSecuritySysClusterObj>() { @Override public void changed( ObservableValue<? extends ICFSecuritySysClusterObj> observable, ICFSecuritySysClusterObj oldValue, ICFSecuritySysClusterObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); refreshMe(); javafxIsInitializing = false; adjustFinderButtons(); }
public CFSecurityJavaFXISOTimezoneListPane( ICFFormManager formManager, ICFSecurityJavaFXSchema argSchema, ICFLibAnyObj argContainer, ICFSecurityISOTimezoneObj argFocus, Collection<ICFSecurityISOTimezoneObj> argDataCollection, ICFRefreshCallback refreshCallback, boolean sortByChain) { 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; javafxContainer = argContainer; javafxRefreshCallback = refreshCallback; javafxSortByChain = sortByChain; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFSecurityISOTimezoneObj>(); tableColumnISOTimezoneId = new TableColumn<ICFSecurityISOTimezoneObj, Short>("ISO Timezone Id"); tableColumnISOTimezoneId.setCellValueFactory( new Callback<CellDataFeatures<ICFSecurityISOTimezoneObj, Short>, ObservableValue<Short>>() { public ObservableValue<Short> call(CellDataFeatures<ICFSecurityISOTimezoneObj, Short> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { short value = obj.getRequiredISOTimezoneId(); Short wrapped = new Short(value); ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>(); observable.setValue(wrapped); return (observable); } } }); tableColumnISOTimezoneId.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, Short>, TableCell<ICFSecurityISOTimezoneObj, Short>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, Short> call( TableColumn<ICFSecurityISOTimezoneObj, Short> arg) { return new CFInt16TableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnISOTimezoneId); tableColumnIso8601 = new TableColumn<ICFSecurityISOTimezoneObj, String>("ISO8601"); tableColumnIso8601.setCellValueFactory( new Callback< CellDataFeatures<ICFSecurityISOTimezoneObj, String>, ObservableValue<String>>() { public ObservableValue<String> call( CellDataFeatures<ICFSecurityISOTimezoneObj, String> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredIso8601(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnIso8601.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, String>, TableCell<ICFSecurityISOTimezoneObj, String>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, String> call( TableColumn<ICFSecurityISOTimezoneObj, String> arg) { return new CFStringTableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnIso8601); tableColumnTZName = new TableColumn<ICFSecurityISOTimezoneObj, String>("Timezone Name"); tableColumnTZName.setCellValueFactory( new Callback< CellDataFeatures<ICFSecurityISOTimezoneObj, String>, ObservableValue<String>>() { public ObservableValue<String> call( CellDataFeatures<ICFSecurityISOTimezoneObj, String> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredTZName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnTZName.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, String>, TableCell<ICFSecurityISOTimezoneObj, String>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, String> call( TableColumn<ICFSecurityISOTimezoneObj, String> arg) { return new CFStringTableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnTZName); tableColumnTZHourOffset = new TableColumn<ICFSecurityISOTimezoneObj, Short>("Timezone Hour Offset"); tableColumnTZHourOffset.setCellValueFactory( new Callback<CellDataFeatures<ICFSecurityISOTimezoneObj, Short>, ObservableValue<Short>>() { public ObservableValue<Short> call(CellDataFeatures<ICFSecurityISOTimezoneObj, Short> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { short value = obj.getRequiredTZHourOffset(); Short wrapped = new Short(value); ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>(); observable.setValue(wrapped); return (observable); } } }); tableColumnTZHourOffset.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, Short>, TableCell<ICFSecurityISOTimezoneObj, Short>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, Short> call( TableColumn<ICFSecurityISOTimezoneObj, Short> arg) { return new CFInt16TableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnTZHourOffset); tableColumnTZMinOffset = new TableColumn<ICFSecurityISOTimezoneObj, Short>("Timezone Minute Offset"); tableColumnTZMinOffset.setCellValueFactory( new Callback<CellDataFeatures<ICFSecurityISOTimezoneObj, Short>, ObservableValue<Short>>() { public ObservableValue<Short> call(CellDataFeatures<ICFSecurityISOTimezoneObj, Short> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { short value = obj.getRequiredTZMinOffset(); Short wrapped = new Short(value); ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>(); observable.setValue(wrapped); return (observable); } } }); tableColumnTZMinOffset.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, Short>, TableCell<ICFSecurityISOTimezoneObj, Short>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, Short> call( TableColumn<ICFSecurityISOTimezoneObj, Short> arg) { return new CFInt16TableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnTZMinOffset); tableColumnDescription = new TableColumn<ICFSecurityISOTimezoneObj, String>("Description"); tableColumnDescription.setCellValueFactory( new Callback< CellDataFeatures<ICFSecurityISOTimezoneObj, String>, ObservableValue<String>>() { public ObservableValue<String> call( CellDataFeatures<ICFSecurityISOTimezoneObj, String> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredDescription(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnDescription.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, String>, TableCell<ICFSecurityISOTimezoneObj, String>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, String> call( TableColumn<ICFSecurityISOTimezoneObj, String> arg) { return new CFStringTableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnDescription); tableColumnVisible = new TableColumn<ICFSecurityISOTimezoneObj, Boolean>("Visible"); tableColumnVisible.setCellValueFactory( new Callback< CellDataFeatures<ICFSecurityISOTimezoneObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call( CellDataFeatures<ICFSecurityISOTimezoneObj, Boolean> p) { ICFSecurityISOTimezoneObj obj = p.getValue(); if (obj == null) { return (null); } else { boolean value = obj.getRequiredVisible(); Boolean wrapped = new Boolean(value); ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>(); observable.setValue(wrapped); return (observable); } } }); tableColumnVisible.setCellFactory( new Callback< TableColumn<ICFSecurityISOTimezoneObj, Boolean>, TableCell<ICFSecurityISOTimezoneObj, Boolean>>() { @Override public TableCell<ICFSecurityISOTimezoneObj, Boolean> call( TableColumn<ICFSecurityISOTimezoneObj, Boolean> arg) { return new CFBoolTableCell<ICFSecurityISOTimezoneObj>(); } }); dataTable.getColumns().add(tableColumnVisible); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFSecurityISOTimezoneObj>() { @Override public void changed( ObservableValue<? extends ICFSecurityISOTimezoneObj> observable, ICFSecurityISOTimezoneObj oldValue, ICFSecurityISOTimezoneObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getPanelHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); javafxIsInitializing = false; if (observableListOfISOTimezone != null) { dataTable.setItems(observableListOfISOTimezone); } adjustListButtons(); }
public CFAsteriskJavaFXExtensionsConfFinderForm( ICFFormManager formManager, ICFAsteriskJavaFXSchema argSchema) { 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"); } javafxSchema = argSchema; dataTable = new TableView<ICFAsteriskExtensionsConfObj>(); tableColumnId = new TableColumn<ICFAsteriskExtensionsConfObj, Long>("Id"); tableColumnId.setCellValueFactory( new Callback< CellDataFeatures<ICFAsteriskExtensionsConfObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call( CellDataFeatures<ICFAsteriskExtensionsConfObj, Long> p) { ICFAsteriskConfigurationFileObj 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<ICFAsteriskExtensionsConfObj, Long>, TableCell<ICFAsteriskExtensionsConfObj, Long>>() { @Override public TableCell<ICFAsteriskExtensionsConfObj, Long> call( TableColumn<ICFAsteriskExtensionsConfObj, Long> arg) { return new CFInt64TableCell<ICFAsteriskExtensionsConfObj>(); } }); dataTable.getColumns().add(tableColumnId); tableColumnFileFullName = new TableColumn<ICFAsteriskExtensionsConfObj, String>("FileFullName"); tableColumnFileFullName.setCellValueFactory( new Callback< CellDataFeatures<ICFAsteriskExtensionsConfObj, String>, ObservableValue<String>>() { public ObservableValue<String> call( CellDataFeatures<ICFAsteriskExtensionsConfObj, String> p) { ICFAsteriskConfigurationFileObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredFileFullName(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnFileFullName.setCellFactory( new Callback< TableColumn<ICFAsteriskExtensionsConfObj, String>, TableCell<ICFAsteriskExtensionsConfObj, String>>() { @Override public TableCell<ICFAsteriskExtensionsConfObj, String> call( TableColumn<ICFAsteriskExtensionsConfObj, String> arg) { return new CFStringTableCell<ICFAsteriskExtensionsConfObj>(); } }); dataTable.getColumns().add(tableColumnFileFullName); tableColumnFileContents = new TableColumn<ICFAsteriskExtensionsConfObj, String>("FileContents"); tableColumnFileContents.setCellValueFactory( new Callback< CellDataFeatures<ICFAsteriskExtensionsConfObj, String>, ObservableValue<String>>() { public ObservableValue<String> call( CellDataFeatures<ICFAsteriskExtensionsConfObj, String> p) { ICFAsteriskExtensionsConfObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getRequiredFileContents(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnFileContents.setCellFactory( new Callback< TableColumn<ICFAsteriskExtensionsConfObj, String>, TableCell<ICFAsteriskExtensionsConfObj, String>>() { @Override public TableCell<ICFAsteriskExtensionsConfObj, String> call( TableColumn<ICFAsteriskExtensionsConfObj, String> arg) { return new CFTextTableCell<ICFAsteriskExtensionsConfObj>(); } }); dataTable.getColumns().add(tableColumnFileContents); tableColumnParentHostNode = new TableColumn<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj>("Host Node"); tableColumnParentHostNode.setCellValueFactory( new Callback< CellDataFeatures<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj>, ObservableValue<ICFSecurityHostNodeObj>>() { public ObservableValue<ICFSecurityHostNodeObj> call( CellDataFeatures<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj> p) { ICFAsteriskExtensionsConfObj obj = p.getValue(); if (obj == null) { return (null); } else { ICFSecurityHostNodeObj ref = obj.getRequiredParentHostNode(); ReadOnlyObjectWrapper<ICFSecurityHostNodeObj> observable = new ReadOnlyObjectWrapper<ICFSecurityHostNodeObj>(); observable.setValue(ref); return (observable); } } }); tableColumnParentHostNode.setCellFactory( new Callback< TableColumn<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj>, TableCell<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj>>() { @Override public TableCell<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj> call( TableColumn<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj> arg) { return new CFReferenceTableCell<ICFAsteriskExtensionsConfObj, ICFSecurityHostNodeObj>(); } }); dataTable.getColumns().add(tableColumnParentHostNode); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFAsteriskExtensionsConfObj>() { @Override public void changed( ObservableValue<? extends ICFAsteriskExtensionsConfObj> observable, ICFAsteriskExtensionsConfObj oldValue, ICFAsteriskExtensionsConfObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); refreshMe(); javafxIsInitializing = false; adjustFinderButtons(); }
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); }
public CFDbTestJavaFXStringColListPane( ICFFormManager formManager, ICFDbTestJavaFXSchema argSchema, ICFDbTestTableObj argContainer, ICFDbTestStringColObj argFocus, Collection<ICFDbTestStringColObj> argDataCollection, ICFRefreshCallback refreshCallback, boolean sortByChain) { 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; javafxContainer = argContainer; javafxRefreshCallback = refreshCallback; javafxSortByChain = sortByChain; setJavaFXDataCollection(argDataCollection); dataTable = new TableView<ICFDbTestStringColObj>(); tableColumnId = new TableColumn<ICFDbTestStringColObj, Long>("Id"); tableColumnId.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestStringColObj, Long>, ObservableValue<Long>>() { public ObservableValue<Long> call(CellDataFeatures<ICFDbTestStringColObj, 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<ICFDbTestStringColObj, Long>, TableCell<ICFDbTestStringColObj, Long>>() { @Override public TableCell<ICFDbTestStringColObj, Long> call( TableColumn<ICFDbTestStringColObj, Long> arg) { return new CFInt64TableCell<ICFDbTestStringColObj>(); } }); dataTable.getColumns().add(tableColumnId); tableColumnName = new TableColumn<ICFDbTestStringColObj, String>("Name"); tableColumnName.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestStringColObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFDbTestStringColObj, 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<ICFDbTestStringColObj, String>, TableCell<ICFDbTestStringColObj, String>>() { @Override public TableCell<ICFDbTestStringColObj, String> call( TableColumn<ICFDbTestStringColObj, String> arg) { return new CFStringTableCell<ICFDbTestStringColObj>(); } }); dataTable.getColumns().add(tableColumnName); tableColumnDefaultVisibility = new TableColumn<ICFDbTestStringColObj, Boolean>("DefaultVisibility"); tableColumnDefaultVisibility.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestStringColObj, Boolean>, ObservableValue<Boolean>>() { public ObservableValue<Boolean> call(CellDataFeatures<ICFDbTestStringColObj, 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<ICFDbTestStringColObj, Boolean>, TableCell<ICFDbTestStringColObj, Boolean>>() { @Override public TableCell<ICFDbTestStringColObj, Boolean> call( TableColumn<ICFDbTestStringColObj, Boolean> arg) { return new CFBoolTableCell<ICFDbTestStringColObj>(); } }); dataTable.getColumns().add(tableColumnDefaultVisibility); tableColumnInitVal = new TableColumn<ICFDbTestStringColObj, String>("InitVal"); tableColumnInitVal.setCellValueFactory( new Callback<CellDataFeatures<ICFDbTestStringColObj, String>, ObservableValue<String>>() { public ObservableValue<String> call(CellDataFeatures<ICFDbTestStringColObj, String> p) { ICFDbTestStringDefObj obj = p.getValue(); if (obj == null) { return (null); } else { String value = obj.getOptionalInitVal(); ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>(); observable.setValue(value); return (observable); } } }); tableColumnInitVal.setCellFactory( new Callback< TableColumn<ICFDbTestStringColObj, String>, TableCell<ICFDbTestStringColObj, String>>() { @Override public TableCell<ICFDbTestStringColObj, String> call( TableColumn<ICFDbTestStringColObj, String> arg) { return new CFStringTableCell<ICFDbTestStringColObj>(); } }); dataTable.getColumns().add(tableColumnInitVal); dataTable .getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<ICFDbTestStringColObj>() { @Override public void changed( ObservableValue<? extends ICFDbTestStringColObj> observable, ICFDbTestStringColObj oldValue, ICFDbTestStringColObj newValue) { setJavaFXFocus(newValue); } }); scrollMenu = new ScrollPane(); scrollMenu.setVbarPolicy(ScrollBarPolicy.NEVER); scrollMenu.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollMenu.setFitToHeight(true); scrollMenu.setContent(getPanelHBoxMenu()); setTop(scrollMenu); setCenter(dataTable); javafxIsInitializing = false; if (observableListOfStringCol != null) { dataTable.setItems(observableListOfStringCol); } adjustListButtons(); }
/* ADMIN SCENE */ public void start(Stage primaryStage) throws Exception { /** Done by Marco */ primaryStage.setTitle("PubFinder"); primaryStage.setResizable(false); PubDataAccessor.PubDataAccessor(); /*Welcome scene*/ WelcomeScene.welcomeScene(); welcomeScene = WelcomeScene.welcomeScene; /*Welcome scene*/ /** End of Marcos Work */ /** Done by Shafiq and Anotnino */ /* Admin add scene*/ AdminAddScene.adminAddscene(); adminAddScene = AdminAddScene.adminAddScene; /* Admin add scene*/ /*Admin login scene*/ AdminLoginScene.adminloginscene(); adminLoginScene = AdminLoginScene.adminLoginScene; /*Admin login scene*/ /*Admin choice scene*/ AdminChoiceScene.adminchoicescene(); adminChoiceScene = AdminChoiceScene.adminChoiceScene; /*Admin choice scene*/ /* Admin Edit Scene*/ adminEditScene = AdminEditScene.editScene; /* Admin Edit Scene*/ /** End of Shafiq and Anotonino's Work */ /*Pub button scene*/ pubLayout = new StackPane(); /** Done by Ahmad */ searchNameInput = new TextField(); searchNameInput.setId("search-field"); searchNameInput.setPromptText("NAME"); /** End of Ahmad's Work */ searchStreetInput = new TextField(); searchStreetInput.setId("search-field"); searchStreetInput.setPromptText("STREET"); searchAgeInput = new TextField(); searchAgeInput.setId("search-field"); searchAgeInput.setPromptText("AGE"); /** Done by Aseel */ CheckBox searchStudentDiscount = new CheckBox("DISCOUNTS"); CheckBox searchBySpecialEvents = new CheckBox("EVENTS"); CheckBox searchWithoutFees = new CheckBox("NO FEES"); searchStudentDiscount.setId("check-search"); searchBySpecialEvents.setId("check-search"); searchWithoutFees.setId("check-search"); ComboBox searchByRating = new ComboBox( FXCollections.observableArrayList( "\uF005", "\uF005\uF005", "\uF005\uF005\uF005", "\uF005\uF005\uF005\uF005", "\uF005\uF005\uF005\uF005\uF005")); searchByRating.setTooltip(new Tooltip("RATING")); searchByRating.setPromptText("RATING"); searchByRating.setId("combo-search"); ComboBox searchByArea = new ComboBox( FXCollections.observableArrayList( "All", "Avenyn", "Linné", "Haga", "Järntorget", "Magasinsgatan", "Vasastaden", "Gamlestaden", "Heden", "Masthugget", "Stigberget", "Other")); searchByArea.setTooltip(new Tooltip("AREA")); searchByArea.setPromptText("AREA"); searchByArea.setId("combo-search"); /** End of Aseel's Work */ /** Done by Marco */ pubLayout.setId("pubs"); search = new Button("SEARCH"); search.setId("button-search"); GridPane inputGrid = new GridPane(); inputGrid.setMaxHeight(100); inputGrid.setHgap(10); inputGrid.setVgap(10); inputGrid.setId("searchGrid"); StackPane.setAlignment(inputGrid, Pos.TOP_LEFT); StackPane.setAlignment(search, Pos.TOP_RIGHT); /** End of Marco's Work */ search.setOnAction(e -> searchForPubs()); /** Done by Ahmad */ searchNameInput.setOnKeyReleased( event1 -> { if (event1.getCode() == KeyCode.ENTER) { searchForPubs(); } }); /** End of Ahmad's Work */ /** Done by Marco */ searchStreetInput.setOnKeyReleased( event2 -> { if (event2.getCode() == KeyCode.ENTER) { searchForPubs(); } }); /** End of Marco's Work */ /** Done by Ahmad */ searchAgeInput.setOnKeyReleased( event3 -> { if (event3.getCode() == KeyCode.ENTER) { searchForPubs(); } }); /** End of Ahmad's Work */ /** Done by Shafiq & Anotnino */ searchStudentDiscount.setOnAction( event4 -> { if (searchStudentDiscount.isSelected()) { discount = 1; } if (!searchStudentDiscount.isSelected()) { discount = 0; } }); searchWithoutFees.setOnAction( event5 -> { if (searchWithoutFees.isSelected()) { fee = 0; } if (!searchWithoutFees.isSelected()) { fee = 1; } }); searchBySpecialEvents.setOnAction( event6 -> { if (searchBySpecialEvents.isSelected()) { searchEvent = true; } if (!searchBySpecialEvents.isSelected()) { searchEvent = false; } }); searchByRating.setOnAction( event7 -> { if (searchByRating.getSelectionModel().isSelected(0)) { numberOfStars = 1; } else if (searchByRating.getSelectionModel().isSelected(1)) { numberOfStars = 2; } else if (searchByRating.getSelectionModel().isSelected(2)) { numberOfStars = 3; } else if (searchByRating.getSelectionModel().isSelected(3)) { numberOfStars = 4; } else if (searchByRating.getSelectionModel().isSelected(4)) { numberOfStars = 5; } }); /** End of Shafiq and Anotino's Work */ /** Done by Aseel and Antonino */ searchByArea.setOnAction( event8 -> { if (searchByArea.getSelectionModel().isSelected(0)) { area_checker = 2; } if (searchByArea.getSelectionModel().isSelected(1)) { area = 0; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(2)) { area = 2; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(3)) { area = 3; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(4)) { area = 4; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(5)) { area = 5; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(6)) { area = 6; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(7)) { area = 7; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(8)) { area = 8; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(9)) { area = 9; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(10)) { area = 10; area_checker = 1; } else if (searchByArea.getSelectionModel().isSelected(11)) { area = 11; area_checker = 1; } }); /** End of Aeel and Antonino's Work */ /** Done by marco */ ScrollPane pubScroll = new ScrollPane(); pubScroll.setId("scroll"); pubScroll.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); pubScroll.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); pubs = new GridPane(); pubScroll.setContent(pubs); pubs.setId("pub-grid"); pubs.setAlignment(Pos.CENTER); pubLayout.getChildren().add(pubScroll); inputGrid.add(searchNameInput, 1, 1); inputGrid.add(searchStreetInput, 2, 1); inputGrid.add(searchAgeInput, 3, 1); inputGrid.add(searchByRating, 4, 1); inputGrid.add(searchByArea, 5, 1); inputGrid.add(searchStudentDiscount, 6, 1); inputGrid.add(searchBySpecialEvents, 7, 1); inputGrid.add(searchWithoutFees, 8, 1); pubLayout.getChildren().add(inputGrid); pubLayout.getChildren().add(search); noPub = new Label("No pubs found"); searchForPubs(); pubScene = new Scene(pubLayout, 1000, 600); pubScene.getStylesheets().addAll(this.getClass().getResource("style.css").toExternalForm()); /*Pub button scene*/ /*Pub scene*/ ScrollPane pubPageLayout = new ScrollPane(); pubPageLayout.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); pubPageLayout.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); pubPageLayout.setFitToWidth(true); pubPageLayout.setContent(xPane); xPane.setId("pubScene"); pubPageLayout.setId("gej"); star.setId("starButton"); eventLabel.setId("eventLabel"); /*Items*/ xPane.add(back, 1, 1); back.setId("button-logout"); back.setOnAction( (event) -> { primaryStage.setScene(pubScene); xPane .getChildren() .removeAll(description, rating, overlay, pubName, map, star, rates, events); descriptionGrid .getChildren() .removeAll(age, open, address, type, discountForStudents, entranceFees); events.getChildren().removeAll(eventDescriptionGrid); eventDescriptionGrid.getChildren().removeAll(eventLabel, eventPane); eventPane.getChildren().removeAll(eventGrid); eventGrid.getChildren().removeAll(eventName, eventDescription); star.setText("0 \uF08A"); star.setStyle( "#starButton{-fx-text-fill: #fff;} #starButton:hover{-fx-text-fill: #fff;}"); }); /** End of Marco's work */ /** Done by Shafiq & Antonino */ star.setOnAction( event -> { int rate = PubDataAccessor.checkRate(this.id); int rateUpdate = rate + 1; /** End of Shafiq & Antonino's Work */ /** Done by marco */ star.setText((rateUpdate) + " \uF004"); PubDataAccessor.updateRate(this.id); star.setStyle("-fx-text-fill: #731a2b;"); }); overlay.setHeight(header.getFitHeight()); overlay.setWidth(header.getFitWidth() + 24); overlay.setX(0); overlay.setY(0); overlay.fillProperty().set(javafx.scene.paint.Color.rgb(115, 26, 43, 0.3)); pubPage = new Scene(pubPageLayout, 1000, 600); pubPage.getStylesheets().addAll(this.getClass().getResource("style.css").toExternalForm()); /*Pub scene*/ primaryStage.setScene(welcomeScene); primaryStage.show(); Main.primaryStage = primaryStage; /** End of Marcos work */ }