Revision 180

View differences:

org.gvsig.dxf/trunk/org.gvsig.dxf/pom.xml
11 11
  <parent>
12 12
      <groupId>org.gvsig</groupId>
13 13
      <artifactId>org.gvsig.desktop</artifactId>
14
      <version>2.0.132</version>
14
      <version>2.0.133</version>
15 15
  </parent>
16 16

  
17 17
  <url>https://devel.gvsig.org/redmine/projects/gvsig-dxf</url>
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLabeling.java
21 21
 */
22 22

  
23 23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
24
 * AUTHORS (In addition to CIT):
25
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
28 27
package org.gvsig.fmap.dal.store.dxf.legend;
29 28

  
30 29
import org.gvsig.fmap.dal.exception.OpenException;
......
38 37
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
39 38

  
40 39
public class DXFGetLabeling implements DynMethod {
41
	private static Integer code = null;
42 40

  
43
	static void register(DynClass dxfLegendDynClass) {
44
		if (code != null) {
45
			return;
46
		}
47
		code = new Integer(ToolsLocator.getDynObjectManager()
48
				.registerDynMethod(dxfLegendDynClass, new DXFGetLabeling()));
41
    private static Integer code = null;
49 42

  
50
	}
51
	public int getCode() throws DynMethodNotSupportedException {
52
		return code.intValue();
53
	}
43
    static void register(DynClass dxfLegendDynClass) {
44
        if (code != null) {
45
            return;
46
        }
47
        code = ToolsLocator.getDynObjectManager()
48
                .registerDynMethod(dxfLegendDynClass, new DXFGetLabeling());
54 49

  
55
	public String getDescription() {
56
		return "DXF Labeling";
57
	}
50
    }
58 51

  
59
	public String getName() {
60
		return LegendBuilder.DYNMETHOD_GETLABELING_NAME;
61
	}
52
    @Override
53
    public int getCode() throws DynMethodNotSupportedException {
54
        return code;
55
    }
62 56

  
63
	public Object invoke(Object self, DynObject context)
64
			throws DynMethodException {
65
		try {
66
			return ((DXFStoreProvider) self).getLabeling();
67
		} catch (OpenException e) {
68
			//FIXME
69
			throw new RuntimeException(e);
70
		}
71
	}
57
    @Override
58
    public String getDescription() {
59
        return "DXF Labeling";
60
    }
72 61

  
62
    @Override
63
    public String getName() {
64
        return LegendBuilder.DYNMETHOD_GETLABELING_NAME;
65
    }
66

  
67
    @Override
68
    public Object invoke(DynObject self, Object[] args)
69
            throws DynMethodException {
70
        try {
71
            return ((DXFStoreProvider) self).getLabeling();
72
        } catch (OpenException e) {
73
            //FIXME
74
            throw new RuntimeException(e);
75
        }
76
    }
77

  
78
    @Override
79
    public Object clone() throws CloneNotSupportedException {
80
        return super.clone();
81
    }
82

  
73 83
}
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegend.java
21 21
 */
22 22

  
23 23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
24
 * AUTHORS (In addition to CIT):
