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

Java RichTooltip类代码示例

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

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



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

示例1: createResetModelBand

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private JRibbonBand createResetModelBand(boolean withSegmentation) {
    JRibbonBand modelResetBand = new JRibbonBand("Reset", null);

    JCommandButton buttonResetMainModel = new JCommandButton("Main Model", new EditClear3());
    RichTooltip richTooltipResetMainModel = new RichTooltip("Reset Main Model", "Reset the main model. Nested models like the segmentation model or exclusion model will still be valid and available.");
    richTooltipResetMainModel.addDescriptionSection("After a segmentation this can be used to train a cell classification model (then the nested segmentaiton model will still be active).");
    buttonResetMainModel.setActionRichTooltip(richTooltipResetMainModel);
    buttonResetMainModel.addActionListener(oia == null ? null : oia.resetMainModelActionListener);
    modelResetBand.addCommandButton(buttonResetMainModel, RibbonElementPriority.MEDIUM);

    if (withSegmentation) {
        modelResetBand.addCommandButton(createDeleteSegmentationModelButton(), RibbonElementPriority.MEDIUM);
        modelResetBand.addCommandButton(createDeleteSecondarySegmentationModelButton(), RibbonElementPriority.MEDIUM);
    }

    JCommandButton buttonResetEntireModel = new JCommandButton("Entire Model", new EditDelete3());
    RichTooltip richTooltipResetEntireModel = new RichTooltip("Reset Entire Model", "Reset the entire model. The complete model will be removed. Afterwards, you can start from scratch with a new model.");
    buttonResetEntireModel.setActionRichTooltip(richTooltipResetEntireModel);
    buttonResetEntireModel.addActionListener(oia == null ? null : oia.resetEntireModelActionListener);
    modelResetBand.addCommandButton(buttonResetEntireModel, RibbonElementPriority.MEDIUM);

    modelResetBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(modelResetBand.getControlPanel()),
            new CoreRibbonResizePolicies.Mirror(modelResetBand.getControlPanel()),
            new IconRibbonBandResizePolicy(modelResetBand.getControlPanel())));
    return modelResetBand;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:27,代码来源:OrbitMenu.java


