[Nextobjects-devel] nextobjects/nextobjects/src/org/devaki/nextobjects/util ModelMan.java,1.22,1.23
Status: Alpha
Brought to you by:
eflorent
From: <efl...@us...> - 2003-05-31 11:52:22
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv10548/src/org/devaki/nextobjects/util Modified Files: ModelMan.java NORedoLog.java NOXMLFactory.java Log Message: Buffered graphics Index: ModelMan.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/ModelMan.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ModelMan.java 24 May 2003 18:50:47 -0000 1.22 --- ModelMan.java 31 May 2003 11:48:34 -0000 1.23 *************** *** 155,159 **** addAssociation(pMerise,pMerise.getAssociationAt(i)); } ! for (int i=0; i < pMerise.countEntity(); i++ ) { addEntity(pMerise,pMerise.getEntityAt(i)); --- 155,159 ---- addAssociation(pMerise,pMerise.getAssociationAt(i)); } ! for (int i=0; i < pMerise.countEntities(); i++ ) { addEntity(pMerise,pMerise.getEntityAt(i)); *************** *** 812,816 **** /** ! * Move an object * @param xi * @param yi --- 812,816 ---- /** ! * Move all selected objects and log it * @param xi * @param yi *************** *** 820,831 **** for (int i=0;i<currentObjects.size();i++) { ! BaseObject tmpObject=(BaseObject)currentObjects.elementAt(i); if (tmpObject.getObjectView() instanceof ClassView) { ! Point p = tmpObject.getObjectView().getLocation(); ! p.setLocation(p.x + xi ,p.y + yi); ! tmpObject.getObjectView().setLocation(p); tmpObject.getObjectView().resetSelectionPoint(); ! currentModel.redoLog.log(NORedoLog.ACTION_MOVE,tmpObject,xi,yi); } } --- 820,844 ---- for (int i=0;i<currentObjects.size();i++) { ! BaseObject tmpObject=(BaseObject)currentObjects.elementAt(i); if (tmpObject.getObjectView() instanceof ClassView) { ! Point oldPoint = ((ClassView)tmpObject.getObjectView()).getOldrectangle().getLocation(); ! if (oldPoint.x==0) ! { ! Point exptPoint=((ClassView)tmpObject.getObjectView()).getLocation(); ! oldPoint.setLocation(new Point(exptPoint.x-xi,exptPoint.y-yi)); ! } ! Point newPoint=new Point(oldPoint.x + xi ,oldPoint.y + yi); ! ! ((ClassView)tmpObject.getObjectView()).setLocation(newPoint); ! Point newOldLocation=((ClassView)tmpObject.getObjectView()).getLocation(); ! ((ClassView)tmpObject.getObjectView()).setOldLocation(newOldLocation); ! tmpObject.getObjectView().resetSelectionPoint(); ! if (!(xi==0 && yi ==0)) ! { ! currentModel.redoLog.log(NORedoLog.ACTION_MOVE,tmpObject,xi,yi); ! } ! } } Index: NORedoLog.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NORedoLog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NORedoLog.java 3 May 2003 19:38:14 -0000 1.2 --- NORedoLog.java 31 May 2003 11:48:34 -0000 1.3 *************** *** 37,49 **** * There is a redo stack and an undo stack. Undoing activate the redo stack * while doing something activate the undo stack. ! * @author : Emmanuel Florent */ public class NORedoLog { - - /* - * The size of two redo stack. - * This might be taken from prefs easily when we have prefs. - */ /* --- 37,44 ---- * There is a redo stack and an undo stack. Undoing activate the redo stack * while doing something activate the undo stack. ! * @author : efl...@de... */ public class NORedoLog { /* Index: NOXMLFactory.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOXMLFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NOXMLFactory.java 24 May 2003 18:50:47 -0000 1.10 --- NOXMLFactory.java 31 May 2003 11:48:34 -0000 1.11 *************** *** 85,89 **** // work on entities ! for (int i=0;i<pCDM.countEntity();i++) { Element tmpElementEntity=writeBaseClass(pCDM.getEntityAt(i),"entity"); --- 85,89 ---- // work on entities ! for (int i=0;i<pCDM.countEntities();i++) { Element tmpElementEntity=writeBaseClass(pCDM.getEntityAt(i),"entity"); |