Examples of PopupButton


Examples of org.vaadin.hene.popupbutton.PopupButton

     
      log().i("button",a.getOffset(),row,a.getOffset()+a.getColumns()-1,row);
     
      if (action.isSecondary()) {
        if (secButton == null) {
          secButton = new PopupButton(getElement().find("secondary"));
          builder.getCurrentComposite().addComponent(getElement(), secButton,a.getOffset(),row,a.getOffset()+a.getColumns()-1,row);
          secLayout = new VerticalLayout();
          secLayout.setWidth("200px");
          secButton.addComponent(secLayout);
        }
View Full Code Here

Examples of util.ui.PopupButton

    add(button);
  }

  private void addButton(final Action action) {
    final JButton button = new PopupButton();
    addButtonProperties(button, action);
    button.setBorderPainted(false);
    button.setAlignmentX(Component.CENTER_ALIGNMENT);
    action.putValue(ACTION_VALUE, button);

    if(action.equals(((DefaultToolBarModel)mModel).getUpdateAction())) {
      mUpdateButton = button;
    }

    button.addMouseListener(new MouseAdapter() {
      public void mouseEntered(MouseEvent e) {
        button.setBorderPainted(true);
      }

      public void mouseExited(MouseEvent e) {
        button.setBorderPainted(false);
      }

      public void mousePressed(MouseEvent e) {
        if (e.isPopupTrigger() && !disabled) {
          showPopupMenu(e);
        }
      }

      public void mouseReleased(MouseEvent e) {
        if (e.isPopupTrigger() && !disabled) {
          showPopupMenu(e);
        }
      }
    });

    action.addPropertyChangeListener(new PropertyChangeListener() {
      @Override
      public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().equals("enabled")) {
          button.setEnabled(action.isEnabled());
        }
      }
    });

    add(button);
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.