Revision 6776
trunk/extensions/extScripting/scripts/jython/Lib/gvsiglib.py | ||
---|---|---|
1 |
|
|
2 |
import sys |
|
3 |
from java.io import File |
|
4 |
|
|
5 |
# Cuando se importa desde la consola no esta definida |
|
6 |
# la variable global gvSIG |
|
7 |
try: |
|
8 |
sys.gvSIG = gvSIG |
|
9 |
except: |
|
10 |
gvSIG = sys.gvSIG |
|
11 |
|
|
12 |
|
|
13 |
# Add Scripts/jython/Libs to path |
|
14 |
sys.path.append(gvSIG.getScriptsDirectory()+File.separatorChar+"jython"+File.separatorChar+"Lib") |
|
15 |
|
|
16 |
# Add Scripts/jython to path |
|
17 |
sys.path.append(gvSIG.getScriptsDirectory()+File.separatorChar+"jython") |
|
18 |
|
|
19 |
# Add Scripts to path |
|
20 |
sys.path.append(gvSIG.getScriptsDirectory()) |
|
21 |
|
|
22 |
|
|
23 |
True = 1 == 1 |
|
24 |
False = 0 == 1 |
|
25 |
|
|
26 |
FSymbol = gvSIG.classForName("com.iver.cit.gvsig.fmap.core.v02.FSymbol") |
|
27 |
FConstant = gvSIG.classForName("com.iver.cit.gvsig.fmap.core.v02.FConstant") |
|
28 |
FGraphic = gvSIG.classForName("com.iver.cit.gvsig.fmap.rendering.FGraphic") |
|
29 |
PointListener=gvSIG.classForName("com.iver.cit.gvsig.fmap.tools.Listeners.PointListener") |
|
30 |
PointBehavior=gvSIG.classForName("com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior") |
|
31 |
SaxContentHandler=gvSIG.classForName("org.xml.sax.ContentHandler") |
|
32 |
LayerFactory=gvSIG.classForName("com.iver.cit.gvsig.fmap.layers.LayerFactory") |
|
33 |
DataSourceFactory=LayerFactory.getDataSourceFactory() |
|
34 |
ShapeFactory = gvSIG.classForName("com.iver.cit.gvsig.fmap.core.ShapeFactory") |
|
35 |
|
|
36 |
|
|
37 |
def showMessageDialog(msg): |
|
38 |
from javax.swing import JOptionPane |
|
39 |
|
|
40 |
JOptionPane.showMessageDialog(None, msg) |
|
0 | 41 |
Also available in: Unified diff