Exemple #1
0
  public void processFolderPanelMouseEvent(MouseEvent mouseevent) {
    switch (mouseevent.getID()) {
      case 501:
        if (mouseevent.getClickCount() == 2 && !dragged) {
          visitDocument(mouseevent.isShiftDown());
          return;
        }
        // fall through

      case 502:
        ListItem listitem = hotCanvas.getSelectedItem();
        if (listitem != null && (listitem instanceof Bookmark)) {
          Bookmark bookmark = (Bookmark) listitem;
          Webmark webmark = bookmark.getWebmark();
          String s = webmark.getURL();
          frm.setMessage(s);
        } else {
          frm.setMessage("");
        }
        redispatchEvent(mouseevent);
        dragged = false;
        return;

      case 506:
        redispatchEvent(mouseevent);
        dragged = true;
        return;

      default:
        return;
    }
  }
Exemple #2
0
 public void visitDocument(boolean flag) {
   ListItem listitem = hotCanvas.getSelectedItem();
   if (listitem == null) return;
   if (!(listitem instanceof Bookmark)) return;
   Bookmark bookmark = (Bookmark) listitem;
   Webmark webmark = bookmark.getWebmark();
   try {
     URL url = new URL(webmark.getURL());
     HJFrame hjframe = HJWindowManager.getHJWindowManager().getLastFocusHolder();
     if (flag || hjframe == null) {
       HJWindowManager.getHJWindowManager().cloneFrame(hjframe, url);
       return;
     } else {
       hjframe.getHTMLBrowsable().setDocumentURL(url);
       return;
     }
   } catch (MalformedURLException _ex) {
     return;
   }
 }