Package org.pushingpixels.flamingo.api.common

Examples of org.pushingpixels.flamingo.api.common.JCommandButton.addActionListener()


    result.setPopupCallback(new TestPopupCallback());
    result
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_POPUP);
    result.setDisplayState(state);
    result.setFlat(false);
    result.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        System.out.println(stamp() + ": Copy");
      }
    });
    return result;
View Full Code Here


    mainButton.setDisabledIcon(new FilteredResizableIcon(mainPasteIcon,
        new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY),
            null)));
    // mainButton.setMnemonic('P');
    mainButton.setExtraText("Extra for " + text.toLowerCase());
    mainButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        System.out.println("Action invoked");
      }
    });
    mainButton.setPopupCallback(new PopupPanelCallback() {
View Full Code Here

              for (AFreeplaneAction action : openActions) {
                String restoreable = (String) action.getValue(Action.DEFAULT);
                StringTokenizer tokens = new StringTokenizer(restoreable, ";");
                File file = lastOpenedList.createFileFromRestorable(tokens);
                JCommandButton menuButton = new JCommandButton(file.getName());
                menuButton.addActionListener(action);
                menuButton.setCommandButtonKind(CommandButtonKind.ACTION_ONLY);
                menuButton.setHorizontalAlignment(SwingUtilities.LEADING);
                menuButton.setPopupOrientationKind(CommandButtonPopupOrientationKind.SIDEWARD);
                menuButton.setEnabled(true);
                menuButton.setActionRichTooltip(new RichTooltip((String) action
View Full Code Here

    ResizableIcon icon = ActionUtils.getActionIcon(action);
   
    final JCommandButton button = new JCommandButton(title, icon);
   
    updateRichTooltip(button, action, null);
    button.addActionListener(new RibbonActionListener(action));
    button.setFocusable(false);
    return button;
  }
 
  public static JCommandToggleButton createCommandToggleButton(final AFreeplaneAction action) {
View Full Code Here

        configuracoesBand.setResizePolicies((List) Arrays.asList(
                new CoreRibbonResizePolicies.None(configuracoesBand.getControlPanel())));

        JCommandButton btnConfiguracoes = new JCommandButton(null, getResizableIconFromResource("settings.png"));
        btnConfiguracoes.setActionRichTooltip(new RichTooltip("Configurações", "Permite alterar as configurações do sistema"));
        btnConfiguracoes.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                ConfiguracoesView configuracoes = new ConfiguracoesView(null, true);
                configuracoes.setVisible(true);
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                desktop.tileFrames();
            }
        });

        btnCascata.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                desktop.cascadeFrames();
            }
View Full Code Here

                new CoreRibbonResizePolicies.None(janelaBand.getControlPanel()),
                new IconRibbonBandResizePolicy(janelaBand.getControlPanel())));

        JCommandButton btnManterModelos = new JCommandButton(null, getResizableIconFromResource("models.png"));

        btnManterModelos.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                mantemModelos();
            }
View Full Code Here

        Action a = actions.getAction(getString(name + ACTION_SUFFIX));
        if (a == null) {
          throw new MissingListenerException("", "Action", name
              + ACTION_SUFFIX);
        }
        b.addActionListener(a);
        b.setText(getString(name + TEXT_SUFFIX));
        if (a instanceof JComponentModifier) {
          ((JComponentModifier) a).addJComponent(b);
        }
      } catch (MissingResourceException e) {
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.