Package net.suberic.pooka

Examples of net.suberic.pooka.FolderInfo


        getMessageUI().setBusy(true);
      FolderDisplayUI fw = getFolderDisplayUI();
      if (fw != null)
        fw.setBusy(true);

      final FolderInfo targetFolder = (FolderInfo) getValue("target");
      try {
        moveMessage(targetFolder);
      } catch (OperationCancelledException oce) {

      } catch (MessagingException me) {
        final MessagingException fme = me;
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
              showError(Pooka.getProperty("error.Message.CopyErrorMessage", "Error:  could not copy messages to folder:  ") + targetFolder.toString() +"\n", fme);
            }
          });
      }

      if (fw != null)
View Full Code Here


        getMessageUI().setBusy(true);
      FolderDisplayUI fw = getFolderDisplayUI();
      if (fw != null)
        fw.setBusy(true);

      final FolderInfo targetFolder = (FolderInfo) getValue("target");
      try {
        copyMessage(targetFolder);
      } catch (OperationCancelledException oce) {

      } catch (MessagingException me) {
        final MessagingException fme = me;
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
              showError( Pooka.getProperty("error.Message.CopyErrorMessage", "Error:  could not copy messages to folder:  ") + targetFolder.toString() +"\n", fme);
            }
          });
      }

      if (fw != null)
View Full Code Here

   * we redrew this node.  If it has, then we redraw the node.
   */
  public void updateNode() {
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          FolderInfo fi = getFolderInfo();
          if (fi != null) {
            int currentStatus = fi.getStatus();
            boolean hasUnread = fi.hasUnread();
            boolean hasNewMessages = fi.hasNewMessages();

            lastFolderStatus = currentStatus;
            lastUnread = hasUnread;
            lastNewMessages = hasNewMessages;
            javax.swing.JTree folderTree = ((FolderPanel)getParentContainer()).getFolderTree();
View Full Code Here

      loaded=true;

      // notify the JTable that this proxy has loaded.
      MessageChangedEvent mce = new net.suberic.pooka.event.MessageTableInfoChangedEvent(this, MessageChangedEvent.ENVELOPE_CHANGED, getMessageInfo().getMessage());

      FolderInfo fi = getFolderInfo();
      if (fi != null) {
        fi.fireMessageChangedEvent(mce);
      }

    }
  }
View Full Code Here

        matchingFilters = newMatchingFilters;

        // notify the JTable that this proxy has loaded.
        MessageChangedEvent mce = new net.suberic.pooka.event.MessageTableInfoChangedEvent(this, MessageChangedEvent.ENVELOPE_CHANGED, getMessageInfo().getMessage());

        FolderInfo fi = getFolderInfo();
        if (fi != null) {
          fi.fireMessageChangedEvent(mce);
        }
      }

    }
View Full Code Here

  /**
   * This creates and shows a PopupMenu for this component.
   */
  public void showPopupMenu(JComponent component, MouseEvent e) {
    ConfigurablePopupMenu popupMenu = new ConfigurablePopupMenu();
    FolderInfo fi = getMessageInfo().getFolderInfo();
    if ( fi != null ) {
      if (fi.isOutboxFolder()) {
        popupMenu.configureComponent("NewMessageProxy.popupMenu", Pooka.getResources());
      } else if (fi instanceof net.suberic.pooka.cache.CachingFolderInfo && ! ((net.suberic.pooka.cache.CachingFolderInfo) fi).getCacheHeadersOnly()) {
        popupMenu.configureComponent("MessageProxy.cachingPopupMenu", Pooka.getResources());
      } else {
        popupMenu.configureComponent("MessageProxy.popupMenu", Pooka.getResources());
View Full Code Here

  public void setHeaderMode(int newHeaderMode) {
    headerMode = newHeaderMode;
  }

  public FolderDisplayUI getFolderDisplayUI() {
    FolderInfo fi = getMessageInfo().getFolderInfo();
    if (fi != null)
      return fi.getFolderDisplayUI();
    else
      return null;

  }
View Full Code Here

      MessageProxy mp = (MessageProxy) data.get(row);
      if (mp == null)
        return "null";
      else {
        if (! mp.isLoaded()) {
          FolderInfo fi = mp.getFolderInfo();
          if (fi != null) {
            MessageLoader ml = fi.getMessageLoader();
            if (ml != null) {
              ml.loadMessages(mp, net.suberic.pooka.thread.MessageLoader.HIGH);
            }
          }
          return (net.suberic.pooka.Pooka.getProperty("FolderTableModel.unloadedCell", "loading..."));
        } else {
          Object key = columnKeys.get(col);
          Object returnValue = null;
          try {
            returnValue = mp.getTableInfo().get(key);
            if (returnValue == null) {
              if (! mp.getTableInfo().containsKey(key)) {
                // means that we need to load this again.
                java.util.List columnHeaders = mp.getColumnHeaders();
                columnHeaders.add(key);
                mp.setRefresh(true);

                FolderInfo fi = mp.getFolderInfo();
                if (fi != null) {
                  MessageLoader ml = fi.getMessageLoader();
                  if (ml != null) {
                    ml.loadMessages(mp, net.suberic.pooka.thread.MessageLoader.HIGH);
                  }
                }
              } else {
View Full Code Here

        final String messageContentType = getNewMessageUI().getMessageContentType();

        OutgoingMailServer mailServer = profile.getMailServer();

        final FolderInfo fi = mailServer.getOutbox();

        if (fi != null) {
          net.suberic.util.thread.ActionThread folderThread = fi.getFolderThread();
          Action runMe = new AbstractAction() {
              public void actionPerformed(java.awt.event.ActionEvent e) {
                try {
                  getNewMessageInfo().saveDraft(fi, profile, headers, messageText, messageContentType);
                  saveDraftSucceeded(fi);
View Full Code Here

  /**
   * Called when the save draft succeeds.
   */
  public void saveDraftSucceeded(FolderInfo outboxFolder) {
    final FolderInfo outbox = outboxFolder;
    final NewMessageUI nmui = getNewMessageUI();
    if (nmui != null) {
      Runnable runMe = new Runnable() {
          public void run() {
            nmui.setBusy(false);
            nmui.setModified(false);
            getMessageUI().showMessageDialog("Message saved to " +outbox.getFolderID(), "Draft Saved");
            getMessageUI().closeMessageUI();
          }
        };
      SwingUtilities.invokeLater(runMe);
    }
View Full Code Here

TOP

Related Classes of net.suberic.pooka.FolderInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.