/[fenfire]/fenfire/org/fenfire/modules/pp/PPActionsImpl.java
ViewVC logotype

Diff of /fenfire/org/fenfire/modules/pp/PPActionsImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by tjl, Tue Apr 15 19:10:09 2003 UTC revision 1.18 by tjl, Wed Apr 16 03:53:08 2003 UTC
# Line 13  import java.rmi.server.*; Line 13  import java.rmi.server.*;
13   */   */
14  public class PPActionsImpl extends UnicastRemoteObject implements PPActions {  public class PPActionsImpl extends UnicastRemoteObject implements PPActions {
15  public static final String rcsid = "$Id$";  public static final String rcsid = "$Id$";
16      public static final boolean dbg = false;      public static final boolean dbg = true;
17      protected static void p(String s) { if(dbg) pa(s); }      protected static void p(String s) { if(dbg) pa(s); }
18      protected static void pa(String s) { System.out.println("PPActionsImpl: "+s); }      protected static void pa(String s) { System.out.println("PPActionsImpl: "+s); }
19    
# Line 49  public static final String rcsid = "$Id$ Line 49  public static final String rcsid = "$Id$
49    
50      public void deletePaper(String paperURI) throws RemoteException      public void deletePaper(String paperURI) throws RemoteException
51      { synchronized(fen) {      { synchronized(fen) {
52            if(dbg) pa("DeletePaper [NOT IMPLEMENTED]: "+paperURI);
53          /*          /*
54          // must delete all notes first          // must delete all notes first
55          Cell paper = space.getCell(paperId).h(d.contains, -1);          Cell paper = space.getCell(paperId).h(d.contains, -1);
# Line 71  public static final String rcsid = "$Id$ Line 72  public static final String rcsid = "$Id$
72      public String newNote(String paperURI, int x, int y, String text)        public String newNote(String paperURI, int x, int y, String text)  
73          throws RemoteException          throws RemoteException
74      { synchronized(fen) {      { synchronized(fen) {
75            if(dbg) pa("New note: "+paperURI+" "+x+" "+y+" "+text);
76    
77          // find the paper          // find the paper
78          Object paper = Nodes.get(paperURI);          Object paper = Nodes.get(paperURI);
# Line 105  public static final String rcsid = "$Id$ Line 107  public static final String rcsid = "$Id$
107      public void deleteNote(String noteURI)      public void deleteNote(String noteURI)
108                      throws RemoteException                      throws RemoteException
109      { synchronized(fen) {      { synchronized(fen) {
110            if(dbg) pa("Delete note [NOT IMPLEMENTED]: "+noteURI);
111          /*          /*
112          // MUST DELETE ALL ASSOCS FIRST          // MUST DELETE ALL ASSOCS FIRST
113    
# Line 145  public static final String rcsid = "$Id$ Line 148  public static final String rcsid = "$Id$
148      public void moveNote(String noteURI, int x, int y)      public void moveNote(String noteURI, int x, int y)
149          throws RemoteException          throws RemoteException
150      { synchronized(fen) {      { synchronized(fen) {
151            if(dbg) pa("Move note: "+noteURI+" "+x+" "+y);
152          Object note = Nodes.get(noteURI);          Object note = Nodes.get(noteURI);
153          if (note == null) return;          if (note == null) return;
154    
# Line 162  public static final String rcsid = "$Id$ Line 165  public static final String rcsid = "$Id$
165      public void assocNotes(String noteURI, int side, String assocURI)      public void assocNotes(String noteURI, int side, String assocURI)
166          throws RemoteException          throws RemoteException
167      { synchronized(fen) {      { synchronized(fen) {
168            if(dbg) pa("Assoc notes: "+noteURI+" "+side+" "+assocURI);
169          Object note = Nodes.get(noteURI);          Object note = Nodes.get(noteURI);
170          Object assoc = Nodes.get(assocURI);          Object assoc = Nodes.get(assocURI);
171    
# Line 194  public static final String rcsid = "$Id$ Line 198  public static final String rcsid = "$Id$
198      public void detachNotes(String id1, int side, String id2)      public void detachNotes(String id1, int side, String id2)
199          throws RemoteException          throws RemoteException
200      { synchronized(fen) {      { synchronized(fen) {
201            if(dbg) pa("Detach notes: "+id1+" "+side+" "+id2);
202    
203              /*              /*
204          Cell c1 = space.getCell(id1).h(d.clone);          Cell c1 = space.getCell(id1).h(d.clone);
# Line 223  public static final String rcsid = "$Id$ Line 228  public static final String rcsid = "$Id$
228      public void insertText(String noteURI, int offs, String text)      public void insertText(String noteURI, int offs, String text)
229          throws RemoteException          throws RemoteException
230      { synchronized(fen) {      { synchronized(fen) {
231              alphContent.insertText(          if(dbg) pa("Insert text: "+noteURI+" "+offs+" "+text);
232                      Nodes.get(noteURI), offs, text, true          alphContent.insertText(
233                    Nodes.get(noteURI), offs, text, true
234                      );                      );
235      }}      }}
236    
# Line 232  public static final String rcsid = "$Id$ Line 238  public static final String rcsid = "$Id$
238      public void deleteText(String noteURI, int begin, int end)      public void deleteText(String noteURI, int begin, int end)
239          throws RemoteException          throws RemoteException
240      { synchronized(fen) {      { synchronized(fen) {
241              alphContent.deleteText(          if(dbg) pa("Delete text: "+noteURI+" "+begin+" "+end);
242                      Nodes.get(noteURI), begin, end);          alphContent.deleteText(
243                    Nodes.get(noteURI), begin, end);
244      }}      }}
245  }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26