Package com.cubusmail.gwtui.domain

Examples of com.cubusmail.gwtui.domain.Preferences


    this.messageListPanel.getGridPanel().addGridListener( new MessageGridListener() );
    add( this.messageListPanel, data );

    setReadingPaneState();

    Preferences preferences = GWTSessionManager.get().getPreferences();
    this.readingPanePanel.setVisible( preferences.isPreviewWindow() );

    initActions();
    createContextMenu();

    EventBroker.get().addFolderSelectedListener( this );
View Full Code Here


  /**
   *
   */
  private void setReadingPaneState() {

    Preferences preferences = GWTSessionManager.get().getPreferences();

    RegionPosition readingPanePos = null;
    if ( preferences.getReadingPane() == Preferences.READING_PANE_RIGHT ) {
      readingPanePos = RegionPosition.EAST;
    } else {
      readingPanePos = RegionPosition.SOUTH;
    }

View Full Code Here

  }

  public void start() {

    Preferences preferences = GWTSessionManager.get().getPreferences();
    if ( preferences.getMessagesReloadPeriod() > 0 ) {
      this.timer.scheduleRepeating( preferences.getMessagesReloadPeriod() );
    }
    else {
      this.timer.cancel();
    }
  }
View Full Code Here

public abstract class ServletUtil {

  public static final String getDefaultLocale( HttpServletRequest request ) {

    if ( SessionManager.isLoggedIn() ) {
      Preferences prefs = SessionManager.get().getPreferences();
      return prefs.getLanguage();
    }
    else {
      return request.getLocale().toString();
    }
  }
View Full Code Here

  }

  public static final String getCSS() {

    if ( SessionManager.isLoggedIn() ) {
      Preferences prefs = SessionManager.get().getPreferences();
      return prefs.getTheme();
    }
    else {
      return "";
    }
  }
View Full Code Here

   */
  public void createReplyMessage( Message msg, boolean replyAll ) throws MessagingException, IOException {

    init();
    this.message = (MimeMessage) msg.reply( replyAll );
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( msg, this, true, MessageTextMode.REPLY, prefs, 0 );
    addReplyInfo( msg );
  }
View Full Code Here

        }

        addComposeAttachment( newSource );
      }
    }
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( msg, this, true, MessageTextMode.REPLY, prefs, 0 );
  }
View Full Code Here

   * @throws IOException
   */
  public void readBodyContent( boolean loadImages, MessageTextMode mode ) throws MessagingException, IOException {

    init();
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( this.message, this, loadImages, mode, prefs, 0 );

    if ( StringUtils.isEmpty( this.messageTextPlain ) && StringUtils.isEmpty( this.messageTextHtml ) ) {
      if ( !StringUtils.isEmpty( this.messageImageHtml ) && prefs.isShowHtml() ) {
        this.messageTextHtml = this.messageImageHtml;
        setHtmlMessage( true );
        setTrustImages( true );
        setHasImages( true );
      }
View Full Code Here

          }
          FetchProfile completeProfile = MessageUtils.createFetchProfile( true, null );
          currentFolder.fetch( pagedMessages, completeProfile );

          String[][] messageStringArray = new String[pageSize][MessageListFields.values().length];
          Preferences preferences = SessionManager.get().getPreferences();

          // get date formats for message list date
          Locale locale = SessionManager.get().getLocale();
          TimeZone timezone = SessionManager.get().getTimeZone();
          String datePattern = this.applicationContext.getMessage(
              CubusConstants.MESSAGELIST_DATE_FORMAT_PATTERN, null, locale );
          String timePattern = this.applicationContext.getMessage(
              CubusConstants.MESSAGELIST_TIME_FORMAT_PATTERN, null, locale );

          NumberFormat sizeFormat = MessageUtils.createSizeFormat( locale );

          DateFormat dateFormat = null;
          DateFormat timeFormat = null;
          if ( preferences.isShortTimeFormat() ) {
            dateFormat = new SimpleDateFormat( datePattern, locale );
            timeFormat = new SimpleDateFormat( timePattern, locale );
            timeFormat.setTimeZone( timezone );
          }
          else {
            dateFormat = new SimpleDateFormat( datePattern + " " + timePattern, locale );
          }
          dateFormat.setTimeZone( timezone );
          Date today = Calendar.getInstance( timezone ).getTime();

          for (int i = 0; i < pageSize; i++) {
            if ( preferences.isShortTimeFormat()
                && DateUtils.isSameDay( today, pagedMessages[i].getSentDate() ) ) {
              // show only time
              ConvertUtil.convertToStringArray( currentFolder, pagedMessages[i], messageStringArray[i],
                  timeFormat, sizeFormat );
            }
View Full Code Here

TOP

Related Classes of com.cubusmail.gwtui.domain.Preferences

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.