25
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
28 27
package org.gvsig.fmap.dal.store.dxf.legend;
29 28

  
30 29
import org.gvsig.fmap.dal.exception.OpenException;
......
38 37
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
39 38

  
40 39
public class DXFGetLegend implements DynMethod {
41
	private static Integer code = null;
42 40

  
43
	static void register(DynClass dxfLegendDynClass) {
44
		if (code != null) {
45
			return;
46
		}
47
		code = new Integer(ToolsLocator.getDynObjectManager()
48
				.registerDynMethod(dxfLegendDynClass, new DXFGetLegend()));
41
    private static Integer code = null;
49 42

  
50
	}
51
	public int getCode() throws DynMethodNotSupportedException {
52
		return code.intValue();
53
	}
43
    static void register(DynClass dxfLegendDynClass) {
44
        if (code != null) {
45
            return;
46
        }
47
        code = ToolsLocator.getDynObjectManager()
48
                .registerDynMethod(dxfLegendDynClass, new DXFGetLegend());
54 49

  
55
	public String getDescription() {
56
		return "DXF Legend";
57
	}
50
    }
58 51

  
59
	public String getName() {
60
		return LegendBuilder.DYNMETHOD_GETLEGEND_NAME;
61
	}
52
    @Override
53
    public int getCode() throws DynMethodNotSupportedException {
54
        return code;
55
    }
62 56

  
63
	public Object invoke(Object self, DynObject context)
64
			throws DynMethodException {
65
		try {
66
			return ((DXFStoreProvider) self).getLegend();
67
		} catch (OpenException e) {
68
			//FIXME
69
			throw new RuntimeException(e);
70
		}
71
	}
57
    @Override
58
    public String getDescription() {
59
        return "DXF Legend";
60
    }
72 61

  
62
    @Override
63
    public String getName() {
64
        return LegendBuilder.DYNMETHOD_GETLEGEND_NAME;
65
    }
66

  
67
    @Override
68
    public Object invoke(DynObject self, Object[] args)
69
            throws DynMethodException {
70
        try {
71
            return ((DXFStoreProvider) self).getLegend();
72
        } catch (OpenException e) {
73
            //FIXME
74
            throw new RuntimeException(e);
75
        }
76
    }
77

  
78
    @Override
79
    public Object clone() throws CloneNotSupportedException {
80
        return super.clone(); 
81
    }
82

  
73 83
}
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegendBuilder.java
21 21
 */
22 22

  
23 23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
24
 * AUTHORS (In addition to CIT):
25
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
28 27
package org.gvsig.fmap.dal.store.dxf.legend;
29 28

  
30 29
import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
......
36 35
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
37 36

  
38 37
public class DXFGetLegendBuilder implements DynMethod {
39
	private static Integer code = null;
40 38

  
41
	static void register(DynClass dxfLegendDynClass) {
42
		if (code != null) {
43
			return;
44
		}
45
		code = new Integer(ToolsLocator.getDynObjectManager()
46
				.registerDynMethod(
47
						dxfLegendDynClass, new DXFGetLegendBuilder()));
39
    private static Integer code = null;
48 40

  
49
	}
50
	public int getCode() throws DynMethodNotSupportedException {
51
		return code.intValue();
52
	}
41
    static void register(DynClass dxfLegendDynClass) {
42
        if (code != null) {
43
            return;
44
        }
45
        code = ToolsLocator.getDynObjectManager()
46
                .registerDynMethod(
47
                        dxfLegendDynClass, new DXFGetLegendBuilder());
53 48

  
54
	public String getDescription() {
55
		return "DXF LegendBuilder creator";
56
	}
49
    }
57 50

  
58
	public String getName() {
59
		return LegendBuilder.DYNMETHOD_BUILDER_NAME;
60
	}
51
    @Override
52
    public int getCode() throws DynMethodNotSupportedException {
53
        return code;
54
    }
61 55

  
62
	public Object invoke(Object self, DynObject context)
63
			throws DynMethodException {
64
		return new DXFLegendBuilder();
65
	}
56
    @Override
57
    public String getDescription() {
58
        return "DXF LegendBuilder creator";
59
    }
66 60

  
61
    @Override
62
    public String getName() {
63
        return LegendBuilder.DYNMETHOD_BUILDER_NAME;
64
    }
65

  
66
    @Override
67
    public Object invoke(DynObject self, Object[] args)
68
            throws DynMethodException {
69
        return new DXFLegendBuilder();
70
    }
71

  
72
    @Override
73
    public Object clone() throws CloneNotSupportedException {
74
        return super.clone();
75
    }
76

  
77
    
67 78
}

Also available in: Unified diff