svn-gvsig-desktop / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / layout / contextmenu / gui / AbstractLayoutContextMenuAction.java @ 36443
History | View | Annotate | Download (1.73 KB)
1 |
package org.gvsig.app.project.documents.layout.contextmenu.gui; |
---|---|
2 |
|
3 |
import java.util.Map; |
4 |
|
5 |
import org.slf4j.Logger; |
6 |
import org.slf4j.LoggerFactory; |
7 |
|
8 |
import org.gvsig.app.project.documents.layout.LayoutContext; |
9 |
import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
10 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
11 |
import org.gvsig.app.project.documents.view.AbstractContextMenuAction; |
12 |
import org.gvsig.tools.extensionpoint.ExtensionBuilder; |
13 |
|
14 |
|
15 |
public abstract class AbstractLayoutContextMenuAction extends |
16 |
AbstractContextMenuAction implements ExtensionBuilder {
|
17 |
protected static final Logger LOG = LoggerFactory.getLogger(AbstractLayoutContextMenuAction.class); |
18 |
private LayoutPanel layout;
|
19 |
|
20 |
public LayoutPanel getLayout() {
|
21 |
return this.layout; |
22 |
} |
23 |
|
24 |
public void setLayout(LayoutPanel layout) { |
25 |
this.layout = layout;
|
26 |
} |
27 |
|
28 |
public boolean isEnabled(LayoutContext layoutContext, IFFrame[] selectedFrames) { |
29 |
return true; |
30 |
} |
31 |
|
32 |
public boolean isVisible(LayoutContext layoutContext, IFFrame[] selectedFrames) { |
33 |
return true; |
34 |
} |
35 |
|
36 |
public abstract void execute(LayoutContext layoutContext, IFFrame[] selectedFrames); |
37 |
|
38 |
public Object create() { |
39 |
return this; |
40 |
} |
41 |
|
42 |
public Object create(Map args) { |
43 |
// TODO Auto-generated method stub
|
44 |
return this; |
45 |
} |
46 |
|
47 |
public Object create(Object[] args) { |
48 |
// TODO Auto-generated method stub
|
49 |
return this; |
50 |
} |
51 |
|
52 |
public boolean isEnabled(Object item, Object[] selectedItems) { |
53 |
return isEnabled((LayoutContext)item,(IFFrame[]) selectedItems); |
54 |
} |
55 |
|
56 |
public boolean isVisible(Object item, Object[] selectedItems) { |
57 |
return isVisible((LayoutContext)item,(IFFrame[]) selectedItems); |
58 |
} |
59 |
|
60 |
public void execute(Object item, Object[] selectedItems) { |
61 |
execute((LayoutContext)item,(IFFrame[]) selectedItems);
|
62 |
|
63 |
} |
64 |
|
65 |
} |