本文整理汇总了Java中org.pushingpixels.flamingo.api.common.JCommandButton.setActionRichTooltip方法的典型用法代码示例。如果您正苦于以下问题:Java JCommandButton.setActionRichTooltip方法的具体用法?Java JCommandButton.setActionRichTooltip怎么用?Java JCommandButton.setActionRichTooltip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pushingpixels.flamingo.api.common.JCommandButton
的用法示例。
在下文中一共展示了JCommandButton.setActionRichTooltip方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createResetModelBand
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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;
}
示例2: addDrawButtons
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例3: addTrainClassifyButtons
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例4: addEditTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例5: addExclusionParameterButton
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例6: createDeleteSecondarySegmentationModelButton
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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;
}
示例7: createDeleteSegmentationModelButton
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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;
}
示例8: createDefineROIButton
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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;
}
示例9: addImageTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例10: addROITask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例11: createExclusionTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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;
}
示例12: addBatchTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的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);
}
示例13: addHelpTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的package包/类
private void addHelpTask(final JRibbon ribbon) {
JRibbonBand orbitHelpBand = new JRibbonBand("Documentation", null);
orbitHelpBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(orbitHelpBand.getControlPanel()),
// new CoreRibbonResizePolicies.Mirror(orbitHelpBand.getControlPanel()),
// new CoreRibbonResizePolicies.Mid2Low(orbitHelpBand.getControlPanel()),
new IconRibbonBandResizePolicy(orbitHelpBand.getControlPanel())));
JCommandButton buttonDocumentation = new JCommandButton("Orbit Manual", new HelpContents5());
RichTooltip richTooltipDocumentation = new RichTooltip("Orbit Manual", "Display the orbit documentation.");
buttonDocumentation.setActionRichTooltip(richTooltipDocumentation);
buttonDocumentation.addActionListener(oia == null ? null : oia.helpBrowserActionListener);
orbitHelpBand.addCommandButton(buttonDocumentation, RibbonElementPriority.TOP);
// JCommandButton buttonTipOfTheDay = new JCommandButton("Tip of the Day", new Lightbulb());
// RichTooltip richTooltipTipOfTheDay = new RichTooltip("Tip of the Day", "Display the Tip of the Day popup.");
// buttonTipOfTheDay.setActionRichTooltip(richTooltipTipOfTheDay);
// buttonTipOfTheDay.addActionListener(oia == null ? null : oia.tipOfTheDayActionListener);
// orbitHelpBand.addCommandButton(buttonTipOfTheDay, RibbonElementPriority.MEDIUM);
JCommandButton buttonAbout = new JCommandButton("About", new HelpAbout3());
RichTooltip richTooltipAbout = new RichTooltip("About", "Display further information about the program.");
buttonAbout.setActionRichTooltip(richTooltipAbout);
buttonAbout.addActionListener(oia == null ? null : oia.aboutActionListener);
orbitHelpBand.addCommandButton(buttonAbout, RibbonElementPriority.MEDIUM);
JRibbonBand logsBand = new JRibbonBand("Logs", null);
logsBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(logsBand.getControlPanel()),
//new CoreRibbonResizePolicies.Mirror(logsBand.getControlPanel()),
new CoreRibbonResizePolicies.Mid2Low(logsBand.getControlPanel()),
new IconRibbonBandResizePolicy(logsBand.getControlPanel())));
JCommandButton buttonShowLog = new JCommandButton("Show Log", new LogFrameIcon());
RichTooltip richTooltipLogFile = new RichTooltip("Show Orbit Log File", "Display the orbit log file.");
buttonShowLog.setActionRichTooltip(richTooltipLogFile);
buttonShowLog.addActionListener(oia == null ? null : oia.showLogActionListener);
logsBand.addCommandButton(buttonShowLog, RibbonElementPriority.TOP);
JCommandButton buttonWriteModelToLog = new JCommandButton("Log Model", new WriteModel());
RichTooltip richTooltipWriteModelToLog = new RichTooltip("Write Model Information to Log", "Write detailed information about the active model into the log.");
buttonWriteModelToLog.setActionRichTooltip(richTooltipWriteModelToLog);
buttonWriteModelToLog.addActionListener(oia == null ? null : oia.writeModelInfosActionListener);
logsBand.addCommandButton(buttonWriteModelToLog, RibbonElementPriority.MEDIUM);
RibbonTask helpTask = new RibbonTask("Help", orbitHelpBand, logsBand);
ribbon.addTask(helpTask);
}
示例14: createClassificationTask
import org.pushingpixels.flamingo.api.common.JCommandButton; //导入方法依赖的package包/类
private RibbonTask createClassificationTask() {
JRibbonBand setupBand = new JRibbonBand("Setup", null);
setupBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(setupBand.getControlPanel())));
JCommandButton buttonSetupClasses = new JCommandButton("Setup Classes", new SystemRun5());
makeMandatory(buttonSetupClasses);
RichTooltip richTooltipSetupClasses = new RichTooltip("Setup Classes", "Setup default classes for a main model.");
buttonSetupClasses.addActionListener(oia == null ? null : oia.setupClassesMainModelActionListener);
buttonSetupClasses.setActionRichTooltip(richTooltipSetupClasses);
setupBand.addCommandButton(buttonSetupClasses, RibbonElementPriority.MEDIUM);
JRibbonBand drawBand = createDrawBand();
JRibbonBand mlBand = new JRibbonBand("Machine Learning", null);
mlBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(mlBand.getControlPanel()),
new CoreRibbonResizePolicies.Mid2Low(mlBand.getControlPanel()),
new IconRibbonBandResizePolicy(mlBand.getControlPanel())));
addTrainClassifyButtons(mlBand);
JRibbonBand modelResetBand = createResetModelBand(false);
RibbonTask classificationTask = new RibbonTask("Classification", setupBand, drawBand, mlBand, modelResetBand);
return classificationTask;
}