示例2: addDrawButtons

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addDrawButtons(final JRibbonBand band, boolean ownBand) {
    JCommandButton buttonEraser = new JCommandButton("Eraser", new LmproulxEraser());
    buttonEraser.setActionRichTooltip(new RichTooltip("Eraser", "Click into a shape on an image to erase it."));
    buttonEraser.addActionListener(oia == null ? null : oia.deleteActionListener);
    band.addCommandButton(buttonEraser, RibbonElementPriority.TOP);

    JCommandButton buttonDrawPolygon = new JCommandButton("Polygon", new DrawPoly());
    makeMandatory(buttonDrawPolygon);
    buttonDrawPolygon.setActionRichTooltip(new RichTooltip("Polygon", "Draw a polygon. When you release the mouse button, the polygon will be closed."));
    buttonDrawPolygon.addActionListener(oia == null ? null : oia.brushActionListener);
    band.addCommandButton(buttonDrawPolygon, RibbonElementPriority.TOP);

    JCommandButton buttonDrawCircle = new JCommandButton("Circle", new DrawCircle());
    buttonDrawCircle.setActionRichTooltip(new RichTooltip("Circle", "Draw a circle. Use the mouse-wheel to adjust the size."));
    buttonDrawCircle.addActionListener(oia == null ? null : oia.circleActionListener);
    band.addCommandButton(buttonDrawCircle, ownBand ? RibbonElementPriority.MEDIUM : RibbonElementPriority.TOP);

    JCommandButton buttonDrawRectangle = new JCommandButton("Rectangle", new DrawRectangle());
    buttonDrawRectangle.setActionRichTooltip(new RichTooltip("Rectangle", "Draw a rectangle."));
    buttonDrawRectangle.addActionListener(oia == null ? null : oia.rectangleActionListener);
    band.addCommandButton(buttonDrawRectangle, ownBand ? RibbonElementPriority.MEDIUM : RibbonElementPriority.TOP);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:23,代码来源:OrbitMenu.java


示例3: addTrainClassifyButtons

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addTrainClassifyButtons(final JRibbonBand band) {
    JCommandButton buttonTrain = new JCommandButton("Train (F7)", new Training());
    makeMandatory(buttonTrain);
    RichTooltip richTooltipTrain = new RichTooltip("Train Model", "Train a model based on the class shapes drawn in the images.");
    richTooltipTrain.addDescriptionSection("The class shapes from all open images are taken into account.");
    buttonTrain.setActionRichTooltip(richTooltipTrain);
    buttonTrain.addActionListener(oia == null ? null : oia.trainActionListener);
    band.addCommandButton(buttonTrain, RibbonElementPriority.TOP);

    band.addCommandButton(createDefineROIButton(), RibbonElementPriority.TOP);

    JCommandButton buttonClassify = new JCommandButton("Classify (F8)", new ApplicationsGraphics2());
    makeMandatory(buttonClassify);
    RichTooltip richTooltipClassify = new RichTooltip("Classify Image", "Classify the active image based on a trained model.");
    richTooltipClassify.addDescriptionSection("If no ROI is active, the whole image will be classified, otherwise only the region inside the ROI.");
    richTooltipClassify.addDescriptionSection("A ROI can be defined with the ROI tool, annotations or an exclusion model.");
    richTooltipClassify.addDescriptionSection("Use the Batch menu to classify a set of images in batch mode.");
    buttonClassify.setActionRichTooltip(richTooltipClassify);
    buttonClassify.addActionListener(oia == null ? null : oia.classifyActionListener);
    buttonClassify.setBackground(Color.magenta);
    band.addCommandButton(buttonClassify, RibbonElementPriority.TOP);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:23,代码来源:OrbitMenu.java


示例4: createCommandButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的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


示例5: createPopupMenuPresenter

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的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


示例6: addEditTask

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addEditTask(final JRibbon ribbon) {

        JRibbonBand copyBand = new JRibbonBand("Copy", null);
        copyBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(copyBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mirror(copyBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mid2Low(copyBand.getControlPanel()),
                new IconRibbonBandResizePolicy(copyBand.getControlPanel())));

        JCommandButton buttonCopyImageCurrentView = new JCommandButton("Copy Image (Current View)", new EditCopy4());
        buttonCopyImageCurrentView.setActionRichTooltip(new RichTooltip("Copy Image (Current View)", "Copies the current view exactly as you see it in the image frame into the clipboard."));
        buttonCopyImageCurrentView.addActionListener(oia == null ? null : oia.copyImageCurrentViewActionHandler);
        copyBand.addCommandButton(buttonCopyImageCurrentView, RibbonElementPriority.TOP);


        JCommandButton buttonCopyOrbitLink = new JCommandButton("Copy Orbit Link", new EditCopy4());
        buttonCopyOrbitLink.setActionRichTooltip(new RichTooltip("Copy Orbit Link", "Copies a file with an Orbit link into the clipboard."));
        buttonCopyOrbitLink.addActionListener(oia == null ? null : oia.copyOrbitListActionHandler);
        copyBand.addCommandButton(buttonCopyOrbitLink, RibbonElementPriority.MEDIUM);

        JCommandButton buttonCopyImageFull = new JCommandButton("Copy Image (Full)", new EditCopy4());
        RichTooltip toolTip = new RichTooltip("Copy Image (Full)", "Copies the original full-size image (without markup) into the clipboard.");
        toolTip.addDescriptionSection("This only works for small images. For large images, please use Copy Image (Current View) instead.");
        buttonCopyImageFull.setActionRichTooltip(toolTip);
        buttonCopyImageFull.addActionListener(oia == null ? null : oia.copyImageFullActionHandler);
        copyBand.addCommandButton(buttonCopyImageFull, RibbonElementPriority.MEDIUM);


        JRibbonBand pasteBand = new JRibbonBand("Paste", null);
        JCommandButton buttonPaste = new JCommandButton("Paste", new EditPaste4());
        buttonPaste.setActionRichTooltip(new RichTooltip("Paste", "Inserts an image from the clipboard."));
        buttonPaste.addActionListener(oia == null ? null : oia.pasteActionHandler);
        pasteBand.addCommandButton(buttonPaste, RibbonElementPriority.TOP);
        pasteBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(pasteBand.getControlPanel())));

        RibbonTask editTask = new RibbonTask("Edit", copyBand, pasteBand);
        ribbon.addTask(editTask);

    }
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:39,代码来源:OrbitMenu.java


