01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.printing.ui.internal.editor.parts;
16:
17: import net.refractions.udig.printing.ui.internal.editor.BoxAction;
18:
19: import org.eclipse.gef.Request;
20: import org.eclipse.gef.editpolicies.AbstractEditPolicy;
21:
22: /**
23: * EditPolicy for {@link LabelPart}.
24: *
25: * @author Jesse
26: * @since 1.1.0
27: */
28: public class PrintingEditPolicy extends AbstractEditPolicy {
29:
30: private BoxAction action;
31:
32: public PrintingEditPolicy(BoxAction action2) {
33: this .action = action2;
34: }
35:
36: @Override
37: public boolean understandsRequest(Request req) {
38: return req.getType() == action.getRequest().getType();
39: }
40:
41: public BoxAction getAction() {
42: return action;
43: }
44:
45: }
|