Changeset 2319 for trunk/java-client


Ignore:
Timestamp:
2001-04-15T11:32:01+12:00 (23 years ago)
Author:
daven
Message:

use new APIs in service.*

Location:
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/CollectionInfoDialog.java

    r2315 r2319  
    6565
    6666    NzdlCollectionInfo collectionInfo =  csModel.getCollectionInfo(collectionName);
    67     /*
    68       Set n = nzdl.getMetaData(collectionName, "collection", "collectionname");
    69       if (n.size() == 1) {
    70       fullCollectionName =  (String) n.toArray()[0];
    71       }
    72       else {
    73       System.err.println(collectionName + " has more than 1 collectionname");
    74       }
    75       n.clear();
    76     */
     67   
    7768    collectionNamePanel = new JPanel();
    7869    // collectionNamePanel.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
     
    121112
    122113    JPanel descPanel = new JPanel();
     114
    123115    descString = csModel.getCollectionDescription(collectionName);
    124116    //System.err.println(descString);
    125     if (descString.length() > 0) {
     117    if (collectionInfo.isCollectionDescription()) {
     118        // insert this when it stops leaving extra \n in the text
     119        //descString = collectionInfo.getCollectionDescription();
    126120        descPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10,2,5,2), BorderFactory.createTitledBorder("Description")));
    127121        JTextPane descPane = new JTextPane();
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/SearchPanel.java

    r2315 r2319  
    230230
    231231    resultPopup = new JPopupMenu();
     232    JMenuItem copyResultItem = new JMenuItem("Copy result");
    232233    JMenuItem addBerryItem = new JMenuItem("Add to BerryBasket");
     234
     235    copyResultItem.addActionListener(new ActionListener() {
     236        public void actionPerformed(ActionEvent e) {
     237        System.err.println("copy result to clipboard");
     238        }
     239    });
     240
     241
     242
     243
    233244    addBerryItem.addActionListener(new ActionListener() {
    234245        public void actionPerformed(ActionEvent e) {
    235         System.err.println("SelectedResult = " + selectedResult);
    236         //System.err.println("add berry now...");
    237246        csModel.getBerryBasketModel().add( new Berry(selectedResult.getQueryHistoryItem(),selectedResult.getDocID(),selectedResult.getCollectionName(), selectedResult.toString()));
    238247        } // actionPerformed
    239248    });
     249    resultPopup.add(copyResultItem);
     250    resultPopup.addSeparator();
    240251    resultPopup.add(addBerryItem);
    241252    MouseListener popupListener = new PopupListener();
     
    310321      NzdlResultSet results = response.getResultSet();
    311322      ArrayList docIDs = new ArrayList(results.getDocumentIDs());
    312       searchTerms.setText(results.getOrderedTermFrequencyString());
     323      searchTerms.setText(results.getTermFrequencyString());
    313324
    314325      // paired collection of docIDs and Titles - but as Sets!
     
    367378  class ResultListSelectionHandler implements ListSelectionListener {
    368379
    369       // private Result previousSelection = null;
    370 
    371380    public void valueChanged(ListSelectionEvent e) {
    372381      // get the result object from the SelectedIndex
     
    375384      if (e.getValueIsAdjusting()) { return; }
    376385      Result result =  (Result) resultsList.getSelectedValue();
     386     
    377387      if ((result == Result.FAKE_RESULT) || (result == Result.INITIAL_FAKE_RESULT)) {
    378388      documentPane.setStyledDocument( blankDoc );
Note: See TracChangeset for help on using the changeset viewer.