Package kameleon.gui.model

Examples of kameleon.gui.model.GenerationModel


     *       If a format icon could not be loaded
     */
    private void buildFileEntries(GridBagLayout gridbag)
        throws UnknownKeyException, FileReadingException {
      SwitchLanguage sl = SwitchLanguage.getInstance() ;
      GenerationModel gModel = MoreInformationFrame.this.model ;
      GridBagConstraints iconConstraints, titleConstraints,
        valueConstraint ;
     
      iconConstraints = new GridBagConstraints() ;
      iconConstraints.gridwidth  = 1 ;
      iconConstraints.gridheight = 3 ;
      iconConstraints.anchor = GridBagConstraints.CENTER ;
      iconConstraints.weightx = 0.0 ;
      iconConstraints.weighty = 1.0 ;
      iconConstraints.insets = new Insets(5, 5, 5, 5) ;
     
      titleConstraints = new GridBagConstraints() ;
      titleConstraints.gridwidth = 1 ;
      titleConstraints.anchor = GridBagConstraints.BASELINE_LEADING ;
      titleConstraints.weightx = 0.0 ;
      titleConstraints.weighty = 0.0 ;
      titleConstraints.insets = new Insets(5, 0, 0, 5) ;
     
      valueConstraint = new GridBagConstraints() ;
      valueConstraint.gridwidth = GridBagConstraints.REMAINDER ;
      valueConstraint.anchor = GridBagConstraints.BASELINE_LEADING ;
      valueConstraint.weightx = 1.0 ;
      valueConstraint.weighty = 0.0 ;
     
      FileInfo lastG = gModel.getSelectedFileInfo() ;
      String[] formatIds = lastG.getTargetFormatId() ;
      String[] targetPaths = lastG.getTargetPath() ;
      int nGeneratedFiles = lastG.getTargetPath().length ;
      for(int file=0; file<nGeneratedFiles; file++) {
        PlugInInfo genInfo = gModel.getGenerator(formatIds[file]) ;
        String iconName = String.format(COLOR_ICON, genInfo.getId()) ;
        String formatName = genInfo.getFormatName() ;

        JLabel formatTitle = new JLabel(sl.getText(FORMAT)) ;
        JLabel pathTitle = new JLabel(sl.getText(PATH)) ;
View Full Code Here


    /**
     * Updates the list of recently used/added files.
     */
    @Override
    public void update() {
      GenerationModel gModel = HistoryView.this.model ;
      if (gModel.newFileAdded()) {
        FileInfo fileInfo = gModel.getSelectedFileInfo() ;
        this.add(0, fileInfo.getPath()) ;
        HistoryView.this.recentFiles.setSelectedIndex(0) ;
        this.fireContentsChanged(this, 0, this.getSize()-1) ;
      } else if (gModel.fileRemoved()){
        this.remove(gModel.getDeletedIndex()) ;
      }// if
    }// update()
View Full Code Here

TOP

Related Classes of kameleon.gui.model.GenerationModel

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.