Examples of JFlowRibbonBand


Examples of org.pushingpixels.flamingo.api.ribbon.JFlowRibbonBand

      public void contribute(RibbonBuildContext context, ARibbonContributor parent) {
        if (parent == null) {
          return;
        }
        band = new JFlowRibbonBand(TextUtils.removeTranslateComment(TextUtils.getText("ribbon.band." + attributes.getProperty("name"))), null);
        RibbonBandResizePolicy policy = band.getCurrentResizePolicy();
        band.setCurrentResizePolicy(policy);
        // read policies and sub-contributions
        context.processChildren(context.getCurrentPath(), this);
       
View Full Code Here

Examples of org.pushingpixels.flamingo.api.ribbon.JFlowRibbonBand

      public void contribute(final RibbonBuildContext context, ARibbonContributor parent) {
        if (parent == null) {
          return;
        }       
        JFlowRibbonBand band = new JFlowRibbonBand(TextUtils.removeTranslateComment(TextUtils.getText("ribbon.band.zoom")), null, null);
       
        JComboBox zoomBox = ((MapViewController) Controller.getCurrentController().getMapViewManager()).createZoomBox();
        addDefaultToggleHandler(context,zoomBox);
        band.addFlowComponent(zoomBox);
       
        JCommandButtonStrip strip = new JCommandButtonStrip();
               
        AFreeplaneAction action = context.getBuilder().getMode().getAction("ZoomInAction");       
        JCommandButton button = RibbonActionContributorFactory.createCommandButton(action);       
        button.setDisplayState(CommandButtonDisplayState.SMALL);
        getAccelChangeListener().addAction(action.getKey(), button);
        addDefaultToggleHandler(context, action, button);
        strip.add(button);
       
        action = context.getBuilder().getMode().getAction("ZoomOutAction");       
        button = RibbonActionContributorFactory.createCommandButton(action);       
        button.setDisplayState(CommandButtonDisplayState.SMALL);
        getAccelChangeListener().addAction(action.getKey(), button);
        addDefaultToggleHandler(context, action, button);
        strip.add(button);
       
        action = context.getBuilder().getMode().getAction("FitToPage");       
        button = RibbonActionContributorFactory.createCommandButton(action);       
        button.setDisplayState(CommandButtonDisplayState.MEDIUM);
        getAccelChangeListener().addAction(action.getKey(), button);
        addDefaultToggleHandler(context, action, button);
        strip.add(button);
       
        band.addFlowComponent(strip);
       
        List<RibbonBandResizePolicy> policies = new ArrayList<RibbonBandResizePolicy>();       
        policies.add(new CoreRibbonResizePolicies.FlowTwoRows(band.getControlPanel()));
        policies.add(new IconRibbonBandResizePolicy(band.getControlPanel()));
        band.setResizePolicies(policies);     
       
        parent.addChild(band, new ChildProperties(parseOrderSettings(attributes.getProperty("orderPriority", ""))));         
      }

      public void addChild(Object child, ChildProperties properties) {
View Full Code Here

Examples of org.pushingpixels.flamingo.api.ribbon.JFlowRibbonBand

        if (parent == null) {
          return;
        }

        // RIBBONS expandlistener and icon
        JFlowRibbonBand band = new JFlowRibbonBand(TextUtils.removeTranslateComment(TextUtils.getText("ribbon.band.font")), null, null);
        band.setExpandButtonKeyTip("FN");
        band.setCollapsedStateKeyTip("ZF");

        MUIFactory uiFactory = Controller.getCurrentModeController().getExtension(MUIFactory.class);

        final Container fontBox = uiFactory.createFontBox();
        JRibbonComponent fontComboWrapper = new JRibbonComponent((JComponent) fontBox);
        fontComboWrapper.setKeyTip("SF");
        addDefaultToggleHandler(context, fontComboWrapper);
        band.addFlowComponent(fontComboWrapper);

        final Container sizeBox = uiFactory.createSizeBox();
        JRibbonComponent sizeComboWrapper = new JRibbonComponent((JComponent) sizeBox);
        sizeComboWrapper.setKeyTip("SS");
        addDefaultToggleHandler(context, sizeComboWrapper);
        band.addFlowComponent(sizeComboWrapper);

        final Container styleBox = uiFactory.createStyleBox();
        JRibbonComponent styleComboWrapper = new JRibbonComponent((JComponent) styleBox);
        styleComboWrapper.setKeyTip("SD");
        addDefaultToggleHandler(context, styleComboWrapper);
        band.addFlowComponent(styleComboWrapper);

        JCommandButtonStrip styleStrip = new JCommandButtonStrip();

        AFreeplaneAction action = context.getBuilder().getMode().getAction("BoldAction");
        final JCommandToggleButton boldButton = RibbonActionContributorFactory.createCommandToggleButton(action);
        addDefaultToggleHandler(context, action, boldButton);       
        styleStrip.add(boldButton);

        action = context.getBuilder().getMode().getAction("ItalicAction");
        final JCommandToggleButton italicButton = RibbonActionContributorFactory.createCommandToggleButton(action);
        addDefaultToggleHandler(context, action, italicButton);
        styleStrip.add(italicButton);
       
        action = context.getBuilder().getMode().getAction("NodeColorAction");
        JCommandButton button = RibbonActionContributorFactory.createCommandButton(action);
        addDefaultToggleHandler(context, action, button);
        styleStrip.add(button);
       
        action = context.getBuilder().getMode().getAction("NodeBackgroundColorAction");
        button = RibbonActionContributorFactory.createCommandButton(action);
        addDefaultToggleHandler(context, action, button);
        styleStrip.add(button);
       
        action = context.getBuilder().getMode().getAction("NodeColorBlendAction");
        button = RibbonActionContributorFactory.createCommandButton(action);
        addDefaultToggleHandler(context, action, button);
        styleStrip.add(button);
       
        action = context.getBuilder().getMode().getAction("BlinkingNodeHookAction");
        button = RibbonActionContributorFactory.createCommandButton(action);
        addDefaultToggleHandler(context, action, button);
        styleStrip.add(button);
       
        action = context.getBuilder().getMode().getAction("MapBackgroundColorAction");
        button = RibbonActionContributorFactory.createCommandButton(action);
        addDefaultToggleHandler(context, action, button);
        styleStrip.add(button);
               
        band.addFlowComponent(styleStrip);
       
        action = context.getBuilder().getMode().getAction("RemoveFormatAction");       
        button = RibbonActionContributorFactory.createCommandButton(action);
        button.setDisplayState(CommandButtonDisplayState.MEDIUM);       
        addDefaultToggleHandler(context, action, button);
        band.addFlowComponent(button);
       
        action = context.getBuilder().getMode().getAction("UsePlainTextAction");
        button = RibbonActionContributorFactory.createCommandButton(action);
        button.setDisplayState(CommandButtonDisplayState.MEDIUM);
        addDefaultToggleHandler(context, action, button);
        band.addFlowComponent(button);
       
        List<RibbonBandResizePolicy> policies = new ArrayList<RibbonBandResizePolicy>();       
        policies.add(new CoreRibbonResizePolicies.FlowThreeRows(band.getControlPanel()));
        policies.add(new IconRibbonBandResizePolicy(band.getControlPanel()));
        band.setResizePolicies(policies)

        parent.addChild(band, new ChildProperties(parseOrderSettings(attributes.getProperty("orderPriority", ""))));

      }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.ribbon.JFlowRibbonBand

    return result;
  }
  public AbstractRibbonBand<?> createFlowRibbonBand(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException {
    String title=getString(name+".Title");
    JFlowRibbonBand result=new JFlowRibbonBand(title,null);
   
    @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)
//          result.add(button);
       
        result.addFlowComponent(button);
       
      }
    }
       
    List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
    resizePolicies.add(new CoreRibbonResizePolicies.FlowTwoRows(result.getControlPanel()));
    result.setResizePolicies(resizePolicies)
       
   

    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.