Examples of JRibbonBand


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

 
  private JRibbonBand getRegistrationBand(){
   
    if(registrationBand == null){
      //registrationBand = new JRibbonBand(Messages.getString("Registration.TextBandTitle"), null);
      registrationBand = new JRibbonBand("Registration", null);
      //registrationBand.setResizePolicies(CoreRibbonResizePolicies.getCorePoliciesNone(registrationBand));
      registrationBand.setResizePolicies(CoreRibbonResizePolicies.getCorePoliciesNone(registrationBand));     
      registrationBand.addCommandButton(getSignUpButton(), RibbonElementPriority.TOP);
      registrationBand.addCommandButton(getCommunityButton(), RibbonElementPriority.TOP);
     
View Full Code Here

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

  }

 
  public AbstractRibbonBand<?> createRibbonBand(String name, CustomRibbonBandGenerator customBandsGenerator) throws MissingResourceException, ResourceFormatException, MissingListenerException {
    String title=getString(name+".Title");
    JRibbonBand result=new JRibbonBand(title,null);

    JComponent customComponent=customBandsGenerator.createRibbonComponent(name);
    if (customComponent!=null){
      JRibbonComponent ribbonComponent;
      if (customComponent instanceof JRibbonComponent)
        ribbonComponent=(JRibbonComponent)customComponent;
      else ribbonComponent=new JRibbonComponent(customComponent);
      result.addRibbonComponent(ribbonComponent,3);
      return result;
    }   
   
    @SuppressWarnings("unchecked")
    List<String> buttons = (List<String>)getStringList(name);
    //int i=0;
    for (String s : buttons){
      if (s.equals(SEPARATOR)) {
        result.startGroup();
      } else {
        RibbonElementPriority priority=RibbonElementPriority.MEDIUM;
        if (s.endsWith(".TOP")){
          priority=RibbonElementPriority.TOP;
          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)
//          result.add(button);
       
        result.addCommandButton(button, /*i++ == 0 ? RibbonElementPriority.TOP :*/ priority);
       
      }
    }
   
    List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
    resizePolicies.add(new CoreRibbonResizePolicies.Mirror(result.getControlPanel()));
//    resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(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.