Package org.pushingpixels.flamingo.api.common

Examples of org.pushingpixels.flamingo.api.common.JCommandButton$DefaultPopupButtonModel


  private static void apply(Container cont, Command cmd) {
    for (int i = 0; i < cont.getComponentCount(); i++) {
      Component comp = cont.getComponent(i);
      if (comp instanceof JCommandButton) {
        JCommandButton cb = (JCommandButton) comp;
        cmd.apply(cb);
      }
      if (comp instanceof Container) {
        apply((Container) comp, cmd);
      }
View Full Code Here


  private static void apply(Container cont, Command cmd) {
    for (int i = 0; i < cont.getComponentCount(); i++) {
      Component comp = cont.getComponent(i);
      if (comp instanceof JCommandButton) {
        JCommandButton cb = (JCommandButton) comp;
        cmd.apply(cb);
      }
      if (comp instanceof Container) {
        apply((Container) comp, cmd);
      }
View Full Code Here

      try {
        FileInputStream fis = new FileInputStream(
            "C:/jtools/tango-icon-theme-0.8.0/scalable/actions/edit-paste.svg");
        SvgBatikResizableIcon icon = SvgBatikResizableIcon.getSvgIcon(
            fis, new Dimension(32, 32));
        iconButton = new JCommandButton("just icon", icon);
        iconButton.setDisplayState(CommandButtonDisplayState.BIG);
        add(iconButton);
      } catch (IOException ioe) {
        ioe.printStackTrace();
      }
View Full Code Here

import test.svg.transcoded.*;

public class TestCommandButtonsNoText extends TestCommandButtons {
  @Override
  protected JCommandButton createActionButton(CommandButtonDisplayState state) {
    JCommandButton result = new JCommandButton(new edit_paste());
    result.setDisabledIcon(new FilteredResizableIcon(new edit_paste(),
        new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY),
            null)));
    result.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        System.out.println(stamp() + ": Main paste");
      }
    });
    result
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_ONLY);
    result.setDisplayState(state);
    result.setFlat(false);
    return result;
  }
View Full Code Here

  }

  @Override
  protected JCommandButton createActionAndPopupMainActionButton(
      CommandButtonDisplayState state) {
    JCommandButton result = new JCommandButton(new edit_cut());
    result.setPopupCallback(new TestPopupCallback());
    result
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
    result.setDisplayState(state);
    result.setFlat(false);
    result.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        System.out.println(stamp() + ": Cut");
      }
    });
    return result;
View Full Code Here

      try {
        FileInputStream fis = new FileInputStream(
            "C:/JTools/icons/oxygen/categories/applications-accessories.svgz");
        SvgBatikResizableIcon icon = SvgBatikResizableIcon.getSvgzIcon(
            fis, new Dimension(32, 32));
        iconButton = new JCommandButton("just icon", icon);
        iconButton.setDisplayState(CommandButtonDisplayState.BIG);
        add(iconButton);
      } catch (IOException ioe) {
        ioe.printStackTrace();
      }
View Full Code Here

  }

  @Override
  protected JCommandButton createActionAndPopupMainPopupButton(
      CommandButtonDisplayState state) {
    JCommandButton result = new JCommandButton(new edit_copy());
    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

    return result;
  }

  @Override
  protected JCommandButton createPopupButton(CommandButtonDisplayState state) {
    JCommandButton result = new JCommandButton(new edit_select_all());
    result.setPopupCallback(new TestPopupCallback());
    result
        .setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);
    result.setDisplayState(state);
    result.setFlat(false);
    return result;
  }
View Full Code Here

  private static void apply(Container cont, Command cmd) {
    for (int i = 0; i < cont.getComponentCount(); i++) {
      Component comp = cont.getComponent(i);
      if (comp instanceof JCommandButton) {
        JCommandButton cb = (JCommandButton) comp;
        cmd.apply(cb);
      }
      if (comp instanceof Container) {
        apply((Container) comp, cmd);
      }
View Full Code Here

  private JCommandButtonStrip getStrip1(double hgapScaleFactor,
      double vgapScaleFactor) {
    JCommandButtonStrip buttonStrip = new JCommandButtonStrip();
    buttonStrip.setHGapScaleFactor(hgapScaleFactor);
    buttonStrip.setVGapScaleFactor(vgapScaleFactor);
    buttonStrip.add(new JCommandButton("", new format_justify_left()));
    buttonStrip.add(new JCommandButton("", new format_justify_center()));
    buttonStrip.add(new JCommandButton("", new format_justify_right()));
    return buttonStrip;
  }
View Full Code Here

TOP

Related Classes of org.pushingpixels.flamingo.api.common.JCommandButton$DefaultPopupButtonModel

Copyright © 2018 www.massapicom. 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.