01: /**
02: * Miroslav Popov, Sep 1, 2005
03: */package org.enhydra.jawe.base.controller.actions.defaultactions;
04:
05: import java.awt.event.ActionEvent;
06:
07: import org.enhydra.jawe.ActionBase;
08: import org.enhydra.jawe.JaWEComponent;
09: import org.enhydra.jawe.base.controller.JaWEController;
10:
11: /**
12: * @author Miroslav Popov
13: *
14: */
15: public class Paste extends ActionBase {
16:
17: public Paste(JaWEComponent jawecomponent) {
18: super (jawecomponent);
19: }
20:
21: public void enableDisableAction() {
22: JaWEController jc = (JaWEController) jawecomponent;
23:
24: if (jc.getSelectionManager().canPaste())
25: setEnabled(true);
26: else
27: setEnabled(false);
28: }
29:
30: public void actionPerformed(ActionEvent e) {
31: ((JaWEController) jawecomponent).getEdit().paste();
32: }
33: }
|