25 |
import java.awt.FileDialog; |
import java.awt.FileDialog; |
26 |
import java.awt.Frame; |
import java.awt.Frame; |
27 |
|
|
28 |
|
// page scrollblocks |
29 |
import org.nongnu.alph.*; |
import org.nongnu.alph.*; |
30 |
import org.nongnu.alph.impl.*; |
import org.nongnu.alph.impl.*; |
31 |
|
|
32 |
|
// save load |
33 |
|
import org.fenfire.swamp.impl.*; |
34 |
|
import com.hp.hpl.mesa.rdf.jena.model.*; |
35 |
|
import com.hp.hpl.mesa.rdf.jena.mem.*; |
36 |
|
import java.util.Iterator; |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
/** FenPDF context what handles keystrokes and |
/** FenPDF context what handles keystrokes and |
41 |
* accursed node at least. |
* accursed node at least. |
197 |
* what this should even do? |
* what this should even do? |
198 |
*/ |
*/ |
199 |
public Object doMouse(MouseEvent e, VobScene oldVS) |
public Object doMouse(MouseEvent e, VobScene oldVS) |
200 |
throws RemoteException, IOException |
throws RemoteException, IOException, RDFException |
201 |
{ |
{ |
202 |
if (e.getID() != MouseEvent.MOUSE_CLICKED) return null; |
if (e.getID() != MouseEvent.MOUSE_CLICKED) return null; |
203 |
int cs = oldVS.coords.getCSAt(0, e.getX(), e.getY(), null); |
int cs = oldVS.coords.getCSAt(0, e.getX(), e.getY(), null); |
229 |
return new MainNode2D(Nodes.get(paper), ppView, 0,0,1); |
return new MainNode2D(Nodes.get(paper), ppView, 0,0,1); |
230 |
} |
} |
231 |
else if (key.equals("SAVE")) { |
else if (key.equals("SAVE")) { |
232 |
p("Not implemented"); |
Model m = Graphs.toModel(fen.graph); |
233 |
|
m.write(new FileWriter("~/mygraph.rdf")); |
234 |
return null; |
return null; |
235 |
} |
} |
236 |
else if (key.equals("LOAD")) { |
else if (key.equals("LOAD")) { |