本文整理汇总了Java中org.pushingpixels.flamingo.api.common.RichTooltip类的典型用法代码示例。如果您正苦于以下问题:Java RichTooltip类的具体用法?Java RichTooltip怎么用?Java RichTooltip使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RichTooltip类属于org.pushingpixels.flamingo.api.common包,在下文中一共展示了RichTooltip类的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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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();
}