示例7: addExclusionParameterButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addExclusionParameterButton(JRibbonBand modelConfigureBand, RibbonElementPriority priority) {
    JCommandButton buttonConfigureExclusionParameters = new JCommandButton("Exclusion Model Level", new Configure4());
    RichTooltip richTooltipExclusion = new RichTooltip("Configure Exclusion Model Level", "Set the detail level used for the exclusion model.");
    richTooltipExclusion.addDescriptionSection("Set to 1 for a standard exclusion model. Set it to 2 for a more fine grained exclusion model. This can help to detect more details in the exclusion model, but has the drawback to be a more specific and less general exclusion model");
    richTooltipExclusion.addDescriptionSection("The fine grained model (2) is also much slower than the standard model (1).");
    buttonConfigureExclusionParameters.setActionRichTooltip(richTooltipExclusion);
    buttonConfigureExclusionParameters.addActionListener(oia == null ? null : oia.configureExclusionParametersActionListener);
    modelConfigureBand.addCommandButton(buttonConfigureExclusionParameters, priority);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:10,代码来源:OrbitMenu.java


示例8: createDeleteSecondarySegmentationModelButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private JCommandButton createDeleteSecondarySegmentationModelButton() {
    JCommandButton buttonResetSecondarySegmentationModel = new JCommandButton("Secondary Segmentation Model", new ClearSecSegModel());
    RichTooltip richTooltipResetSecondarySegmentationModel = new RichTooltip("Reset Secondary Segmentation Model", "Reset the secondary segmentation model.");
    richTooltipResetSecondarySegmentationModel.addDescriptionSection("The primary segmentation model will still be available. A new secondary segmentation model can be defined and set.");
    buttonResetSecondarySegmentationModel.setActionRichTooltip(richTooltipResetSecondarySegmentationModel);
    buttonResetSecondarySegmentationModel.addActionListener(oia == null ? null : oia.resetSecondarySegmentationModelActionListener);
    return buttonResetSecondarySegmentationModel;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:9,代码来源:OrbitMenu.java


示例9: createDeleteSegmentationModelButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private JCommandButton createDeleteSegmentationModelButton() {
    JCommandButton buttonResetSegmentationModel = new JCommandButton("Primary Segmentation Model", new EditDelete6());
    RichTooltip richTooltipResetSegmentationModel = new RichTooltip("Reset Segmentation Model", "Reset the segmentation model.");
    richTooltipResetSegmentationModel.addDescriptionSection("Remove the segmentation model. The main model will still be available.");
    richTooltipResetSegmentationModel.addDescriptionSection("An existing secondary segmentation model will not be removed.");
    buttonResetSegmentationModel.setActionRichTooltip(richTooltipResetSegmentationModel);
    buttonResetSegmentationModel.addActionListener(oia == null ? null : oia.resetSegmentationModelActionListener);
    return buttonResetSegmentationModel;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:10,代码来源:OrbitMenu.java


示例10: createDefineROIButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private JCommandButton createDefineROIButton() {
    JCommandButton buttonDefineRoi = new JCommandButton("Define ROI", new DrawRoi2());
    RichTooltip richTooltipDefineRoi = new RichTooltip("Define Region of Interest", "Draw a polygon to define the ROI for operations like classification or segmentation.");
    richTooltipDefineRoi.addDescriptionSection("Defines only a temporary ROI. For a permanent ROI please use annotations, which are stored in the database.");
    richTooltipDefineRoi.addDescriptionSection("Use the ROI menu for more options, e.g. invert or reset the ROI.");
    buttonDefineRoi.setActionRichTooltip(richTooltipDefineRoi);
    buttonDefineRoi.addActionListener(oia == null ? null : oia.selectROIActionListener);
    return buttonDefineRoi;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:10,代码来源:OrbitMenu.java


示例11: createStructureRibbonBand

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
/**
 * Initialise the structure selection ribbon band.
 * 
 * @return
 */
public JRibbonBand createStructureRibbonBand() {
	structureSelectionBand = new JRibbonBand(
			STRUCTURE_GALLERY_NAME,
			new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
					10));

	ArrayList<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
	resizePolicies.add(new CoreRibbonResizePolicies.Mirror(
			structureSelectionBand.getControlPanel()));
	resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(
			structureSelectionBand.getControlPanel()));
	resizePolicies.add(new IconRibbonBandResizePolicy(
			structureSelectionBand.getControlPanel()));

	structureSelectionBand.setResizePolicies(resizePolicies);

	updateStructureRibbonGallery(STRUCTURE_GALLERY_NAME,
			structureSelectionBand);

	structureSelectionBand.addCommandButton(theActionManager.get(
			"addstructurestr").getJCommandButton(ICON_SIZE.L3, "Write",
			this, new RichTooltip(" ", "Import structure from string")),
			RibbonElementPriority.TOP);

	structureSelectionBand.addCommandButton(theActionManager.get(
			"addcomposition").getJCommandButton(ICON_SIZE.L3,
			"Create composition", this, new RichTooltip("Open", " ")),
			RibbonElementPriority.TOP);

	return structureSelectionBand;
}
 
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:37,代码来源:GlycanCanvas.java


示例12: addAppMenu

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private static void addAppMenu(JRibbon ribbon) {
    RibbonAppMenuProvider appMenuProvider = RibbonAppMenuProvider.getDefault();
    RibbonApplicationMenu appMenu = appMenuProvider.createApplicationMenu();
    if (appMenu != null) {
        ribbon.setApplicationMenu(appMenu);
    }
    RichTooltip appMenuTooltip = appMenuProvider.createApplicationMenuTooltip();
    if (appMenuTooltip != null) {
        ribbon.setApplicationMenuRichTooltip(appMenuTooltip);
    }
}
 
开发者ID:Alidron,项目名称:designer,代码行数:12,代码来源:LayerRibbonComponentProvider.java


示例13: createTooltip

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
public RichTooltip createTooltip() {
    String body = (String) getValue(TOOLTIP_BODY);
    if (body == null) {
        body = (String) getValue(Action.LONG_DESCRIPTION);
    }
    if (body == null) {
        body = getDescription();
    }
    if (body == null) {
        return null;
    }

    String title = (String) getValue(TOOLTIP_TITLE);
    if (title == null) {
        title = getText();
    }

    RichTooltip tooltip = new RichTooltip(title, body);

    String titleIcon = (String) getValue(TOOLTIP_ICON);
    if (titleIcon != null) {
        tooltip.setMainImage(ImageUtilities.loadImage(titleIcon));
    } else {
        tooltip.setMainImage(getLargeImage());
    }

    String footer = (String) getValue(TOOLTIP_FOOTER);
    if (footer != null) {
        tooltip.addFooterSection(footer);
        String footerIcon = (String) getValue(TOOLTIP_FOOTER_ICON);
        if (footerIcon != null) {
            tooltip.setFooterImage(ImageUtilities.loadImage(footerIcon));
        }
    }
    return tooltip;
}
 
开发者ID:Alidron,项目名称:designer,代码行数:37,代码来源:ActionItem.java


示例14: createApplicationMenuTooltip

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
public RichTooltip createApplicationMenuTooltip() {
    RichTooltip tooltip = new RichTooltip();
    tooltip.setTitle(NbBundle.getMessage(LayerRibbonAppMenuProvider.class, "LBL_AppMenuTitle"));// NOI18N
    tooltip.addDescriptionSection(NbBundle.getMessage(LayerRibbonAppMenuProvider.class, "HINT_AppMenu"));// NOI18N
    tooltip.setMainImage(ImageUtilities.loadImage("com/pinkmatter/modules/flamingo/app-menu.png", true));// NOI18N
    tooltip.setFooterImage(ImageUtilities.loadImage("com/pinkmatter/modules/flamingo/help.png", true));// NOI18N
    tooltip.addFooterSection(NbBundle.getMessage(LayerRibbonAppMenuProvider.class, "HINT_AppMenuHelp"));// NOI18N
    return tooltip;
}
 
开发者ID:Alidron,项目名称:designer,代码行数:10,代码来源:RibbonAppMenuProvider.java


示例15: BoundMenuCommandButton

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

    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();
            }
            if (Action.SHORT_DESCRIPTION.equals(evt.getPropertyName())) {
                updateTooltip();
            }
        }
    };

    action.addPropertyChangeListener(l);

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


