src/jdict/AskWord.java
changeset 45 6d4785558864
parent 38 45c0a27c902f
child 47 25a2b297656d
child 48 f3660feedd64
equal deleted inserted replaced
44:a6d5f2d98077 45:6d4785558864
   150         }
   150         }
   151         else if (c == cmd_pri)
   151         else if (c == cmd_pri)
   152         {
   152         {
   153             ShowText text = new ShowText(
   153             ShowText text = new ShowText(
   154                     /* Versio */
   154                     /* Versio */
   155                     "JDict v0.3 - Vortara programo laŭ stilo dictd " +
   155                     "JDict v0.3.2 - Vortara programo laŭ stilo dictd " +
   156                     "(http://www.dict.org)\n" +
   156                     "(http://www.dict.org)\n" +
   157                     "Kopirajto (C) 2007 Lluís Batlle i Rossell\n" +
   157                     "Kopirajto (C) 2007 Lluís Batlle i Rossell\n" +
   158                     "Tiun ĉi programon mi distribuas laŭ permesilo " +
   158                     "Tiun ĉi programon mi distribuas laŭ permesilo " +
   159                     "GPL versio 2 aŭ posta. Vidu la fontokodon por " +
   159                     "GPL versio 2 aŭ posta. Vidu la fontokodon por " +
   160                     "pliaj detaloj.\n" +
   160                     "pliaj detaloj.\n" +
   164         }
   164         }
   165         else if (c == cmd_vortarinformo)
   165         else if (c == cmd_vortarinformo)
   166         {
   166         {
   167             Vector results;
   167             Vector results;
   168             String text = "";
   168             String text = "";
       
   169             DictDefs defs = new DictDefs(vortaro);
   169 
   170 
   170             /* Already at start */
   171             /* Already at start */
   171             results = index.SearchDefinition("00databaseinfo", 5);
   172             results = index.BinarySearchDefinition("00databaseinfo");
   172             if (results.size() > 0)
   173             if (results.size() > 0)
   173                 text += "Database Info:\n" + (String) results.elementAt(0)
   174             {
   174                     + "\n";
   175                 Vorto w = (Vorto) results.elementAt(0);
   175 
   176                 String def = defs.getDefinition(w.getPos(), w.getLength());
   176             results = index.SearchDefinition("00databaseshort", 5);
   177                 text += "Database Info:\n" + def + "\n";
       
   178             }
       
   179 
       
   180             results = index.BinarySearchDefinition("00databaseshort");
   177             if (results.size() > 0)
   181             if (results.size() > 0)
   178                 text += "Database Short:\n" + (String) results.elementAt(0)
   182             {
   179                     + "\n";
   183                 Vorto w = (Vorto) results.elementAt(0);
   180 
   184                 String def = defs.getDefinition(w.getPos(), w.getLength());
   181             results = index.SearchDefinition("00databaseurl", 5);
   185                 text += "Database Short:\n" + def + "\n";
       
   186             }
       
   187 
       
   188             results = index.BinarySearchDefinition("00databaseurl");
   182             if (results.size() > 0)
   189             if (results.size() > 0)
   183                 text += "Database URL:\n" + (String) results.elementAt(0)
   190             {
   184                     + "\n";
   191                 Vorto w = (Vorto) results.elementAt(0);
       
   192                 String def = defs.getDefinition(w.getPos(), w.getLength());
       
   193                 text += "Database URL:\n" + def + "\n";
       
   194             }
   185 
   195 
   186             ShowText textwin = new ShowText(text, myform);
   196             ShowText textwin = new ShowText(text, myform);
   187         }
   197         }
   188         else if (c == cmd_agordoj)
   198         else if (c == cmd_agordoj)
   189         {
   199         {