当前位置: 首页>>代码示例>>Java>>正文


Java RichTooltip.addDescriptionSection方法代码示例

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


在下文中一共展示了RichTooltip.addDescriptionSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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(richTooltipExecuteLocal);
        buttonExecuteLocal.addActionListener(oia == null ? null : oia.batchExportLocalActionListener);
        batchExecuteBand.addCommandButton(buttonExecuteLocal, RibbonElementPriority.TOP);

        RichTooltip richTooltipExecuteGrid = new RichTooltip("Scaleout (Grid/Cluster) Batch Execution", "Schedule a batch execution using a scaleout infrastructure.");
        richTooltipExecuteGrid.addDescriptionSection("Compared to the local execution this execution method has more overhead, but runs in parallel in a distributed environment.");
        richTooltipExecuteGrid.addDescriptionSection("Use it if you have many or very big (e.g. slides) image to analyze.");
        buttonExecuteScaleout.setActionRichTooltip(richTooltipExecuteGrid);
        buttonExecuteScaleout.addActionListener(oia == null ? null : oia.batchExportScaleoutActionListener);
        batchExecuteBand.addCommandButton(buttonExecuteScaleout, RibbonElementPriority.TOP);

        JCommandButton buttonBatchROIAreas = new JCommandButton("ROI Area Computation", new Lineal());
        RichTooltip richTooltipBatchRoiAreas = new RichTooltip("Batch ROI Area computation", "Compute the ROI areas for a set im images.");
        richTooltipBatchRoiAreas.addDescriptionSection("The computation is performed on the local computer.");
        buttonBatchROIAreas.setActionRichTooltip(richTooltipBatchRoiAreas);
        buttonBatchROIAreas.addActionListener(oia == null ? null : oia.roiAreasBatchExportActionListener);
        batchExecuteBand.addCommandButton(buttonBatchROIAreas, RibbonElementPriority.MEDIUM);

        RichTooltip richTooltipRetrieveExistingResults = new RichTooltip("Retrieve Existing Results", "Display existing results form current and previous batch jobs running on the grid.");
        richTooltipRetrieveExistingResults.addDescriptionSection("This function can be used to retrieve results if you closed the program after scheduling a grid batch execution.");
        buttonRetrieveExistingResults.setActionRichTooltip(richTooltipRetrieveExistingResults);
        buttonRetrieveExistingResults.addActionListener(oia == null ? null : oia.retrieveExistingResultsActionListener);
        batchExecuteBand.addCommandButton(buttonRetrieveExistingResults, RibbonElementPriority.MEDIUM);


        //JRibbonBand switchImageProviderBand = getSwitchImageProviderBand();

        RibbonTask objectsTask = new RibbonTask("Batch", batchExecuteBand);
        ribbon.addTask(objectsTask);

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

示例15: getJCommandButton

import org.pushingpixels.flamingo.api.common.RichTooltip; //导入方法依赖的package包/类
public JCommandButton getJCommandButton(ICON_SIZE iconSize,String label,ActionListener listener,RichTooltip alt,boolean showIcon){
	JCommandButtonAction jCommandButton;
	
		if(iconSize==null){
			if(showIcon){
				jCommandButton=new JCommandButtonAction(label, this.getEurocarbIcon().getResizableIcon());
			}else{
				jCommandButton=new JCommandButtonAction(label);
			}
			
			jCommandButton.setActionCommand(this.getActionCommand());
			
		}else{
			if(showIcon){
				jCommandButton=new JCommandButtonAction(label, this.getResizableIcon(iconSize));
			}else{
				jCommandButton=new JCommandButtonAction(label);
			}
			
			jCommandButton.setActionCommand(this.getActionCommand());
			//jCommandButton.setActionRichTooltip(alt);
		}
		
		RichTooltip altNew=new RichTooltip();
		
		if(alt==null){
			if(getValue(Action.SHORT_DESCRIPTION)!=null){		
				String name=(String)getValue(Action.NAME);
				if(name==null){
					name=" ";
				}
				altNew.setTitle(name);
			}
		}else{
			altNew.setTitle(alt.getTitle());
			for(String line:altNew.getDescriptionSections()){
				if(!line.matches("^\\\\s+$")){
					altNew.addDescriptionSection(line);
				}
			}
		}
		
		KeyStroke keyStroke=(KeyStroke)getValue(Action.ACCELERATOR_KEY);
		if(keyStroke!=null){
			String keyStrokeString=keyStroke.toString();
			keyStrokeString=keyStrokeString.replace("pressed", "+");
			altNew.addDescriptionSection(keyStrokeString);
		}
		
		jCommandButton.setActionRichTooltip(altNew);
		
		if(listener!=null){
			jCommandButton.addActionListener(listener);
		}
		this.enableAwareObjects.add(jCommandButton);
		
		jCommandButton.registerKeyboardAction(this, "lineup", (KeyStroke)getValue(Action.ACCELERATOR_KEY),
                JComponent.WHEN_IN_FOCUSED_WINDOW);
		
		return jCommandButton;
}
 
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:62,代码来源:GlycanAction.java


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