public void loadData(boolean forceReload) { ICFSecuritySchemaObj schemaObj = (ICFSecuritySchemaObj) javafxSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfSysCluster == null) || forceReload) { observableListOfSysCluster = null; listOfSysCluster = schemaObj .getSysClusterTableObj() .readSysClusterByClusterIdx(containingCluster.getRequiredId(), javafxIsInitializing); if (listOfSysCluster != null) { observableListOfSysCluster = FXCollections.observableArrayList(listOfSysCluster); observableListOfSysCluster.sort(compareSysClusterByQualName); } else { observableListOfSysCluster = FXCollections.observableArrayList(); } dataTable.setItems(observableListOfSysCluster); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
public CFSecurityJavaFXSecDeviceViewEditPane( ICFFormManager formManager, ICFSecurityJavaFXSchema argSchema, ICFSecuritySecDeviceObj 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.getSecDeviceFactory().newAttrPane(cfFormManager, argFocus); attrScrollPane = new ScrollPane(); attrScrollPane.setFitToWidth(true); attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); attrScrollPane.setContent(attrPane); setOrientation(Orientation.VERTICAL); getItems().add(attrScrollPane); }