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 @ 44006
History | View | Annotate | Download (1.66 KB)
1 |
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 |
|
11 |
/**
|
12 |
*
|
13 |
* @author jjdelcerro
|
14 |
*/
|
15 |
public class ViewElement |
16 |
extends AbstractElement
|
17 |
implements GroupElement
|
18 |
{ |
19 |
|
20 |
private final List<Element> childs; |
21 |
|
22 |
public ViewElement() {
|
23 |
super("View", null, "expressionbuilder-element-view"); |
24 |
this.childs = new ArrayList<>(); |
25 |
this.childs.add(new ViewCaptureRectangleElement()); |
26 |
this.childs.add(new ViewCapturePointElement()); |
27 |
this.childs.add(new ViewTakeProjectionCodeElement()); |
28 |
} |
29 |
|
30 |
@Override
|
31 |
public Element get(int index) { |
32 |
return this.childs.get(index); |
33 |
} |
34 |
|
35 |
@Override
|
36 |
public int size() { |
37 |
return this.childs.size(); |
38 |
} |
39 |
|
40 |
@Override
|
41 |
public Iterator<Element> iterator() { |
42 |
return this.childs.iterator(); |
43 |
} |
44 |
|
45 |
@Override
|
46 |
public void addElement(Element element) { |
47 |
this.childs.add(element);
|
48 |
} |
49 |
|
50 |
@Override
|
51 |
public void addElement(Function function) { |
52 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
53 |
} |
54 |
|
55 |
@Override
|
56 |
public List<Element> getElements() { |
57 |
return this.childs; |
58 |
} |
59 |
|
60 |
@Override
|
61 |
public boolean hasSubgroups() { |
62 |
return false; |
63 |
} |
64 |
|
65 |
@Override
|
66 |
public boolean hasMoreElements() { |
67 |
return false; |
68 |
} |
69 |
|
70 |
} |