Package org.pdfsam.guiclient.dto

Examples of org.pdfsam.guiclient.dto.StringItem


   */
  private void init(boolean addSameAsSourceItem, boolean checkFilters){
    removeAllItems();
    this.addSameAsSourceItem = addSameAsSourceItem;
    if(addSameAsSourceItem){
      addItem(new StringItem(SAME_AS_SOURCE, GettextResource.gettext(config.getI18nResourceBundle(),"Same as input document")));     
    }
    ArrayList<StringItem> values = PdfVersionUtility.getVersionsList();
    Integer maxFilter = Integer.valueOf(-1);
    if(checkFilters && !filterVersions.isEmpty()){
      maxFilter = Collections.max(filterVersions);
View Full Code Here


    ArrayList<StringItem> removeList = new ArrayList<StringItem>();
    this.filterVersions.add(version);
    Integer maxFilter = Collections.max(filterVersions);
    Object item = this.getSelectedItem();
    for(int i =0; i<this.getItemCount(); i++){
      StringItem currentItem = (StringItem)getItemAt(i);
      if(currentItem!=null && maxFilter.compareTo(new Integer(currentItem.getId()))>0){
        removeList.add(currentItem);
        if(currentItem.equals(item)){
          item = null;
        }
      }
    }
    if(removeList.size()>0){
View Full Code Here

 
  /**
   * @return the item with the lower id
   */
  public StringItem getMinItem(){
    StringItem minItem = null;
    for(int i =0; i<this.getItemCount(); i++){
      StringItem currentItem = (StringItem)getItemAt(i);
      if(minItem!= null){
        if(currentItem!=null && new Integer(minItem.getId()).compareTo(new Integer(currentItem.getId()))>0){
          minItem = currentItem;       
        }
      }else{
        minItem = currentItem;
      }
View Full Code Here

      Document document = XmlUtility.parseXmlFile(this.getClass().getResource("/org/pdfsam/i18n/languages.xml"));
      List<Node> nodeList = document.selectNodes("/languages/language");
      for (int i = 0; nodeList != null && i < nodeList.size(); i++){
        Node langNode  =((Node) nodeList.get(i));
        if (langNode != null){
          langs.add(new StringItem(langNode.selectSingleNode("@value").getText(), langNode.selectSingleNode("@description").getText()));
        }
      }
    }catch(Exception e){
      log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
      langs.add(new StringItem("en_GB", "English (UK)"));
    }
    Collections.sort(langs);
    return langs;
    }
View Full Code Here

     * Loads the available log levels
     * @return logs level list
     */
    private Vector<StringItem> loadLogLevels(){
      Vector<StringItem> logs = new Vector<StringItem>(10,5);
      logs.add(new StringItem(Integer.toString(Level.DEBUG_INT), Level.DEBUG.toString()));
      logs.add(new StringItem(Integer.toString(Level.INFO_INT), Level.INFO.toString()));
      logs.add(new StringItem(Integer.toString(Level.WARN_INT), Level.WARN.toString()));
      logs.add(new StringItem(Integer.toString(Level.ERROR_INT), Level.ERROR.toString()));
      logs.add(new StringItem(Integer.toString(Level.FATAL_INT), Level.FATAL.toString()));
      logs.add(new StringItem(Integer.toString(Level.OFF_INT), Level.OFF.toString()));
    return logs;
    }
View Full Code Here

   * @return a list containing every possible pdf version as a StrinItem
   */
  public static ArrayList<StringItem> getVersionsList(){
    if(listCache.isEmpty()){
      Configuration config = Configuration.getInstance();
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_2), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.2 (Acrobat 3)")));
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_3), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.3 (Acrobat 4)")));
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_4), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.4 (Acrobat 5)")));
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_5), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.5 (Acrobat 6)")));
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_6), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.6 (Acrobat 7)")));
      listCache.add(new StringItem(Character.toString(AbstractParsedCommand.VERSION_1_7), GettextResource.gettext(config.getI18nResourceBundle(),"Version 1.7 (Acrobat 8)")));
    }
    return listCache;
   
  }
View Full Code Here

     *
     * @return a LinkedList of ListItem objects with the availales LAF
     */
  public static LinkedList<StringItem> getLAFList(){
      LinkedList<StringItem> retval = new LinkedList<StringItem>();
      retval.add(new StringItem("0","Java"));
      retval.add(new StringItem("1","System"));
      retval.add(new StringItem("2","Metal"));
      retval.add(new StringItem("3","Plastic3D"));
      retval.add(new StringItem("4","Plastic"));
      retval.add(new StringItem("5","PlasticXP"));
      retval.add(new StringItem("6","Windows"));
      return retval;     
  }
View Full Code Here

     *
     * @return  LinkedList of ListItem objects with the available Themes form Plastic
     */
    public static LinkedList<StringItem> getThemeList(){
        LinkedList<StringItem> retval = new LinkedList<StringItem>();
        retval.add(new StringItem("0","None"));
        retval.add(new StringItem("1","DesertBlue"));
        retval.add(new StringItem("2","DesertRed"));
        retval.add(new StringItem("3","Silver"));
        retval.add(new StringItem("4","SkyPink"));
        retval.add(new StringItem("5","SkyKrupp"));
        retval.add(new StringItem("6","SkyYellow"));
        retval.add(new StringItem("7","SkyGreen"));
        retval.add(new StringItem("8","DarkStar"));
        retval.add(new StringItem("9","BrownSugar"));
        retval.add(new StringItem("10","DesertGreen"));
        retval.add(new StringItem("11","ExperienceBlue"));
        retval.add(new StringItem("12","ExperienceGreen"));
        retval.add(new StringItem("13","SkyBlue"));
        retval.add(new StringItem("14","SkyBluer"));
        return retval;
       
    }
View Full Code Here

   * @return a list of the available CREATORS
   */
  public static List<StringItem> getInstalledCreators(){
    List<StringItem> retVal = new ArrayList<StringItem>();
    for(ThumbnailsCreator creator: CREATORS){
      retVal.add(new StringItem(creator.getCreatorIdentifier(), creator.getCreatorName()));
    }
    return retVal;
  }
View Full Code Here

            if (panel.getOutputCompressedCheck().isSelected())
                args.add("-" + SplitParsedCommand.COMPRESSED_ARG);
            args.add("-" + SplitParsedCommand.PDFVERSION_ARG);
            if (JPdfVersionCombo.SAME_AS_SOURCE
                    .equals(((StringItem) panel.getVersionCombo().getSelectedItem()).getId())) {
                StringItem minItem = panel.getVersionCombo().getMinItem();
                String currentPdfVersion = Character.toString(item.getPdfVersion());
                if (minItem != null) {
                    if (Integer.parseInt(currentPdfVersion) < Integer.parseInt(minItem.getId())) {
                        if (JOptionPane.YES_OPTION != DialogUtility.askForPdfVersionConfilct(panel, minItem
                                .getDescription())) {
                            return;
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of org.pdfsam.guiclient.dto.StringItem

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.