Package org.pushingpixels.flamingo.api.common

Examples of org.pushingpixels.flamingo.api.common.CommandButtonDisplayState


        new Object[] { CommandButtonDisplayState.BIG, CommandButtonDisplayState.TILE,
            CommandButtonDisplayState.MEDIUM, CommandButtonDisplayState.SMALL }));
    states.addItemListener(new ItemListener() {
      @Override
      public void itemStateChanged(ItemEvent e) {
        CommandButtonDisplayState selected = (CommandButtonDisplayState) states.getSelectedItem();
        filePanel.cancelMainWorker();
        filePanel.setIconState(selected);
      }
    });
View Full Code Here


          Map<CommandButtonDisplayState, List<AbstractCommandButton>> buttonMap = new HashMap<CommandButtonDisplayState, List<AbstractCommandButton>>();
          for (RibbonElementPriority elementPriority : RibbonElementPriority
              .values()) {
            for (AbstractCommandButton commandButton : controlPanelGroup
                .getRibbonButtons(elementPriority)) {
              CommandButtonDisplayState state = commandButton
                  .getDisplayState();
              if (buttonMap.get(state) == null) {
                buttonMap.put(state,
                    new ArrayList<AbstractCommandButton>());
              }
View Full Code Here

          Map<CommandButtonDisplayState, List<AbstractCommandButton>> buttonMap = new HashMap<CommandButtonDisplayState, List<AbstractCommandButton>>();
          for (RibbonElementPriority elementPriority : RibbonElementPriority
              .values()) {
            for (AbstractCommandButton commandButton : controlPanelGroup
                .getRibbonButtons(elementPriority)) {
              CommandButtonDisplayState state = commandButton
                  .getDisplayState();
              if (buttonMap.get(state) == null) {
                buttonMap.put(state,
                    new ArrayList<AbstractCommandButton>());
              }
View Full Code Here

     * @return The preferred width of the specified command button under the
     *         specified display priority.
     */
    private int getPreferredWidth(AbstractCommandButton button,
        RibbonElementPriority buttonDisplayPriority) {
      CommandButtonDisplayState displayState = null;
      switch (buttonDisplayPriority) {
      case TOP:
        displayState = CommandButtonDisplayState.BIG;
        break;
      case MEDIUM:
        displayState = CommandButtonDisplayState.MEDIUM;
        break;
      case LOW:
        displayState = CommandButtonDisplayState.SMALL;
        break;
      }
      return displayState.createLayoutManager(button).getPreferredSize(
          button).width;
    }
View Full Code Here

TOP

Related Classes of org.pushingpixels.flamingo.api.common.CommandButtonDisplayState

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.