svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / documents / view / expressionevaluator / ViewElement.java @ 44129
History | View | Annotate | Download (1.74 KB)
1 | 44006 | jjdelcerro | package org.gvsig.app.project.documents.view.expressionevaluator; |
---|---|---|---|
2 | |||
3 | import java.util.ArrayList; |
||
4 | import java.util.Iterator; |
||
5 | import java.util.List; |
||
6 | import org.gvsig.expressionevaluator.Function; |
||
7 | import org.gvsig.expressionevaluator.swing.Element; |
||
8 | import org.gvsig.expressionevaluator.swing.Element.GroupElement; |
||
9 | import org.gvsig.expressionevaluator.swing.spi.AbstractElement; |
||
10 | 44011 | jjdelcerro | import org.gvsig.tools.ToolsLocator; |
11 | 44006 | jjdelcerro | |
12 | /**
|
||
13 | *
|
||
14 | * @author jjdelcerro
|
||
15 | */
|
||
16 | public class ViewElement |
||
17 | extends AbstractElement
|
||
18 | implements GroupElement
|
||
19 | { |
||
20 | |||
21 | private final List<Element> childs; |
||
22 | |||
23 | public ViewElement() {
|
||
24 | 44129 | jjdelcerro | super(ToolsLocator.getI18nManager().getTranslation("View"), "expressionbuilder-element-view"); |
25 | 44006 | jjdelcerro | this.childs = new ArrayList<>(); |
26 | this.childs.add(new ViewCaptureRectangleElement()); |
||
27 | this.childs.add(new ViewCapturePointElement()); |
||
28 | this.childs.add(new ViewTakeProjectionCodeElement()); |
||
29 | } |
||
30 | |||
31 | @Override
|
||
32 | public Element get(int index) { |
||
33 | return this.childs.get(index); |
||
34 | } |
||
35 | |||
36 | @Override
|
||
37 | public int size() { |
||
38 | return this.childs.size(); |
||
39 | } |
||
40 | |||
41 | @Override
|
||
42 | public Iterator<Element> iterator() { |
||
43 | return this.childs.iterator(); |
||
44 | } |
||
45 | |||
46 | @Override
|
||
47 | public void addElement(Element element) { |
||
48 | this.childs.add(element);
|
||
49 | } |
||
50 | |||
51 | @Override
|
||
52 | public void addElement(Function function) { |
||
53 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
54 | } |
||
55 | |||
56 | @Override
|
||
57 | public List<Element> getElements() { |
||
58 | return this.childs; |
||
59 | } |
||
60 | |||
61 | @Override
|
||
62 | public boolean hasSubgroups() { |
||
63 | return false; |
||
64 | } |
||
65 | |||
66 | @Override
|
||
67 | public boolean hasMoreElements() { |
||
68 | return false; |
||
69 | } |
||
70 | |||
71 | } |