Package test.common

Examples of test.common.SamplePopupMenu


      }
    });
    mainButton.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
    });
    mainButton
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
    RichTooltip mainRichTooltip = new RichTooltip();
    mainRichTooltip.setTitle("Paste");
    mainRichTooltip
        .addDescriptionSection("Paste the contents of the Clipboard");
    mainButton.setActionRichTooltip(mainRichTooltip);
    mainButton.setPopupKeyTip("V");

    RichTooltip mainPopupRichTooltip = new RichTooltip();
    mainPopupRichTooltip.setTitle("Paste");
    mainPopupRichTooltip
        .addDescriptionSection("Click here for more options such as pasting only the values or formatting");
    mainButton.setPopupRichTooltip(mainPopupRichTooltip);

    clipboardBand.addCommandButton(mainButton, RibbonElementPriority.TOP);

    JCommandButton cutButton = new JCommandButton("Cut", new edit_cut());
    cutButton.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
    });
    cutButton
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
    RichTooltip cutRichTooltip = new RichTooltip();
    cutRichTooltip.setTitle("Cut");
    cutRichTooltip
        .addDescriptionSection("Cut the selection from the document and put it on the Clipboard");
    cutButton.setActionRichTooltip(cutRichTooltip);
    cutButton.setPopupKeyTip("X");

    clipboardBand.addCommandButton(cutButton, RibbonElementPriority.MEDIUM);

    JCommandButton copyButton = new JCommandButton("Copy", new edit_copy());
    copyButton.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
    });
    copyButton
        .setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_POPUP);
View Full Code Here

TOP

Related Classes of test.common.SamplePopupMenu

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.