Package org.freeplane.features.mode

Examples of org.freeplane.features.mode.ModeController.startTransaction()


    final Controller controller = Controller.getCurrentController();
    final MapModel map = controller.getMap();
    final ConditionalStyleModel conditionalStyleModel = getConditionalStyleModel();
    Component pane = createConditionalStylePane(map, conditionalStyleModel);
    final ModeController modeController = Controller.getCurrentModeController();
    modeController.startTransaction();
    try{
      final int confirmed = JOptionPane.showConfirmDialog(controller.getMapViewManager().getMapViewComponent(), pane, TextUtils.getText(TextUtils.removeMnemonic("ManageNodeConditionalStylesAction.text")), JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE);
      if(JOptionPane.OK_OPTION == confirmed){
        modeController.commit();
        modeController.getMapController().nodeChanged(controller.getSelection().getSelected(),NodeModel.UNKNOWN_PROPERTY,null,null);
View Full Code Here


    final TextController textController = TextController.getController();
    if (textController instanceof MTextController) {
      ((MTextController) textController).stopEditing();
    }
    if (textController instanceof MTextController) {
      modeController.startTransaction();
      try {
        ((MTextController) TextController.getController()).stopEditing();
      }
      finally {
        modeController.commit();
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.