21 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
22 |
import java.awt.Color; |
import java.awt.Color; |
23 |
|
|
24 |
|
import java.io.*; |
25 |
|
import java.awt.FileDialog; |
26 |
|
import java.awt.Frame; |
27 |
|
|
28 |
|
|
29 |
/** FenPDF context what handles keystrokes and |
/** FenPDF context what handles keystrokes and |
30 |
* accursed node at least. |
* accursed node at least. |
31 |
*/ |
*/ |
179 |
|
|
180 |
|
|
181 |
/** @return object of new plane for mainnode view 2d |
/** @return object of new plane for mainnode view 2d |
182 |
|
* or what??? XXX |
183 |
|
* what this should even do? |
184 |
*/ |
*/ |
185 |
public Object doMouse(MouseEvent e, VobScene oldVS) throws RemoteException { |
public Object doMouse(MouseEvent e, VobScene oldVS) throws RemoteException { |
186 |
if (e.getID() != MouseEvent.MOUSE_CLICKED) return null; |
if (e.getID() != MouseEvent.MOUSE_CLICKED) return null; |
191 |
if (obKey instanceof String) { |
if (obKey instanceof String) { |
192 |
String key = (String)obKey; |
String key = (String)obKey; |
193 |
if (dbg) p("found something! "+key); |
if (dbg) p("found something! "+key); |
194 |
if (key.equals("IMPORT")) p("NOT IMPLEMENTED"); |
if (key.equals("IMPORT")) { |
195 |
|
Frame f = new Frame(); |
196 |
|
FileDialog fd = new FileDialog(f, "Valitse liitettava kuva", |
197 |
|
FileDialog.LOAD); |
198 |
|
fd.setModal(true); |
199 |
|
fd.show(); |
200 |
|
fd.hide(); |
201 |
|
p("ps/pdf to be added: "+fd.getDirectory()+fd.getFile()); |
202 |
|
p("unfortunately - NOT IMPLEMENTED"); |
203 |
|
} |
204 |
else if (key.equals("LINK")) { |
else if (key.equals("LINK")) { |
205 |
if (CURR >0) actionLink(1); else actionLink(-1); |
if (CURR >0) actionLink(1); else actionLink(-1); |
206 |
} |
} |