Revision 269 org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLegend.java
DGNGetLegend.java | ||
---|---|---|
31 | 31 |
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider; |
32 | 32 |
import org.gvsig.fmap.dal.store.dgn.LegendBuilder; |
33 | 33 |
import org.gvsig.tools.ToolsLocator; |
34 |
import org.gvsig.tools.dynobject.AbstractDynMethod; |
|
34 | 35 |
import org.gvsig.tools.dynobject.DynClass; |
35 |
import org.gvsig.tools.dynobject.DynMethod; |
|
36 | 36 |
import org.gvsig.tools.dynobject.DynObject; |
37 | 37 |
import org.gvsig.tools.dynobject.DynObjectManager; |
38 | 38 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
39 | 39 |
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException; |
40 | 40 |
|
41 |
public class DGNGetLegend implements DynMethod {
|
|
41 |
public class DGNGetLegend extends AbstractDynMethod {
|
|
42 | 42 |
private static int code = DynObjectManager.NULLCODE; |
43 | 43 |
|
44 | 44 |
static void register(DynClass DGNDynClass) { |
... | ... | |
51 | 51 |
); |
52 | 52 |
|
53 | 53 |
} |
54 |
|
|
55 |
public DGNGetLegend() { |
|
56 |
super(LegendBuilder.DYNMETHOD_GETLEGEND_NAME,"DGN Legend"); |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
54 | 60 |
public int getCode() throws DynMethodNotSupportedException { |
55 | 61 |
return code; |
56 | 62 |
} |
57 | 63 |
|
58 |
public String getDescription() { |
|
59 |
return "DGN Legend"; |
|
60 |
} |
|
61 |
|
|
62 |
public String getName() { |
|
63 |
return LegendBuilder.DYNMETHOD_GETLEGEND_NAME; |
|
64 |
} |
|
65 |
|
|
66 |
public Object invoke(Object self, DynObject context) |
|
64 |
@Override |
|
65 |
public Object invoke(DynObject self, Object[] args) |
|
67 | 66 |
throws DynMethodException { |
68 | 67 |
try { |
69 | 68 |
return ((DGNStoreProvider) self).getLegend(); |
Also available in: Unified diff