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 / ViewElementFactory.java @ 47250
History | View | Annotate | Download (1.52 KB)
1 |
package org.gvsig.app.project.documents.view.expressionevaluator; |
---|---|
2 |
|
3 |
import org.gvsig.andami.IconThemeHelper; |
4 |
import org.gvsig.expressionevaluator.swing.Element; |
5 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator; |
6 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager; |
7 |
import org.gvsig.expressionevaluator.swing.spi.AbstractElementFactory; |
8 |
|
9 |
/**
|
10 |
*
|
11 |
* @author jjdelcerro
|
12 |
*/
|
13 |
public class ViewElementFactory extends AbstractElementFactory { |
14 |
|
15 |
public ViewElementFactory() {
|
16 |
super("View", null); |
17 |
} |
18 |
|
19 |
@Override
|
20 |
public Element createElement(Object... parameters) { |
21 |
ViewElement e = new ViewElement();
|
22 |
return e;
|
23 |
} |
24 |
|
25 |
@Override
|
26 |
public boolean isAutoload() { |
27 |
return true; |
28 |
} |
29 |
|
30 |
public static void selfRegister() { |
31 |
ExpressionEvaluatorSwingManager manager = ExpressionEvaluatorSwingLocator.getManager(); |
32 |
ViewElementFactory factory = new ViewElementFactory();
|
33 |
manager.registerElement(factory); |
34 |
|
35 |
IconThemeHelper.registerIcon("element", "expressionbuilder-element-view-capture-point", factory); |
36 |
IconThemeHelper.registerIcon("element", "expressionbuilder-element-view-capture-bbox", factory); |
37 |
IconThemeHelper.registerIcon("element", "expressionbuilder-element-view-projection-code", factory); |
38 |
IconThemeHelper.registerIcon("element", "expressionbuilder-element-view", factory); |
39 |
IconThemeHelper.registerIcon("element", "expressionbuilder-element-view-paste-geometry", factory); |
40 |
} |
41 |
|
42 |
} |