• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PopupPanelCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback的典型用法代码示例。如果您正苦于以下问题:Java PopupPanelCallback类的具体用法?Java PopupPanelCallback怎么用?Java PopupPanelCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PopupPanelCallback类属于org.pushingpixels.flamingo.api.common.popup包,在下文中一共展示了PopupPanelCallback类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getHomeEditBand

import org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback; //导入依赖的package包/类
/**
 * this method to Create The EditBand and return it to add in the Ribbon
 *
 * @return
 */
public JRibbonBand getHomeEditBand() {
    JRibbonBand Edit = new JRibbonBand("Edit", null);
    Button.EditText = new JCommandButton("Edit"
            + " Text", getResizableIconFromResource(new ImageIcon("/images/JPG48.png").toString()));
    Button.EditText.setEnabled(false);
    Button.EditObject = new JCommandButton("Edit"
            + " Object", getResizableIconFromResource(new ImageIcon("/images/GIF48.png").toString()));
    Button.EditObject.setEnabled(false);
    Button.EditObject.setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);
    Button.EditObject.setPopupCallback(new PopupPanelCallback() {
        public JPopupPanel getPopupPanel(JCommandButton commandButton) {
            JPopupPanel pan = new JPopupPanel() {
            };
            pan.setBackground(Color.WHITE);
            return pan;
        }
    });
    Edit.addCommandButton(Button.EditText, RibbonElementPriority.TOP);
    Edit.addCommandButton(Button.EditObject, RibbonElementPriority.TOP);
    List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
    resizePolicies.add(new CoreRibbonResizePolicies.Mirror(Edit.getControlPanel()));
    Edit.setResizePolicies(resizePolicies);
    return Edit;
}
 
开发者ID:DJVUpp,项目名称:Desktop,代码行数:30,代码来源:DjvuComponents.java


示例2: createCommandButton

import org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback; //导入依赖的package包/类
private AbstractCommandButton createCommandButton(ActionItem item) {
    //TODO
    //button.setDisabledIcon(disabledIcon);
    ActionCommandButton button = new ActionCommandButton(item.getActionDelegate().getIcon(),
            item.getActionDelegate().getText(), item.getActionDelegate().getAction(), getButtonKind(item));
    RichTooltip toolTip = item.getActionDelegate().createTooltip();
    button.setActionRichTooltip(toolTip);
    if (item.hasChildren()) {
        //TODO differentiate between the two
        //button.setPopupRichTooltip(tooltip);
        final JCommandPopupMenu menu = createPopupMenu(item.getChildren());
        button.setPopupCallback(new PopupPanelCallback() {

            @Override
            public JPopupPanel getPopupPanel(JCommandButton commandButton) {
                return menu;
            }
        });
    }
    return button;
}
 
开发者ID:Alidron,项目名称:designer,代码行数:22,代码来源:RibbonComponentFactory.java


示例3: createPopupMenuPresenter

import org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback; //导入依赖的package包/类
public JCommandMenuButton createPopupMenuPresenter(ActionItem item) {
    //TODO orientation of popup
    ActionMenuButton button = new ActionMenuButton(item.getIcon(),
            item.getText(), item.getAction(), getButtonKind(item));
    RichTooltip toolTip = item.createTooltip();
    button.setActionRichTooltip(toolTip);
    if (item.hasChildren()) {
        //TODO differentiate between the two
        //button.setPopupRichTooltip(tooltip);
        final JCommandPopupMenu menu = createPopupMenu(item.getChildren());
        button.setPopupCallback(new PopupPanelCallback() {

            @Override
            public JPopupPanel getPopupPanel(JCommandButton commandButton) {
                return menu;
            }
        });
    }
    return button;
}
 
开发者ID:Alidron,项目名称:designer,代码行数:21,代码来源:RibbonComponentFactory.java


示例4: addImageTask

