void insertCatalogElements(InputStream catalogIS, URI catalogBaseUri, DefaultMutableTreeNode parent, boolean expandPath) { final List<InvDataset> catalogDatasets = CatalogTreeUtils.getCatalogDatasets(catalogIS, catalogBaseUri); insertCatalogElements(catalogDatasets, parent, expandPath); }
void setLeafVisible(OpendapLeaf leaf, boolean visible) { if (visible) { setLeafVisible(leaf); } else { setLeafInvisible(leaf); } }
private boolean fitsToServerSpecifiedTimeRange(DateRange dateRange) { if (startDate == null && endDate == null) { return true; } else if (startDate == null) { return endsAtOrBeforeEndDate(dateRange); } else if (endDate == null) { return startsAtOrAfterStartDate(dateRange); } return startsAtOrAfterStartDate(dateRange) && endsAtOrBeforeEndDate(dateRange); }
@Override public void catalogElementsInsertionFinished() { pm.setPreMessage("Scanning variables... "); pm.setPostMessage(""); pm.beginTask("", totalWork); pm.worked(worked); }
private void insertCatalogElements(List<InvDataset> catalogDatasets, DefaultMutableTreeNode parent, boolean expandPath) { appendToNode(jTree, catalogDatasets, parent, true); fireCatalogElementsInsertionFinished(); if (expandPath) { expandPath(parent); } }
private void filterLeaf(OpendapLeaf leaf) { if ( (!useDatasetNameFilter.isSelected() || datasetNameFilter.accept(leaf)) && (!useTimeRangeFilter.isSelected() || timeRangeFilter.accept(leaf)) && (!useRegionFilter.isSelected() || regionFilter.accept(leaf)) && (!useVariableFilter.isSelected() || variableFilter.accept(leaf))) { catalogTree.setLeafVisible(leaf, true); } else { catalogTree.setLeafVisible(leaf, false); } }
private void appendToNode(JTree jTree, InvDataset dataset, MutableTreeNode parentNode) { final DefaultTreeModel treeModel = (DefaultTreeModel) jTree.getModel(); if (dataset instanceof InvCatalogRef) { CatalogTreeUtils.appendCatalogNode(parentNode, treeModel, (InvCatalogRef) dataset); } else { appendLeafNode(parentNode, treeModel, dataset); } }
private DownloadAction createDownloadAction(DownloadProgressBarPM pm) { return new DownloadAction(pm, new ParameterProviderImpl(), new DownloadAction.DownloadHandler() { @Override public void handleException(Exception e) { appContext.handleError("Unable to perform download. Reason: " + e.getMessage(), e); } @Override public void handleDownloadFinished(File downloadedFiles) { if (openInVisat.isSelected()) { VisatApp.getApp().openProduct(downloadedFiles); } } }); }
@Override public void filterChanged() { final OpendapLeaf[] leaves = catalogTree.getLeaves(); for (OpendapLeaf leaf : leaves) { filterLeaf(leaf); } } }
private void fireFilterChanged() { for (FilterChangeListener filterChangeListener : filterChangeListeners) { filterChangeListener.filterChanged(); } }
@Override public void dapLeafSelected(final OpendapLeaf leaf) { setText(leaf); }
@Override public void notifyFileDownloaded(File downloadedFile) { downloadedFilesCount++; downloadHandler.handleDownloadFinished(downloadedFile); }
@Override public void setPostMessage(String postMessageText) { setTaskName(postMessageText); }
private void fireCatalogElementsInsertionFinished() { for (CatalogTreeListener catalogTreeListener : catalogTreeListeners) { catalogTreeListener.catalogElementsInsertionFinished(); } }
private void fireLeafAdded(OpendapLeaf leaf, boolean hasNestedDatasets) { for (CatalogTreeListener catalogTreeListener : catalogTreeListeners) { catalogTreeListener.leafAdded(leaf, hasNestedDatasets); } }
@Override public void setPreMessage(String preMessageText) { setTaskName(preMessageText); }
private void fireFilterChanged() { for (FilterChangeListener listener : listeners) { listener.filterChanged(); } }
@Override public void fileLeafSelected(OpendapLeaf leaf) { setText(leaf); }
private void fireFilterChangedEvent() { for (FilterChangeListener listener : listeners) { listener.filterChanged(); } }
private void fireFilterChangedEvent() { for (FilterChangeListener listener : listeners) { listener.filterChanged(); } }