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 | 29598 | jpiera | package org.gvsig.app.project.documents.layout.contextmenu.gui; |
---|---|---|---|
2 | 9807 | caballero | |
3 | import java.util.Map; |
||
4 | |||
5 | 33638 | jpiera | import org.slf4j.Logger; |
6 | import org.slf4j.LoggerFactory; |
||
7 | |||
8 | 29598 | jpiera | import org.gvsig.app.project.documents.layout.LayoutContext; |
9 | import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
||
10 | 31496 | jjdelcerro | import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
11 | import org.gvsig.app.project.documents.view.AbstractContextMenuAction; |
||
12 | 25013 | jmvivo | import org.gvsig.tools.extensionpoint.ExtensionBuilder; |
13 | |||
14 | 9807 | caballero | |
15 | 25013 | jmvivo | public abstract class AbstractLayoutContextMenuAction extends |
16 | AbstractContextMenuAction implements ExtensionBuilder {
|
||
17 | 33638 | jpiera | protected static final Logger LOG = LoggerFactory.getLogger(AbstractLayoutContextMenuAction.class); |
18 | private LayoutPanel layout;
|
||
19 | 9807 | caballero | |
20 | 31496 | jjdelcerro | public LayoutPanel getLayout() {
|
21 | 9807 | caballero | return this.layout; |
22 | } |
||
23 | |||
24 | 31496 | jjdelcerro | public void setLayout(LayoutPanel layout) { |
25 | 9807 | caballero | 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 | } |