import org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback; //导入依赖的package包/类
private void addImageTask(final JRibbon ribbon) {
    JRibbonBand imageBandOpen = new JRibbonBand("Open Image", null);
    imageBandOpen.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(imageBandOpen.getControlPanel())));

    buttonopenFromOrbit.setActionRichTooltip(new RichTooltip("Open Image", "Open an image from image serve or local file system."));
    buttonopenFromOrbit.addActionListener(oia == null ? null : oia.openFileOrbitActionListener);
    imageBandOpen.addCommandButton(buttonopenFromOrbit, RibbonElementPriority.TOP);

    JRibbonBand imageBandOpenSpecial = new JRibbonBand("Open Special", null);
    imageBandOpenSpecial.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(imageBandOpenSpecial.getControlPanel())));


    JCommandButton buttonImg1 = new JCommandButton("View Overview (CTRL-O)", new SlidepreviewNoLoupe6());
    buttonImg1.setActionRichTooltip(new RichTooltip("View Overview", "Load the whole-slide overview. Only available if the image stems from a whole slide scanner."));
    buttonImg1.addActionListener(oia == null ? null : oia.loadOverviewActionListener);
    imageBandOpenSpecial.addCommandButton(buttonImg1, RibbonElementPriority.TOP);

    JCommandButton buttonImg2 = new JCommandButton("Open Spot Detection", new DocumentOpen5());
    buttonImg2.setActionRichTooltip(new RichTooltip("Load Image for TMA Spot Detection", "Load a special resolution image on which the TMA spot detection can be performed."));
    buttonImg2.addActionListener(oia == null ? null : oia.loadTMAThumbnailActionListener);
    imageBandOpenSpecial.addCommandButton(buttonImg2, RibbonElementPriority.TOP);

    JCommandButton buttonImg3 = new JCommandButton("Open Resolution for Printing", new DocumentOpen5());
    buttonImg3.setActionRichTooltip(new RichTooltip("Load Printing Resolution", "Load a medium size resolution which is suitable for printing."));
    buttonImg3.addActionListener(oia == null ? null : oia.loadMediumResolutionActionListener);
    imageBandOpenSpecial.addCommandButton(buttonImg3, RibbonElementPriority.TOP);


    JCommandButton buttonImgSpecialResolution = new JCommandButton("Open Special Resolution", new DocumentOpen5());
    RichTooltip richTooltipSpecialResolution = new RichTooltip("Load Special Resolution", "Load a special resolution of the image.");
    richTooltipSpecialResolution.addDescriptionSection("Each successor resolution has half the size in each dimension as the parent resolution.");
    buttonImgSpecialResolution.setActionRichTooltip(richTooltipSpecialResolution);
    imageBandOpenSpecial.addCommandButton(buttonImgSpecialResolution, RibbonElementPriority.TOP);
    buttonImgSpecialResolution.setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);

    buttonImgSpecialResolution.setPopupCallback(new PopupPanelCallback() {
        @Override
        public JPopupPanel getPopupPanel(JCommandButton jCommandButton) {
            return getSpecialResolutionPopupPanel();
        }
    });


    // save as .orbit
    JRibbonBand saveAsOrbitBand = new JRibbonBand("Save", null);
    saveAsOrbitBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(saveAsOrbitBand.getControlPanel())));
    JCommandButton buttonSaveAsOrbit = new JCommandButton("Save image links as .orbit", new DocumentSaveAs3());
    RichTooltip richTooltipSaveAsOrbit = new RichTooltip("Save image links as .orbit", "Saves all open images as links in a .orbit file.");
    richTooltipSaveAsOrbit.addDescriptionSection("Can be used to save or email an interesting image set.");
    buttonSaveAsOrbit.setActionRichTooltip(richTooltipSaveAsOrbit);
    buttonSaveAsOrbit.addActionListener(oia == null ? null : oia.saveAsOrbitActionListener);
    saveAsOrbitBand.addCommandButton(buttonSaveAsOrbit, RibbonElementPriority.TOP);

    JRibbonBand switchImageProviderBand = getSwitchImageProviderBand();

    RibbonTask imageTask = new RibbonTask("Image", imageBandOpen, imageBandOpenSpecial, saveAsOrbitBand, switchImageProviderBand);
    ribbon.addTask(imageTask);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:59,代码来源:OrbitMenu.java


示例5: BoundCommandButton

import org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback; //导入依赖的package包/类
public BoundCommandButton(CommandButtonKind kind, String text, String description, ResizableIcon icon,
                          ResizableIcon disabledIcon, Action mainAction, Action... extraActions) {
    super(text, icon);
    this.mainAction = mainAction;
    this.extraActions = extraActions;
    setCommandButtonKind(kind);
    setDisabledIcon(disabledIcon);
    addActionListener(mainAction);

    RichTooltip tooltip = new RichTooltip();
    tooltip.setTitle(getText());
    tooltip.addDescriptionSection(description == null || description.length() == 0 ? " " : description);
    setActionRichTooltip(tooltip);
    setPopupRichTooltip(tooltip);

    PropertyChangeListener l = new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if ("enabled".equals(evt.getPropertyName())) {
                updateState();
            }
        }
    };

    mainAction.addPropertyChangeListener(l);
    if (extraActions.length > 0) {
        final JCommandPopupMenu menu = new JCommandPopupMenu();

        for (Action extraAction : extraActions) {
            menu.addMenuButton(new BoundMenuCommandButton(extraAction));
            if (extraAction != mainAction) {
                extraAction.addPropertyChangeListener(l);
            }
        }
        setPopupCallback(new PopupPanelCallback() {
            @Override
            public JPopupPanel getPopupPanel(JCommandButton commandButton) {
                return menu;
            }
        });
    }

    updateState();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:45,代码来源:BoundCommandButton.java



注:本文中的org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MustacheEngine类代码示例发布时间:2022-05-23
下一篇:
Java ProductFilter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap