本文整理汇总了Java中org.pushingpixels.flamingo.api.ribbon.RibbonTask类的典型用法代码示例。如果您正苦于以下问题:Java RibbonTask类的具体用法?Java RibbonTask怎么用?Java RibbonTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RibbonTask类属于org.pushingpixels.flamingo.api.ribbon包,在下文中一共展示了RibbonTask类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setCurrentContext
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public RibbonTaskChangeState setCurrentContext(Context context,boolean switchToDefault){
synchronized(jRibbon){
setAllAssociatedTasksVisible(context,true);
Set<Context> contexts=getRibbonTaskContexts(jRibbon.getSelectedTask());
if(contexts==null || !contexts.contains(context)){
RibbonTask defaultRibbonTask=defaultContextRibbonTask.get(context);
if(defaultRibbonTask !=null ){
lastTask=jRibbon.getSelectedTask();
enabledTask=defaultRibbonTask;
if(switchToDefault){
jRibbon.setSelectedTask(defaultRibbonTask);
}
return RibbonTaskChangeState.SET_TO_DEFAULT_BAND;
}else{
return RibbonTaskChangeState.NO_BAND_SUPPORTS_CONTEXT;
}
}else{
return RibbonTaskChangeState.CURRENT_BAND_SUPPORTS_CONTEXT;
}
}
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:25,代码来源:RibbonManager.java
示例2: setAllAssociatedTasksVisible
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public void setAllAssociatedTasksVisible(Context context,boolean visible){
synchronized(jRibbon){
boolean rememberLast=false;
for(RibbonTask ribbonTask:ribbonTaskContextSupport.keySet()){
if(ribbonTaskContextSupport.get(ribbonTask).contains(context)){
RibbonContextualTaskGroup group=ribbonTask.getContextualGroup();
if(group!=null){
if(jRibbon.isVisible(group)!=visible){
if(visible){
rememberLast=true;
}
jRibbon.setVisible(group, visible);
}
}
}
}
if(rememberLast){
lastTask=jRibbon.getSelectedTask();
}
}
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:23,代码来源:RibbonManager.java
示例3: undoContextChange
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public void undoContextChange(Context context){
synchronized(jRibbon){
RibbonTask selectedTask=jRibbon.getSelectedTask();
if(enabledTask!=null){
RibbonContextualTaskGroup group=enabledTask.getContextualGroup();
if(group!=null){
for(int i=0;i<group.getTaskCount();i++){
RibbonTask taskOnGroup=group.getTask(i);
if(taskOnGroup==selectedTask){
jRibbon.setSelectedTask(lastTask);
break;
}
}
}
}
setAllAssociatedTasksVisible(context, false);
}
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:21,代码来源:RibbonManager.java
示例4: setPathVisible
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
@Override
public void setPathVisible(String path, boolean val) {
Object o = menuItems.get(path);
if (o instanceof RibbonTask) {
if (menuOptional.get(path)) {
RibbonContextualTaskGroup rg = optionalGroups.get(path);
if (ribbon.isVisible(rg) != val) {
View.execInEventDispatch(new Runnable() {
@Override
public void run() {
try {
ribbon.setVisible(rg, val);
} catch (Exception ex) {
}
}
});
}
}
}
}
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:25,代码来源:MainFrameRibbonMenu.java
示例5: createEditBand
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
private void createEditBand() {
RibbonTask editBand = this.theCanvas.getTheEditRibbon();
HashSet<Context> contexts = new HashSet<Context>();
contexts.add(Context.GLYCAN_CANVAS_ITEM);
ribbonManager.registerContextSupport(editBand, contexts);
this.getRibbon().addTask(editBand);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:10,代码来源:GlycoWorkbench.java
示例6: createStructureBand
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
private void createStructureBand() {
RibbonTask structureBand = this.theCanvas.getTheStructureRibbon();
HashSet<Context> contexts = new HashSet<Context>();
contexts.add(Context.GLYCAN_CANVAS_ITEM);
ribbonManager.registerContextSupport(structureBand, contexts);
this.getRibbon().addTask(structureBand);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:10,代码来源:GlycoWorkbench.java
示例7: createEditRibbonBand
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的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
示例8: createStructureRibbonTask
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
private RibbonTask createStructureRibbonTask() {
structureRibbonBandCFG = createStructureRibbonBand();
JRibbonBand band1 = createAddResidueBand();
RibbonTask task = new RibbonTask("Structure", structureRibbonBandCFG,
band1, createAddTerminalRibbon());
return task;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:9,代码来源:GlycanCanvas.java
示例9: hilightPath
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
@Override
public void hilightPath(String path) {
Object o = menuItems.get(path);
if (o instanceof RibbonTask) {
if (menuOptional.get(path)) {
View.execInEventDispatch(new Runnable() {
@Override
public void run() {
if (!ribbon.isVisible(optionalGroups.get(path))) {
ribbon.setVisible(optionalGroups.get(path), true);
}
ribbon.setSelectedTask((RibbonTask) o);
}
});
return;
}
final RibbonTask rt = (RibbonTask) o;
View.execInEventDispatch(new Runnable() {
@Override
public void run() {
ribbon.setSelectedTask(rt);
}
});
}
}
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:29,代码来源:MainFrameRibbonMenu.java
示例10: preferredLayoutSize
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
@Override
public Dimension preferredLayoutSize(Container c)
{
Insets ins = c.getInsets();
int maxPrefBandHeight = 0;
boolean isRibbonMinimized = ribbon.isMinimized();
if (!isRibbonMinimized)
{
if (ribbon.getTaskCount() > 0)
{
RibbonTask selectedTask = ribbon.getSelectedTask();
for (AbstractRibbonBand<?> ribbonBand : selectedTask.getBands())
{
int bandPrefHeight = ribbonBand.getPreferredSize().height;
Insets bandInsets = ribbonBand.getInsets();
maxPrefBandHeight = Math.max(maxPrefBandHeight,
bandPrefHeight + bandInsets.top
+ bandInsets.bottom);
}
}
}
int extraHeight = getTaskToggleButtonHeight();
if (!isUsingTitlePane())
{
extraHeight += getTaskbarHeight();
}
int prefHeight = maxPrefBandHeight + extraHeight + ins.top
+ ins.bottom;
// System.out.println("Ribbon pref = " + prefHeight);
return new Dimension(c.getWidth(), prefHeight);
}
开发者ID:Alidron,项目名称:designer,代码行数:33,代码来源:FileRibbonUI.java
示例11: setup
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public void setup() {
RibbonTask homeTask = new RibbonTask(NbBundle.getMessage(OfficeRibbonExample.class, "HOME"),
createClipboard());
addTask(homeTask);
createApplicationMenu();
createTaskBarButtons();
}
开发者ID:Depter,项目名称:JRLib,代码行数:9,代码来源:OfficeRibbonExample.java
示例12: getRibbonTask
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
@Override
public RibbonTask getRibbonTask() {
// TODO Auto-generated method stub
return null;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:6,代码来源:ReportingPlugin.java
示例13: createFileBand
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
private void createFileBand() {
JRibbonBand band = new JRibbonBand(
"Workspace",
new org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon(
10));
band.addCommandButton(theActionManager2.get("newall")
.getJCommandButton(ICON_SIZE.L3, "Clear", this,
new RichTooltip("Clear", " ")),
RibbonElementPriority.TOP);
band.addCommandButton(theActionManager2.get("openall")
.getJCommandButton(ICON_SIZE.L3, "Open", this,
new RichTooltip("Open workspace", " ")),
RibbonElementPriority.TOP);
band.addCommandButton(theActionManager2.get("saveall")
.getJCommandButton(ICON_SIZE.L3, "Save", this,
new RichTooltip("Save workspace", " ")),
RibbonElementPriority.TOP);
band.addCommandButton(theActionManager2.get("saveallas")
.getJCommandButton(ICON_SIZE.L3, "Save as", this,
new RichTooltip("Save workspace as", " ")),
RibbonElementPriority.TOP);
band.addCommandButton(theActionManager2.get("new").getJCommandButton(
ICON_SIZE.L3, "New", this,
new RichTooltip("New workspace", " ")),
RibbonElementPriority.TOP);
JRibbonBand band2 = new JRibbonBand(
"Structures",
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(theActionManager2.get("open").getJCommandButton(
ICON_SIZE.L3, "Open", this, new RichTooltip("Open", "")),
RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager2.get("openinto")
.getJCommandButton(ICON_SIZE.L3, "Insert", this,
new RichTooltip("Open into workspace", " ")),
RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager2.get("save").getJCommandButton(
ICON_SIZE.L3, "Save", this,
new RichTooltip("Save structures", " ")),
RibbonElementPriority.TOP);
band2.addCommandButton(theActionManager2.get("saveas")
.getJCommandButton(ICON_SIZE.L3, "Save as", this,
new RichTooltip("Save structures as", " ")),
RibbonElementPriority.TOP);
RibbonTask task = new RibbonTask("Home", band, band2);
this.getRibbon().addTask(task);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:63,代码来源:GlycoWorkbench.java
示例14: RibbonManager
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public RibbonManager(JRibbon _jRibbon){
jRibbon=_jRibbon;
defaultContextRibbonTask=new HashMap<Context,RibbonTask>();
ribbonTaskContextSupport=new HashMap<RibbonTask,Set<Context>>();
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:6,代码来源:RibbonManager.java
示例15: setRibbonAsDefault
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public void setRibbonAsDefault(RibbonTask ribbonTask,Context context){
defaultContextRibbonTask.put(context, ribbonTask);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:RibbonManager.java
示例16: registerContextSupport
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public void registerContextSupport(RibbonTask ribbonTask,Set<Context> contexts){
ribbonTaskContextSupport.put(ribbonTask, contexts);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:RibbonManager.java
示例17: getRibbonTaskContexts
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public Set<Context> getRibbonTaskContexts(RibbonTask task){
return ribbonTaskContextSupport.get(task);
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:RibbonManager.java
示例18: getTheViewRibbon
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public RibbonTask getTheViewRibbon() {
return theViewRibbon;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:GlycanCanvas.java
示例19: getTheStructureRibbon
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public RibbonTask getTheStructureRibbon() {
return theStructureRibbon;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:GlycanCanvas.java
示例20: getTheEditRibbon
import org.pushingpixels.flamingo.api.ribbon.RibbonTask; //导入依赖的package包/类
public RibbonTask getTheEditRibbon() {
return theEditRibbon;
}
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:4,代码来源:GlycanCanvas.java
注:本文中的org.pushingpixels.flamingo.api.ribbon.RibbonTask类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论