KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > actions > PasteAt


1 /*
2  * Authors:
3  * Stefanovic Nenad chupo@iis.ns.ac.yu
4  * Bojanic Sasa sasaboy@neobee.net
5  * Puskas Vladimir vpuskas@eunet.yu
6  * Pilipovic Goran zboniek@uns.ac.yu
7  *
8  */

9
10 package org.enhydra.jawe.actions;
11
12 import org.enhydra.jawe.*;
13 import org.enhydra.jawe.xml.*;
14 import org.enhydra.jawe.xml.elements.*;
15 import org.enhydra.jawe.xml.panels.*;
16
17 import java.awt.event.ActionEvent JavaDoc;
18 import javax.swing.*;
19 import java.awt.*;
20
21 /**
22 * Class that realizes <B>pasteAt</B> action.
23 * Pastes selected cells to clipboard.
24 */

25 public class PasteAt extends ActionBase {
26
27    public PasteAt (ProcessEditor pe) {
28       super(pe);
29    }
30
31    public void actionPerformed(ActionEvent JavaDoc e) {
32       JaWEMarqueeHandler pemh = (JaWEMarqueeHandler)editor.getGraph().getMarqueeHandler();
33       Point pasteTo=pemh.getPopupPoint();
34       JaWEGraphUI peui=(JaWEGraphUI)editor.getGraph().getUI();
35       peui.setInsertionPoint(pasteTo);
36       Action graphPasteAction=editor.getGraph().getTransferHandler().getPasteAction();
37       graphPasteAction.actionPerformed(e);
38       peui.setInsertionPoint(null);
39    }
40 }
41
Popular Tags