MainPane() { setLayout(new BorderLayout()); JScrollPane sp = new JScrollPane(instrumentsTable); add(sp); instrumentsTable.reloadAction.putValue(Action.SMALL_ICON, Res.iconReload22); instrumentsTable.createDirectoryAction.putValue(Action.SMALL_ICON, Res.iconNew16); instrumentsTable.getParent().setBackground(instrumentsTable.getBackground()); searchResultsNode.setDetached(true); }
public void setSearchResults(DbDirectoryInfo[] directories, DbInstrumentInfo[] instruments) { DbDirectoryTreeNode node = mainPane.getSearchResultsNode(); node.removeAllDirectories(); node.removeAllInstruments(); if (instruments != null) { for (DbInstrumentInfo i : instruments) i.setShowAbsolutePath(true); node.addInstruments(instruments); } if (directories != null) { DbDirectoryTreeNode[] nodeS = new DbDirectoryTreeNode[directories.length]; for (int i = 0; i < directories.length; i++) { DbDirectoryInfo d = directories[i]; d.setShowAbsolutePath(true); nodeS[i] = new DbDirectoryTreeNode(d); } node.addDirectories(nodeS); } mainPane.showSearchResultsNode(); }