Package kameleon.gui.model

Examples of kameleon.gui.model.GenerationMessage


   *       if an error occurred while updating the text of this view
   */
  @Override
  public void updateMessage(final Message newMessage) throws UnknownKeyException {
    this.message = newMessage ;
    GenerationMessage gMessage = (GenerationMessage) newMessage ;
   
    // Update progress icons
    int rowIndex = 0 ;
    for(JLabel progressIcon : this.progressIcons) {
      try {
        this.initProgressIcon(progressIcon, gMessage.getState(rowIndex)) ;
      } catch (KameleonException ke) {
        this.model.displayDebugInformation(ke) ;
      }// try
      ++rowIndex ;
    }// for
   
    // Update message
    this.reloadLanguage() ;
   
    // Update generation date
    TitledBorder border = (TitledBorder) this.getBorder() ;
    border.setTitle(FileModel.DATE_FORMATTER.format(gMessage.getLastGeneration())) ;
  }// updateMessage(Message)
View Full Code Here


   *       if an error occurred while updating the text of this view
   */
  @Override
  public void reloadLanguage() throws UnknownKeyException {
    SwitchLanguage sl = SwitchLanguage.getInstance() ;
    GenerationMessage gMessage = (GenerationMessage) this.message ;
   
    this.convertingTitle.setText(sl.getText(CONVERTING)) ;
    State[] states = gMessage.getStates() ;
    int nRows = states.length ;
    for(int row=0; row < nRows; ++row) {
      this.toTitles[row].setText(sl.getText(TO)) ;
      this.progressIcons[row].setToolTipText(
          sl.getText(getTextKey(states[row]))) ;
View Full Code Here

   * @throws   UnknownKeyException
   *       if an error occurred while updating the text of this view
   */
  private String getMessageText() throws UnknownKeyException {
    SwitchLanguage sl = SwitchLanguage.getInstance() ;
    GenerationMessage gMessage = (GenerationMessage) this.message ;
    String textKey, filePath = null ;
    switch(gMessage.getState()) {
    case ANALYZING: {
      textKey = GENERATION_ANALYZING_START ;
      break ;
    }// case
    case GENERATING: {
      State[] states = gMessage.getStates() ;
      if (states[0].equals(State.WAITING)) {
        textKey = GENERATION_ANALYZING_SUCCESS ;
      } else {
        textKey = GENERATION_GENERATING ;
        int i = 0, nStates = states.length ;
        while((i < nStates) && (filePath == null)) {
          if (states[i].equals(State.CONVERTING)) {
            filePath = gMessage.getTargetPath()[i] ;
          }// if
          ++i ;
        }// while
      }// if
      break ;
View Full Code Here

TOP

Related Classes of kameleon.gui.model.GenerationMessage

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.