示例16: createApplicationMenuTooltip

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
public RichTooltip createApplicationMenuTooltip() {
    RichTooltip tooltip = new RichTooltip();
    tooltip.setTitle(Bundle.LBL_AppMenuTitle());
    tooltip.addDescriptionSection(Bundle.Hint_AppMenu());
    tooltip.addFooterSection(Bundle.Hint_AppMenuHelp());
    tooltip.setMainImage(ImageUtilities.loadImage(APP_IMG, true));
    tooltip.setFooterImage(ImageUtilities.loadImage(HELP_IMG, true));
    return tooltip;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:10,代码来源:RibbonAppMenuProvider.java


示例17: addImageTask

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的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


示例18: addROITask

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addROITask(final JRibbon ribbon) {

        JRibbonBand roiBand = new JRibbonBand("Region Of Interest", null);
        roiBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(roiBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mid2Low(roiBand.getControlPanel()),
                new IconRibbonBandResizePolicy(roiBand.getControlPanel())));

        roiBand.addCommandButton(createDefineROIButton(), RibbonElementPriority.TOP);

        JCommandButton buttonResetRoi = new JCommandButton("Reset", new EditClear3());
        RichTooltip richTooltipResetRoi = new RichTooltip("Reset Region of Interest", "Reset the temporary ROI.");
        richTooltipResetRoi.addDescriptionSection("After resetting the ROI either the whole image is taken into account, or the ROI defined by annotations (if available).");
        buttonResetRoi.setActionRichTooltip(richTooltipResetRoi);
        buttonResetRoi.addActionListener(oia == null ? null : oia.resetROIActionListener);
        roiBand.addCommandButton(buttonResetRoi, RibbonElementPriority.TOP);

        JCommandButton buttonInvertRoi = new JCommandButton("Invert", new DrawRoi2Inverted());
        RichTooltip richTooltipInvertRoi = new RichTooltip("Invert Region of Interest", "Invert the temporary ROI.");
        richTooltipInvertRoi.addDescriptionSection("Inside and outside of ROI are switched afterwards.");
        buttonInvertRoi.setActionRichTooltip(richTooltipInvertRoi);
        buttonInvertRoi.addActionListener(oia == null ? null : oia.invertROIActionListener);
        roiBand.addCommandButton(buttonInvertRoi, RibbonElementPriority.MEDIUM);

        JCommandButton buttomComputeRoi = new JCommandButton("Measure Area", new Lineal());
        RichTooltip richTooltipComputeRoi = new RichTooltip("Measure ROI Area", "Measure the area of the ROI (ROI + exclusion model). ");
        richTooltipComputeRoi.addDescriptionSection("If an exclusion model is active, it will be taken into account as well.");
        buttomComputeRoi.setActionRichTooltip(richTooltipComputeRoi);
        buttomComputeRoi.addActionListener(oia == null ? null : oia.computeROIAreaActionListener);
        roiBand.addCommandButton(buttomComputeRoi, RibbonElementPriority.MEDIUM);


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

        JCommandButton buttonSegmentationRoi = new JCommandButton("Segmentation as ROI", new Segmentation());
        RichTooltip richTooltipSegmentationRoi = new RichTooltip("Segmentation as ROI", "Use segmentation result as ROI.");
        buttonSegmentationRoi.setActionRichTooltip(richTooltipSegmentationRoi);
        buttonSegmentationRoi.addActionListener(oia == null ? null : oia.segmentationROIActionListener);
        specialBand.addCommandButton(buttonSegmentationRoi, RibbonElementPriority.MEDIUM);

        RibbonTask roiTask = new RibbonTask("ROI", roiBand, specialBand);
        ribbon.addTask(roiTask);
    }
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:45,代码来源:OrbitMenu.java


