本文整理汇总了Java中org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup类的典型用法代码示例。如果您正苦于以下问题:Java RibbonContextualTaskGroup类的具体用法?Java RibbonContextualTaskGroup怎么用?Java RibbonContextualTaskGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RibbonContextualTaskGroup类属于org.pushingpixels.flamingo.api.ribbon包,在下文中一共展示了RibbonContextualTaskGroup类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setAllAssociatedTasksVisible
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的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();
}
}
}
示例2: undoContextChange
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的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);
}
}
示例3: setPathVisible
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的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) {
}
}
});
}
}
}
}
示例4: createLinkageBand
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的package包/类
private void createLinkageBand() {
RibbonContextualTaskGroup group = this.theCanvas.getTheLinkageRibbon();
HashSet<Context> contexts = new HashSet<Context>();
contexts.add(Context.GLYCAN_CANVAS_ITEM);
ribbonManager.registerContextSupport(group.getTask(0), contexts);
ribbonManager.setRibbonAsDefault(group.getTask(0),
Context.GLYCAN_CANVAS_ITEM);
this.getRibbon().addContextualTaskGroup(group);
}
示例5: getTheLinkageRibbon
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的package包/类
public RibbonContextualTaskGroup getTheLinkageRibbon() {
return theLinkageRibbon;
}
示例6: SetRibbonMenu
import org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup; //导入依赖的package包/类
public void SetRibbonMenu(final DjvuStart djvu) {
//http://djvuplus.weebly.com/contact.html
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
RibbonTask Thome = new RibbonTask("Home", Band.getHomeToolsBand(djvu), Band.getHomeViewBand(), Band.getHomeCommentBand(), Band.getHomeConvertBand());
djvu.getRibbon().addTask(Thome);
RibbonTask taskConvert = new RibbonTask("CONVERT", Band.getToolConvertBand(), Band.getCreateBand(), Band.getOCRBand(), Band.getConvetrBand());
djvu.getRibbon().addTask(taskConvert);
RibbonTask taskEdit = new RibbonTask("EDIT", Band.getToolForEditBand()/*, Band.getEditContent()*/, Band.getFontBand(), Band.getParagraphBand());
djvu.getRibbon().addTask(taskEdit);
RibbonTask taskcomment = new RibbonTask("COMMENT", Band.getToolForCommentBand(), getTextmarkupBand(djvu), Band.getTypewriterBand(), Band.getDrawingBand());
djvu.getRibbon().addTask(taskcomment);
RibbonTask taskView = new RibbonTask("VIEW", Band.getToolForViewBand(), Band.getGotoBand(), Band.getPageDisplay(), getViewSetting(djvu));
djvu.getRibbon().addTask(taskView);
// RibbonTask taskHelp = new RibbonTask("Help", Band.getUiOptionsBand(djvu));
// djvu.getRibbon().addTask(taskHelp);
RibbonTask highlight = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
RibbonTask underline = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
RibbonTask strikeout = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
RibbonTask Squiggly = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
RibbonTask Replace = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
RibbonTask Insert = new RibbonTask("Comment "
+ "Formating", Band.getFontBand(), Band.getParagraphBand());
high = new RibbonContextualTaskGroup("Highlight Tools", Color.yellow, highlight);
under = new RibbonContextualTaskGroup("Underline Tools", Color.yellow, underline);
strike = new RibbonContextualTaskGroup("StrikeOut Tools", Color.yellow, strikeout);
squiggly = new RibbonContextualTaskGroup("SQIGGLY Tools", Color.yellow, Squiggly);
replace = new RibbonContextualTaskGroup("Replace Tools", Color.yellow, Replace);
insert = new RibbonContextualTaskGroup("Insert Tools", Color.yellow, Insert);
djvu.getRibbon().addContextualTaskGroup(high);
djvu.getRibbon().addContextualTaskGroup(under);
djvu.getRibbon().addContextualTaskGroup(strike);
djvu.getRibbon().addContextualTaskGroup(insert);
djvu.getRibbon().addContextualTaskGroup(squiggly);
djvu.getRibbon().addContextualTaskGroup(replace);
// add TaskBarcommponents into Ribbon Frame;
ConfigureTaskBarComponents(djvu);
createAppMenuButton(djvu);
/* add help button**/
djvu.getRibbon().configureHelp(getResizableIconFromResource("/images/arrowUp&Down.png"), new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (flage) {
djvu.getRibbon().setMinimized(true);
djvu.getRibbon().setToolTipText(",xkxkxk");
flage = false;
} else {
djvu.getRibbon().setMinimized(false);
flage = true;
}
}
});
} catch (Exception exp) {
exp.printStackTrace(DjVuOptions.err);
System.gc();
}
}
});
}