本文整理汇总了Java中org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy类的典型用法代码示例。如果您正苦于以下问题:Java RibbonBandResizePolicy类的具体用法?Java RibbonBandResizePolicy怎么用?Java RibbonBandResizePolicy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RibbonBandResizePolicy类属于org.pushingpixels.flamingo.api.ribbon.resize包,在下文中一共展示了RibbonBandResizePolicy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createResetModelBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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: createAddTerminalRibbon
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private JRibbonBand createAddTerminalRibbon() {
terminalRibbonBand = new JRibbonBand(
"Add Terminal",
new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
10));
ArrayList<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(
terminalRibbonBand.getControlPanel()));
resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(
terminalRibbonBand.getControlPanel()));
resizePolicies.add(new IconRibbonBandResizePolicy(terminalRibbonBand
.getControlPanel()));
terminalRibbonBand.setResizePolicies(resizePolicies);
updateTerminalRibbonGallery(TERMINAL_GAL_NAME, terminalRibbonBand);
return terminalRibbonBand;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:21,代码来源:GlycanCanvas.java
示例3: createAddResidueBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private JRibbonBand createAddResidueBand() {
final GlycanCanvas self = this;
insertResidueJRibbonBand = new JRibbonBand(
"Add residue",
new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
10));
ArrayList<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(
insertResidueJRibbonBand.getControlPanel()));
resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(
insertResidueJRibbonBand.getControlPanel()));
resizePolicies.add(new IconRibbonBandResizePolicy(
insertResidueJRibbonBand.getControlPanel()));
insertResidueJRibbonBand.setResizePolicies(resizePolicies);
updateAddResidueRibbonGallery(RESIDUE_GALLERY_NAME,
insertResidueJRibbonBand);
return insertResidueJRibbonBand;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:25,代码来源:GlycanCanvas.java
示例4: getHomeEditBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
/**
* this method to Create The EditBand and return it to add in the Ribbon
*
* @return
*/
public JRibbonBand getHomeEditBand() {
JRibbonBand Edit = new JRibbonBand("Edit", null);
Button.EditText = new JCommandButton("Edit"
+ " Text", getResizableIconFromResource(new ImageIcon("/images/JPG48.png").toString()));
Button.EditText.setEnabled(false);
Button.EditObject = new JCommandButton("Edit"
+ " Object", getResizableIconFromResource(new ImageIcon("/images/GIF48.png").toString()));
Button.EditObject.setEnabled(false);
Button.EditObject.setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);
Button.EditObject.setPopupCallback(new PopupPanelCallback() {
public JPopupPanel getPopupPanel(JCommandButton commandButton) {
JPopupPanel pan = new JPopupPanel() {
};
pan.setBackground(Color.WHITE);
return pan;
}
});
Edit.addCommandButton(Button.EditText, RibbonElementPriority.TOP);
Edit.addCommandButton(Button.EditObject, RibbonElementPriority.TOP);
List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(Edit.getControlPanel()));
Edit.setResizePolicies(resizePolicies);
return Edit;
}
开发者ID:DJVUpp,项目名称:Desktop,代码行数:30,代码来源:DjvuComponents.java
示例5: getUiOptionsBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
/**
* this method to Create The UIOptionBand and return it to add in the Ribbon
*
* @param Djvu
* @return
*/
public JRibbonBand getUiOptionsBand(DjvuStart Djvu) {
JRibbonBand Uioptions = new JRibbonBand("UI Options", null);
Uioptions.setResizePolicies(CoreRibbonResizePolicies.getCorePoliciesRestrictive(Uioptions));
Uioptions.startGroup();
Button.Switch = new JCommandButton("Change "
+ "ToolBar Mode", null);
Uioptions.addCommandButton(Button.Switch, RibbonElementPriority.TOP);
Uioptions.startGroup();
System.err.println(DjvuStart.djvu);
JRibbonComponent look_feel = new JRibbonComponent(null, "Change "
+ "Djvu++ Skin", LookAndFeelSwitcher.getLookAndFeelSwitcher(Djvu));
look_feel.setDisplayPriority(RibbonElementPriority.TOP);
Uioptions.addRibbonComponent(look_feel);
List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(Uioptions.getControlPanel()));
Uioptions.setResizePolicies(resizePolicies);
return Uioptions;
}
开发者ID:DJVUpp,项目名称:Desktop,代码行数:26,代码来源:DjvuComponents.java
示例6: getTypewriterBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
/**
*
* @return
*/
public JRibbonBand getTypewriterBand() {
JRibbonBand Typewriter = new JRibbonBand("TypeWriter", null);
Typewriter.setResizePolicies(CoreRibbonResizePolicies.getCorePoliciesRestrictive(Typewriter));
Typewriter.startGroup();
Button.Note2 = new JCommandButton("Note", getResizableIconFromResource("/images/notes48.png"));
Button.Note2.setEnabled(false);
Typewriter.addCommandButton(Button.Note2, RibbonElementPriority.TOP);
Typewriter.startGroup();
Button.TWriter = new JCommandButton("TyperWriter", getResizableIconFromResource("/images/type writer48.png"));
Button.TWriter.setEnabled(false);
Button.TextBox = new JCommandButton("TextBox", getResizableIconFromResource("/images/callout48.png"));
Button.TextBox.setEnabled(false);
Button.Callout = new JCommandButton("Callout", getResizableIconFromResource("/images/textbox48.png"));
Button.Callout.setEnabled(false);
Typewriter.addCommandButton(Button.TWriter, RibbonElementPriority.TOP);
Typewriter.addCommandButton(Button.Callout, RibbonElementPriority.MEDIUM);
Typewriter.addCommandButton(Button.TextBox, RibbonElementPriority.MEDIUM);
List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(Typewriter.getControlPanel()));
Typewriter.setResizePolicies(resizePolicies);
return Typewriter;
}
开发者ID:DJVUpp,项目名称:Desktop,代码行数:28,代码来源:DjvuComponents.java
示例7: createClipboard
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private JRibbonBand createClipboard() {
JRibbonBand band = new JRibbonBand(NbBundle.getMessage(OfficeRibbonExample.class, "CLIPBOARD"),
new EmptyResizableIcon(16));
PasteAction paste = SystemAction.get(PasteAction.class);
CutAction cut = SystemAction.get(CutAction.class);
CopyAction copy = SystemAction.get(CopyAction.class);
band.addCommandButton(new BoundCommandButton(paste), RibbonElementPriority.TOP);
band.addCommandButton(new BoundCommandButton(cut), RibbonElementPriority.MEDIUM);
band.addCommandButton(new BoundCommandButton(copy), RibbonElementPriority.MEDIUM);
band.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(
new Mid2Mid(band.getControlPanel()),
new Mid2Mid(band.getControlPanel()),
new Mid2Low(band.getControlPanel())
));
return band;
}
开发者ID:Depter,项目名称:JRLib,代码行数:21,代码来源:OfficeRibbonExample.java
示例8: addEditTask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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
示例9: createDrawBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private JRibbonBand createDrawBand() {
JRibbonBand drawBand = new JRibbonBand("Draw", null);
drawBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(drawBand.getControlPanel()),
new CoreRibbonResizePolicies.Mid2Low(drawBand.getControlPanel()),
new IconRibbonBandResizePolicy(drawBand.getControlPanel())));
addDrawButtons(drawBand, true);
return drawBand;
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:10,代码来源:OrbitMenu.java
示例10: getSwitchImageProviderBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private JRibbonBand getSwitchImageProviderBand() {
JRibbonBand switchImageProviderBand = new JRibbonBand("Image Provider", null);
switchImageProviderBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(switchImageProviderBand.getControlPanel()),
new CoreRibbonResizePolicies.Mirror(switchImageProviderBand.getControlPanel()),
new CoreRibbonResizePolicies.Mid2Low(switchImageProviderBand.getControlPanel()),
new IconRibbonBandResizePolicy(switchImageProviderBand.getControlPanel())));
JCommandButton buttonSwitchLocalRemote = getSwitchImageProviderBtn();
switchImageProviderBand.addCommandButton(buttonSwitchLocalRemote, RibbonElementPriority.TOP);
return switchImageProviderBand;
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:12,代码来源:OrbitMenu.java
示例11: addCustomTask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private void addCustomTask(final JRibbon ribbon) {
ICustomMenu customMenu = DALConfig.getCustomMenu();
if (customMenu != null) {
JRibbonBand customBand = new JRibbonBand("Custom", null);
customBand.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(new CoreRibbonResizePolicies.None(customBand.getControlPanel()),
new IconRibbonBandResizePolicy(customBand.getControlPanel())));
for (JCommandButton button : customMenu.getTaskList()) {
customBand.addCommandButton(button, RibbonElementPriority.TOP);
}
RibbonTask customTask = new RibbonTask("Custom", customBand);
ribbon.addTask(customTask);
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:14,代码来源:OrbitMenu.java
示例12: createEditRibbonBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
private RibbonTask createEditRibbonBand() {
JRibbonBand band2 = new JRibbonBand(
"Actions",
new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
10));
ArrayList<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(band2
.getControlPanel()));
resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(band2
.getControlPanel()));
resizePolicies.add(new IconRibbonBandResizePolicy(band2
.getControlPanel()));
band2.setResizePolicies(resizePolicies);
band2.addCommandButton(theActionManager.get("undo").getJCommandButton(
ICON_SIZE.L3, "Undo", this, null), RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager.get("redo").getJCommandButton(
ICON_SIZE.L3, "Redo", this, null), RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager.get("cut").getJCommandButton(
ICON_SIZE.L3, "Cut", this, null), RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager.get("copy").getJCommandButton(
ICON_SIZE.L3, "Copy", this, null), RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager.get("paste").getJCommandButton(
ICON_SIZE.L3, "Paste", this, null), RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager.get("delete")
.getJCommandButton(ICON_SIZE.L3, "Delete", this, null),
RibbonElementPriority.TOP);
JRibbonBand band3 = new JRibbonBand(
"Structures",
new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
10));
resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(band3
.getControlPanel()));
resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(band3
.getControlPanel()));
resizePolicies.add(new IconRibbonBandResizePolicy(band3
.getControlPanel()));
band3.setResizePolicies(resizePolicies);
band3.addCommandButton(theActionManager.get("orderstructuresasc")
.getJCommandButton(ICON_SIZE.L3, "Order ASC", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("orderstructuresdesc")
.getJCommandButton(ICON_SIZE.L3, "Order DSC", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("selectstructure")
.getJCommandButton(ICON_SIZE.L3, "Select", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("selectall")
.getJCommandButton(ICON_SIZE.L3, "Select All", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("selectnone")
.getJCommandButton(ICON_SIZE.L3, "deselect", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("gotostart")
.getJCommandButton(ICON_SIZE.L3, "Start", this, null),
RibbonElementPriority.TOP);
band3.addCommandButton(theActionManager.get("gotoend")
.getJCommandButton(ICON_SIZE.L3, "End", this, null),
RibbonElementPriority.TOP);
return new RibbonTask("Edit", band2, band3,
createStructureRibbonControls());
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:68,代码来源:GlycanCanvas.java
示例13: createStructureRibbonBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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
示例14: setDefaultResizePolicy
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
/**
* Convenience method to set a good candidate for the default ResizePolicy of a JRibbonBand
* @param band
*/
public static void setDefaultResizePolicy(JRibbonBand band){
ArrayList<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
resizePolicies.add(new CoreRibbonResizePolicies.Mirror(band
.getControlPanel()));
resizePolicies.add(new CoreRibbonResizePolicies.Mid2Low(band
.getControlPanel()));
resizePolicies.add(new IconRibbonBandResizePolicy(band
.getControlPanel()));
band.setResizePolicies(resizePolicies);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:15,代码来源:ThemeManager.java
示例15: createRibbonBand
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的package包/类
public AbstractRibbonBand createRibbonBand(ActionItem item) {
//TODO icon
JRibbonBand band = new JRibbonBand(item.getText(), ResizableIcons.empty(), getDefaultAction(item));
for (ActionItem child : item.getChildren()) {
if (child.isSeparator()) {
band.startGroup();
} else if (child.getValue(ActionItem.DEFAULT_ACTION) != Boolean.TRUE) {
addRibbonBandAction(band, child);
}
}
band.setResizePolicies(Arrays.<RibbonBandResizePolicy>asList(
new Mid2Mid(band.getControlPanel())));
return band;
}
开发者ID:Alidron,项目名称:designer,代码行数:15,代码来源:RibbonComponentFactory.java
示例16: addImageTask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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
示例17: addROITask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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
示例18: createExclusionTask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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
示例19: addBatchTask
import org.pushingpixels.flamingo.api.ribbon.resize.RibbonBandResizePolicy; //导入依赖的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.");
richTooltipExecuteGr
|
请发表评论