Examples of addActionListener()


Examples of java.awt.PopupMenu.addActionListener()

  private PopupMenu createPopupMenu(final ViewState state) {
    final String ACTIONS_POP_MENU_NAME = "Actions";
    final String VIEW_CONDITION_MAP = "View...";
    PopupMenu actionsMenu = new PopupMenu(ACTIONS_POP_MENU_NAME);
    actionsMenu.add(new MenuItem(VIEW_CONDITION_MAP));
    actionsMenu.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        if (e.getActionCommand().equals(VIEW_CONDITION_MAP)) {
          DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree
              .getSelectionPath().getLastPathComponent();
View Full Code Here

Examples of java.awt.TextField.addActionListener()

        p.add(middle, "Center"); //$NON-NLS-1$
        if (echoCharacter != ' ')
            text.setEchoChar(echoCharacter);
        text.requestFocus();
        final OptionDialog dialog = new OptionDialog(QUESTION, p, CHOICES_OK_CANCEL, null);
        text.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                dialog.choice(CHOICE_OK);
            }
        });
        if (accessory != null)
View Full Code Here

Examples of java.awt.TrayIcon.addActionListener()

    final TrayIcon trayIcon = new TrayIcon(IconHelper.getProductLogoImage(), "double click here to open Dot Project Client", popup);
    final SystemTray tray = SystemTray.getSystemTray();
    trayIcon.setImageAutoSize(true);

    trayIcon.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        frm.setVisible(true);
        frm.setExtendedState(JFrame.MAXIMIZED_BOTH);
        tray.remove(trayIcon);
      }
View Full Code Here

Examples of javax.faces.component.ActionSource.addActionListener()

        if (this.listenerMethod != null) {
            MethodExpression listenerMethodExpression = this.listenerMethod.getMethodExpression(ctx, Void.TYPE,
                new Class<?>[] { ActionEvent.class });

            as.addActionListener(new MethodExpressionActionListener(listenerMethodExpression));
        } else {
            ValueExpression b = null;
            if (this.binding != null) {
                b = this.binding.getValueExpression(ctx, ActionListener.class);
            }
View Full Code Here

Examples of javax.faces.component.ActionSource2.addActionListener()

 
  protected void setActionListenerProperty(UIComponent component, MethodExpression actionListener) {
    if (actionListener != null) {
      if (component instanceof ActionSource2) {
        ActionSource2 actionSource2 = (ActionSource2) component;
        actionSource2.addActionListener(new MethodExpressionActionListener(actionListener));
      } else {
        throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE2_ERROR, component.getClientId(getFacesContext())));
      }
    }
  }
View Full Code Here

Examples of javax.faces.component.UICommand.addActionListener()

          TobagoConstants.RENDERER_TYPE_LINK);
      toolbar.getChildren().add(command);
      command.setId(commands[i].getCommand());

      for (ActionListener listener : getActionListeners()) {
        command.addActionListener(listener);
      }
      command.setActionListener(getActionListener());
      command.getAttributes().put(
          TobagoConstants.ATTR_IMAGE, "image/tobago.tree." + commands[i].getCommand() + ".gif");
      String title = ResourceManagerUtil.getPropertyNotNull(facesContext, "tobago",
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton.addActionListener()

  {
    comp.setValueExpression("label", _label);
  }
  if (_actionListener != null)
  {
    comp.addActionListener(new MethodExpressionActionListener(_actionListener));
  }
  if (_actionExpression != null)
  {
    comp.setActionExpression(_actionExpression);
  }
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandLink.addActionListener()

  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_actionListener != null)
  {
    comp.addActionListener(new MethodExpressionActionListener(_actionListener));
  }
  if (_actionExpression != null)
  {
    comp.setActionExpression(_actionExpression);
  }
View Full Code Here

Examples of javax.swing.AbstractButton.addActionListener()

     */
    protected AbstractButton getOnOffButton() {
        AbstractButton onoffButton = createOnOffButton();
        onoffButton.setSelectedIcon(layerOnIcon);
        onoffButton.setActionCommand(toggleLayerCmd);
        onoffButton.addActionListener(this);

        String interString = i18n.get(LayerPane.class,
                "onoffButton.tooltip",
                "Turn \"{0}\" layer on/off",
                layer.getName());
View Full Code Here

Examples of javax.swing.ButtonModel.addActionListener()

        this.buttonComp = (ItsNatFreeButtonNormal)compMgr.createItsNatComponentById("buttonId","freeButtonNormal",null);
        buttonComp.addEventListener("click",this);

        ButtonModel dataModel = buttonComp.getButtonModel();
        dataModel.addActionListener(this);
        dataModel.addChangeListener(this);
    }

    public void endExamplePanel()
    {
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.