示例19: createExclusionTask

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private RibbonTask createExclusionTask() {

        ExclusionModule em = oia == null ? new ExclusionModule() : oia.getExclusionModule();

        JRibbonBand setupBand = new JRibbonBand("Setup", null);
        setupBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(setupBand.getControlPanel())));

        JCommandButton buttonSetupClasses = new JCommandButton(em.getBtnSetupClasses().getText(), new SystemRun5());
        makeMandatory(buttonSetupClasses);
        RichTooltip richTooltipSetupClasses = new RichTooltip("Setup Classes", "Configure two exclusion and two inclusion classes. Further classes can be added later via 'Class Configuration'.");
        buttonSetupClasses.addActionListener(oia == null ? null : em.getBtnSetupClasses().getActionListeners()[0]);
        buttonSetupClasses.setActionRichTooltip(richTooltipSetupClasses);
        setupBand.addCommandButton(buttonSetupClasses, RibbonElementPriority.MEDIUM);


        JRibbonBand exclusionBand = new JRibbonBand("Exclusion", null);
        exclusionBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(exclusionBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mirror(exclusionBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mid2Low(exclusionBand.getControlPanel()),
                new IconRibbonBandResizePolicy(exclusionBand.getControlPanel())));

        JCommandButton buttonConfigureClasses = new JCommandButton(em.getBtnConfigureClasses().getText(), new Configure4());
        RichTooltip richTooltipConfigureClasses = new RichTooltip("Configure Classes", "Define the exclusion and inclusion classes.");
        richTooltipConfigureClasses.addDescriptionSection("Use the dropdown menu in the dialog to set each class as exclusion or inclusion class. You can define any number of classes you want to specify.");
        buttonConfigureClasses.addActionListener(oia == null ? null : em.getBtnConfigureClasses().getActionListeners()[0]);
        buttonConfigureClasses.setActionRichTooltip(richTooltipConfigureClasses);
        exclusionBand.addCommandButton(buttonConfigureClasses, RibbonElementPriority.MEDIUM);

        addExclusionParameterButton(exclusionBand, RibbonElementPriority.MEDIUM);

        JCommandButton buttonTrainSetClassify = new JCommandButton(em.getBtnTrain().getText(), new TrainSetClassify());
        makeMandatory(buttonTrainSetClassify);
        RichTooltip richTooltipTrainSetClassify = new RichTooltip("Train, Set and Classify", "Train an exclusion model based on the class shapes, set it as active exclusion model and classify the active image.");
        richTooltipTrainSetClassify.addDescriptionSection("The training regions can be defined in several open images. After this step, the main model can be removed (Model->Remove Main Model) to continue with a new main model (detail classification).");
        buttonTrainSetClassify.addActionListener(oia == null ? null : em.getBtnTrain().getActionListeners()[0]);
        buttonTrainSetClassify.setActionRichTooltip(richTooltipTrainSetClassify);
        buttonTrainSetClassify.setBackground(Color.magenta);
        exclusionBand.addCommandButton(buttonTrainSetClassify, RibbonElementPriority.TOP);

        JCommandButton buttonLoadAndSet = new JCommandButton(ExclusionModule.btnLoadTextLocal, new DocumentOpen5());
        RichTooltip richTooltipLoadAndSet = new RichTooltip(ExclusionModule.btnLoadTextLocal, "Load an existing exclusion model and set it active.");
        richTooltipLoadAndSet.addDescriptionSection("This function can be used to combine a currently active main model (e.g. detail classification) with an existing exclusion model (which has already been saved to file via 'save nested exclusion model').");
        buttonLoadAndSet.addActionListener(oia == null ? null : em.getBtnLoad().getActionListeners()[0]);
        buttonLoadAndSet.setActionRichTooltip(richTooltipLoadAndSet);
        exclusionBand.addCommandButton(buttonLoadAndSet, RibbonElementPriority.MEDIUM);

        RichTooltip richTooltipLoadAndSetServer = new RichTooltip(ExclusionModule.btnLoadTextServer, "Load an existing exclusion model and set it active.");
        richTooltipLoadAndSetServer.addDescriptionSection("This function can be used to combine a currently active main model (e.g. detail classification) with an existing exclusion model (which has already been saved to file via 'save nested exclusion model').");
        buttonLoadAndSetServer.addActionListener(oia == null ? null : em.getBtnLoadServer().getActionListeners()[0]);
        buttonLoadAndSetServer.setActionRichTooltip(richTooltipLoadAndSetServer);
        exclusionBand.addCommandButton(buttonLoadAndSetServer, RibbonElementPriority.MEDIUM);


        JCommandButton buttonClassify = new JCommandButton(em.getBtnClassify().getText(), new ApplicationsGraphics2());
        RichTooltip richTooltipClassify = new RichTooltip("Classify Trained Exclusion Model", "Classify active image using the already trained exclusion model.");
        richTooltipClassify.addDescriptionSection("After training or loading an exclusion model this function can be used to classify further images.");
        buttonClassify.addActionListener(oia == null ? null : em.getBtnClassify().getActionListeners()[0]);
        buttonClassify.setActionRichTooltip(richTooltipClassify);
        buttonClassify.setBackground(Color.magenta);
        exclusionBand.addCommandButton(buttonClassify, RibbonElementPriority.TOP);

        JCommandButton buttonReset = new JCommandButton(em.getBtnReset().getText(), new EditDelete6());
        RichTooltip richTooltipReset = new RichTooltip("Reset Exclusion Model", "Reset the currently active exclusion model. As result the main model has no nested exclusion model.");
        buttonReset.addActionListener(oia == null ? null : em.getBtnReset().getActionListeners()[0]);
        buttonReset.setActionRichTooltip(richTooltipReset);
        exclusionBand.addCommandButton(buttonReset, RibbonElementPriority.MEDIUM);

        JCommandButton buttonHelp = new JCommandButton(em.getBtnHelp().getText(), new SystemHelp3());
        RichTooltip richTooltipHelp = new RichTooltip("Help (Exclusion Model)", "Open the help text for exclusion models.");
        buttonHelp.addActionListener(oia == null ? null : em.getBtnHelp().getActionListeners()[0]);
        buttonHelp.setActionRichTooltip(richTooltipHelp);
        exclusionBand.addCommandButton(buttonHelp, RibbonElementPriority.MEDIUM);


        RibbonTask objectsTask = new RibbonTask("Exclusion Model", setupBand, createDrawBand(), exclusionBand);
        return objectsTask;

    }
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:79,代码来源:OrbitMenu.java


示例20: addBatchTask

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入依赖的package包/类
private void addBatchTask(final JRibbon ribbon) {

        JRibbonBand batchExecuteBand = new JRibbonBand("Batch Execute", null);
        batchExecuteBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(batchExecuteBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mirror(batchExecuteBand.getControlPanel()),
                new CoreRibbonResizePolicies.Mid2Low(batchExecuteBand.getControlPanel()),
                new IconRibbonBandResizePolicy(batchExecuteBand.getControlPanel())));

        JCommandButton buttonExecuteLocal = new JCommandButton("Local Execution", new SystemRun3());
        RichTooltip richTooltipExecuteLocal = new RichTooltip("Local Batch Execution", "Schedule a batch execution on the local computer.");
        buttonExecuteLocal.setActionRichTooltip(richTooltipExecuteL 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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