Package net.sourceforge.squirrel_sql.client.session.action

Examples of net.sourceforge.squirrel_sql.client.session.action.UndoAction


   {
      if (!entry.hasOwnUndoableManager())
      {
         SquirrelDefaultUndoManager undoManager = new SquirrelDefaultUndoManager();
         Resources res = application.getResources();
         _undoAction = new UndoAction(application, undoManager);
         _redoAction = new RedoAction(application, undoManager);

         JComponent comp = entry.getTextComponent();
         comp.registerKeyboardAction(_undoAction, res.getKeyStroke(_undoAction),
            JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
         comp.registerKeyboardAction(_redoAction, res.getKeyStroke(_redoAction),
            JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

         entry.setUndoManager(undoManager);
      }
      else
      {
         IUndoHandler undoHandler = entry.createUndoHandler();
         _undoAction = new UndoAction(application, undoHandler.getUndoAction());
         _redoAction = new RedoAction(application, undoHandler.getRedoAction());
      }

      entry.addRedoUndoActionsToSQLEntryAreaMenu(_undoAction, _redoAction);
   }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.session.action.UndoAction

Copyright © 2018 www.massapicom. 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.