Examples of SetNoteWindowPosition


Examples of org.freeplane.features.note.mindmapmode.SetNoteWindowPosition

              button.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
              button.setPopupCallback(new PopupPanelCallback() {
                public JPopupPanel getPopupPanel(JCommandButton commandButton) {
                  JCommandPopupMenu popupmenu = new JCommandPopupMenu();
               
                  final SetNoteWindowPosition posTopAction = (SetNoteWindowPosition) context.getBuilder().getMode().getAction("SetNoteWindowPosition.top");
                  final JCommandToggleMenuButton posTopButton = RibbonActionContributorFactory.createCommandToggleMenuButton(posTopAction);             
                  popupmenu.addMenuButton(posTopButton);
                  posTopAction.setSelected();
                  posTopButton.getActionModel().setSelected(posTopAction.isSelected());
                 
                  final SetNoteWindowPosition posLeftAction = (SetNoteWindowPosition) context.getBuilder().getMode().getAction("SetNoteWindowPosition.left");
                  final JCommandToggleMenuButton posLeftButton = RibbonActionContributorFactory.createCommandToggleMenuButton(posLeftAction);             
                  popupmenu.addMenuButton(posLeftButton);
                  posLeftAction.setSelected();
                  posLeftButton.getActionModel().setSelected(posLeftAction.isSelected());
                 
                  final SetNoteWindowPosition posRightAction = (SetNoteWindowPosition) context.getBuilder().getMode().getAction("SetNoteWindowPosition.right");
                  final JCommandToggleMenuButton posRightButton = RibbonActionContributorFactory.createCommandToggleMenuButton(posRightAction);             
                  popupmenu.addMenuButton(posRightButton);
                  posRightAction.setSelected();
                  posRightButton.getActionModel().setSelected(posRightAction.isSelected());
                 
                  final SetNoteWindowPosition posBottomAction = (SetNoteWindowPosition) context.getBuilder().getMode().getAction("SetNoteWindowPosition.bottom");
                  final JCommandToggleMenuButton posBottomButton = RibbonActionContributorFactory.createCommandToggleMenuButton(posBottomAction);             
                  popupmenu.addMenuButton(posBottomButton);
                  posBottomAction.setSelected();
                  posBottomButton.getActionModel().setSelected(posBottomAction.isSelected());
                 
                  return popupmenu;
                }
              });             
              popupmenu.addMenuButton(button);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.