Package org.pushingpixels.flamingo.api.common

Examples of org.pushingpixels.flamingo.api.common.AbstractCommandButton$ActionHandler


      if (medSize > 0) {
        // try to move buttons from low to med to make
        // three-somes.
        while (((mediumButtons.size() % 3) != 0)
            && (smallButtons.size() > 0)) {
          AbstractCommandButton low = smallButtons.remove(0);
          mediumButtons.add(low);
        }
      }

      // at this point, mediumButtons list contains either
View Full Code Here


            // three-somes.
            while (((mapped.get(RibbonElementPriority.MEDIUM)
                .size() % 3) != 0)
                && (mapped.get(RibbonElementPriority.LOW)
                    .size() > 0)) {
              AbstractCommandButton low = mapped.get(
                  RibbonElementPriority.LOW).get(0);
              mapped.get(RibbonElementPriority.LOW).remove(low);
              mapped.get(RibbonElementPriority.MEDIUM).add(low);
            }
          }
          for (AbstractCommandButton medium : mapped
              .get(RibbonElementPriority.MEDIUM)) {
            medium
                .setDisplayState(CommandButtonDisplayState.MEDIUM);
          }

          // finally - low priority
          for (AbstractCommandButton low : mapped
              .get(RibbonElementPriority.LOW)) {
            low.setDisplayState(CommandButtonDisplayState.SMALL);
          }
        }
      }
    }
View Full Code Here

   * @see #removeTaskbarComponent(Component)
   * @see #getTaskbarComponents()
   */
  public synchronized void addTaskbarComponent(Component comp) {
    if (comp instanceof AbstractCommandButton) {
      AbstractCommandButton button = (AbstractCommandButton) comp;
      button.setDisplayState(CommandButtonDisplayState.SMALL);
      button.setGapScaleFactor(0.5);
      button.setFocusable(false);
    }
    this.taskbarComponents.add(comp);
    this.fireStateChanged();
  }
View Full Code Here

          s=s.substring(0, s.length()-4);
        }else if (s.endsWith(".LOW")){
          priority=RibbonElementPriority.LOW;
          s=s.substring(0, s.length()-4);
        }
        AbstractCommandButton button =  createCommandButton(s);
//        boolean visible = true;
//        try {
//          visible = getBoolean(s + ExtButtonFactory.VISIBLE_SUFFIX);
//        } catch (MissingResourceException e) {}
//        if (visible)
View Full Code Here

    @SuppressWarnings("unchecked")
    List<String> buttons = (List<String>)getStringList(name);
    //int i=0;
    for (String s : buttons){
      if (!s.equals(SEPARATOR)) {
        AbstractCommandButton button =  createCommandButton(s);
//        boolean visible = true;
//        try {
//          visible = getBoolean(s + ExtButtonFactory.VISIBLE_SUFFIX);
//        } catch (MissingResourceException e) {}
//        if (visible)
View Full Code Here

  public Collection<AbstractCommandButton> createTaskBar(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException {
    Collection<AbstractCommandButton> result=new ArrayList<AbstractCommandButton>();
    @SuppressWarnings("unchecked")
    List<String> buttons = (List<String>)getStringList(name+".TaskBar");
    for (String s : buttons){
      AbstractCommandButton button =  createCommandButton(s);
      result.add(button);
    }
    return result;
  }
View Full Code Here

   * @throws MissingListenerException
   *             if the button action is not found in the action map.
   */
  public AbstractCommandButton createCommandButton(String name) throws MissingResourceException,
      ResourceFormatException, MissingListenerException {
    AbstractCommandButton result = buttonFactory.createRibbonButton(name);
//    String type = null;
//    try {
//      type = getString(name + ExtButtonFactory.TYPE_SUFFIX);
//    } catch (MissingResourceException e) {
//    }
View Full Code Here

  }
 
 
  public AbstractCommandButton createJButton(String name) throws MissingResourceException,
  ResourceFormatException, MissingListenerException {
    AbstractCommandButton button = super.createCommandButton(name);
//    try {
//        String s = getString(name+ExtMenuFactory.ICON_SUFFIX);
//        ImageIcon icon = IconManager.getIcon(s);
//        if (icon != null)
//          button.setIcon(icon);
View Full Code Here

TOP

Related Classes of org.pushingpixels.flamingo.api.common.AbstractCommandButton$ActionHandler

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.