43 |
|
|
44 |
Cell center; |
Cell center; |
45 |
|
|
46 |
Dim d_contains, d_pan, d_association, d_1, d_clone; |
PPDims d; |
47 |
|
|
48 |
public PPActionsImpl(Space space) throws RemoteException { |
public PPActionsImpl(Space space) throws RemoteException { |
49 |
super(); |
super(); |
50 |
this.space = space; |
this.space = space; |
51 |
center = space.getHomeCell(); |
center = space.getHomeCell(); |
52 |
if(center.t()==null) center.setText("HOME"); |
if(center.t()==null) center.setText("HOME"); |
53 |
d_contains = space.getDim("0000000008000000E99BD882A20004A0AD6630BFDA693D810DED76CAE65DA9B7E873053466C52E-5"); |
d = new PPDims(space); |
|
d_pan = space.getDim("0000000008000000E99BD882A20004A0AD6630BFDA693D810DED76CAE65DA9B7E873053466C52E-4"); |
|
|
d_association = space.getDim("0000000008000000E99BD882A20004A0AD6630BFDA693D810DED76CAE65DA9B7E873053466C52E-7"); |
|
|
|
|
|
d_1 = space.getDim(Ids.d_1); |
|
|
d_clone = space.getDim(Ids.d_clone); |
|
54 |
} |
} |
55 |
|
|
56 |
|
|
58 |
// |
// |
59 |
public String newPaper() |
public String newPaper() |
60 |
throws RemoteException { synchronized(space) { |
throws RemoteException { synchronized(space) { |
61 |
Cell n = center.N(d_1); |
Cell n = center.N(d.d1); |
62 |
n.setText("Uusi paperi"); |
n.setText("Uusi paperi"); |
63 |
return n.getId(); |
return n.getId(); |
64 |
}} |
}} |
68 |
Cell c = space.getCell(paperId); |
Cell c = space.getCell(paperId); |
69 |
|
|
70 |
p("New note\n"); |
p("New note\n"); |
71 |
c = c.N(d_contains); |
c = c.N(d.contains); |
72 |
c.setText(text); // XXX null content crashes |
c.setText(text); // XXX null content crashes |
73 |
Cell arg = c.N(d_pan); |
Cell arg = c.N(d.pan); |
74 |
arg.setText("" + x); |
arg.setText("" + x); |
75 |
arg = arg.N(d_pan); |
arg = arg.N(d.pan); |
76 |
arg.setText("" + y); |
arg.setText("" + y); |
77 |
return c.getId(); |
return c.getId(); |
78 |
}} |
}} |
81 |
throws RemoteException { |
throws RemoteException { |
82 |
Cell note = space.getCell(noteId); |
Cell note = space.getCell(noteId); |
83 |
// Remove all occurrences |
// Remove all occurrences |
84 |
Cell c = note.h(d_clone); |
Cell c = note.h(d.clone); |
85 |
while(c!=null) { |
while(c!=null) { |
86 |
c.excise(d_contains); |
c.excise(d.contains); |
87 |
c.excise(d_association); |
c.excise(d.association); |
88 |
c = c.s(d_clone); |
c = c.s(d.clone); |
89 |
} |
} |
90 |
} |
} |
91 |
|
|
92 |
public void moveNote(String noteId, int x, int y) |
public void moveNote(String noteId, int x, int y) |
93 |
throws RemoteException { synchronized(space) { |
throws RemoteException { synchronized(space) { |
94 |
Cell note = space.getCell(noteId); |
Cell note = space.getCell(noteId); |
95 |
Cell arg = note.s(d_pan); |
Cell arg = note.s(d.pan); |
96 |
arg.setText("" + x); |
arg.setText("" + x); |
97 |
arg = arg.s(d_pan); |
arg = arg.s(d.pan); |
98 |
arg.setText("" + y); |
arg.setText("" + y); |
99 |
}} |
}} |
100 |
|
|
103 |
throws RemoteException { synchronized(space) { |
throws RemoteException { synchronized(space) { |
104 |
Cell note = space.getCell(noteId); |
Cell note = space.getCell(noteId); |
105 |
Cell assoc = space.getCell(assocId); |
Cell assoc = space.getCell(assocId); |
106 |
note.zzclone().connect(d_association, side, assoc.zzclone()); |
note.zzclone().connect(d.association, side, assoc.zzclone()); |
107 |
}} |
}} |
108 |
|
|
109 |
public void insertText(String noteId, int offs, String text) |
public void insertText(String noteId, int offs, String text) |