Examples of JRibbon


Examples of org.jvnet.flamingo.ribbon.JRibbon

  }
 

 
  public JRibbon createRibbonMenu(){
    JRibbon ribbon = new JRibbon();    
    createFileRibbonMenu(ribbon);
   
    final ArrayList taskList = new ArrayList();
    HashMap bandByTask = new HashMap(){
      public Object put(Object key, Object val){
View Full Code Here

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

          PopupPanelManager.defaultManager().hidePopups(
              popupPanelParent);
          return;
        }
        if (src instanceof JRibbonTaskToggleButton) {
          JRibbon ribbon = (JRibbon) SwingUtilities
              .getAncestorOfClass(JRibbon.class, src);
          if ((ribbon != null)
              && FlamingoUtilities
                  .isShowingMinimizedRibbonInPopup(ribbon)) {
            // This will be handled in the action listener installed
View Full Code Here

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

    if(frame instanceof JRibbonFrame) {
      this.ribbon = ((JRibbonFrame)frame).getRibbon();
    }
    else {
      //TODO RIBBONS - quick hack -> does this work?
      this.ribbon = new JRibbon();
    }
    this.rootContributor = new RootContributor(ribbon);

    this.mode = mode;
    this.accelManager = acceleratorManager;
View Full Code Here

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

          PopupPanelManager.defaultManager().hidePopups(
              popupPanelParent);
          return;
        }
        if (src instanceof JRibbonTaskToggleButton) {
          JRibbon ribbon = (JRibbon) SwingUtilities
              .getAncestorOfClass(JRibbon.class, src);
          if ((ribbon != null)
              && FlamingoUtilities
                  .isShowingMinimizedRibbonInPopup(ribbon)) {
            // This will be handled in the action listener installed
View Full Code Here

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

    actionMap.put("toggleMinimized", new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent e) {
        JRibbonFrame ribbonFrame = (JRibbonFrame) SwingUtilities
            .getWindowAncestor(JRibbonRootPane.this);
        JRibbon ribbon = ribbonFrame.getRibbon();
        ribbon.setMinimized(!ribbon.isMinimized());
      }
    });
    inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, Event.CTRL_MASK),
        "toggleMinimized");
  }
View Full Code Here

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

              .setSelected(isTaskSelected());
        }
      }

      private boolean isTaskSelected() {
        JRibbon ribbon = (JRibbon) SwingUtilities.getAncestorOfClass(
            JRibbon.class, commandButton);
        if (ribbon == null)
          return false;

        return ribbon.getSelectedTask() == ((JRibbonTaskToggleButton) commandButton)
            .getRibbonTask();
      }
    };
    PopupPanelManager.defaultManager().addPopupListener(this.popupListener);
  }
View Full Code Here

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

   * @param toFill
   *            Rectangle to fill.
   */
  @Override
  protected void paintButtonBackground(Graphics graphics, Rectangle toFill) {
    JRibbon ribbon = (JRibbon) SwingUtilities.getAncestorOfClass(
        JRibbon.class, this.commandButton);

    this.buttonRendererPane.setBounds(toFill.x, toFill.y, toFill.width,
        toFill.height);
    ButtonModel model = this.rendererButton.getModel();
View Full Code Here

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

              .setSelected(isTaskSelected());
        }
      }

      private boolean isTaskSelected() {
        JRibbon ribbon = (JRibbon) SwingUtilities.getAncestorOfClass(
            JRibbon.class, commandButton);
        if (ribbon == null)
          return false;

        return ribbon.getSelectedTask() == ((JRibbonTaskToggleButton) commandButton)
            .getRibbonTask();
      }
    };
    PopupPanelManager.defaultManager().addPopupListener(this.popupListener);
  }
View Full Code Here

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

   * @param button
   *            The button itself.
   */
  @Override
  protected void paintButtonBackground(Graphics graphics, Rectangle toFill) {
    JRibbon ribbon = (JRibbon) SwingUtilities.getAncestorOfClass(
        JRibbon.class, this.commandButton);

    this.buttonRendererPane.setBounds(toFill.x, toFill.y, toFill.width,
        toFill.height);
    ButtonModel model = this.rendererButton.getModel();
View Full Code Here

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

        else return null;
      }
    };
     
    Collection<RibbonTask> ribbonTasks= menuManger.getRibbon(MenuManager.STANDARD_RIBBON, customBandsGenerator);
    JRibbon ribbon=frame.getRibbon();

    for (RibbonTask ribbonTask : ribbonTasks){
      ribbon.addTask(ribbonTask);
    }
   
   
    RibbonApplicationMenu applicationMenu=new RibbonApplicationMenu();
   
   
    ribbon.setApplicationMenu(applicationMenu);
   
    Collection<AbstractCommandButton> taskBars=menuManger.getTaskBar(MenuManager.STANDARD_RIBBON);
    for (AbstractCommandButton button : taskBars)
      ribbon.addTaskbarComponent(button);
   
    ribbon.configureHelp(IconManager.getRibbonIcon("menu24.help"), new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent e) {
        showHelpDialog();
       
      }
    });
   
    JLabel openprojLogo=ribbon.getOpenprojLogo();
    openprojLogo.setIcon(IconManager.getIcon("logo.OpenProj"));
    openprojLogo.addMouseListener(new MouseAdapter(){
            public void mousePressed(MouseEvent me){
              BrowserControl.displayURL("http://www.projity.com/");
            }
         });
   
    JPanel projectViews=ribbon.getProjectViews();
    projectViews.setBorder(new EmptyBorder(0,0,0,0));   
    getMenuManager().initComponent(MenuManager.VIEW_TOOL_BAR,projectViews);
   
    JPanel fileSelector=ribbon.getFileSelector();
    fileSelector.setLayout(new BorderLayout());
    fileSelector.setBackground(ProjectLibreRibbonUI.RIBBON_MENU_COLOR);
    JComponent filesComponent=((DefaultFrameManager)getFrameManager()).getProjectComboPanel();
    filesComponent.setBackground(ProjectLibreRibbonUI.RIBBON_MENU_COLOR);
    fileSelector.add(filesComponent,BorderLayout.EAST);
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.