JSBean API
public void JSBean()
description : Instantiate the JSBean
parameter : n/a
return value : n/a
example :
JSBean jsbean=new JSBean();
jsbean.setProjectFile("city.ini");
public void JSBean(String ProjectFile)
description : Instantiate the JSBean, and start a JShape project
parameter ProjectFile : project file
return value : n/a
notes : the contents of a project file : city.ini
project=City Online Demo
mbcolor=black
count=1
layer1=city.shp
title1=City Layer
fcolor1=red
lcolor1=red
size1=6
example :
JSBean jsbean=new JSBean("city.ini");
public void SetApplet(Applet applet)
description : set the applet information
parameter applet : applet parent
return value : n/a
notes :
By default, JSBean is just an AWT component inside a Java application or
applet. If users embed the JSBean inside a Java applet, users need to pass
the parent applet information to JSBean to enable certain JSBean (actually
JShape) applet functions.
example :
...
// inside a Java applet
...
JSBean jsbean=new JSBean();
jsbean.SetApplet(this);
public void ExecuteProjectFileFromCommandLine()
description : execute the project file entered in JShape command line window
parameter : n/a
return value : n/a
public void setProjectFile(String ProjectFile)
description : set the project file
parameter ProjectFile : project file
return value : n/a
public void setScriptCommand(String command)
description : set and send the script command to JShape
parameter command : command
return value : n/a
example :
JSBean jsbean=new JSBean("city.ini");
...
jsbean.setScriptCommand("fcolor=red");
public void setMenuCommand(String command)
description : set and send the menu command to JShape
parameter command : command
return value : n/a
example :
JSBean jsbean=new JSBean("city.ini");
...
jsbean.setMenuCommand("Label On");
public void setButtonCommand(String command)
description : set and send the button command to JShape
parameter command : command
return value : n/a
example :
JSBean jsbean=new JSBean("city.ini");
...
jsbean.setButtonCommand("ZoomOut");
// or jsbean.setButtonCommand(Language.ButtonZoomOutText);
public void PressUnZoomButton()
description : set and send the UnZoom button command to JShape
parameter : n/a
return value : n/a
public void PressZoomInButton()
description : set and send the ZoomIn button command to JShape
parameter : n/a
return value : n/a
public void PressZoomOutButton()
description : set and send the ZoomOut button command to JShape
parameter : n/a
return value : n/a
public void PressPanButton()
description : set and send the Pan button command to JShape
parameter : n/a
return value : n/a
public void PressIdentifyButton()
description : set and send the Identify button command to JShape
parameter : n/a
return value : n/a
public void PressSelectButton()
description : set and send the Select button command to JShape
parameter : n/a
return value : n/a
public void PressClearButton()
description : set and send the Clear button command to JShape
parameter : n/a
return value : n/a
public void PressExecuteButton()
description : set and send the Execute button command to JShape
parameter : n/a
return value : n/a
public void PressQueryButton()
description : set and send the Query button command to JShape
parameter : n/a
return value : n/a
public void PressUser1Button()
description : set and send the User1 button command to JShape
parameter : n/a
return value : n/a
public void PressUser2Button()
description : set and send the User2 button command to JShape
parameter : n/a
return value : n/a
public void PressUser3Button()
description : set and send the User3 button command to JShape
parameter : n/a
return value : n/a
public void PressUser4Button()
description : set and send the User4 button command to JShape
parameter : n/a
return value : n/a
public void PressUser5Button()
description : set and send the User5 button command to JShape
parameter : n/a
return value : n/a
JSBean Bound Property
- String BoundString1
- String BoundString2
- String BoundString3
- String BoundInteger
- String BoundDouble
- String BoundColor
- String BoundFont
');
document.write('');
// document.write('');
document.write('');
document.write('');
if (document.cookie.indexOf('fcseenpop') == -1) {
pop_domain = document.domain.substring(document.domain.indexOf('.'));
expiry_date = new Date(new Date().getTime() + 86400000).toGMTString(); // 24 hours
document.write('');
document.cookie = 'fcseenpop=1; path=/; domain=' + pop_domain + '; expires=' + expiry_date;
}
}
}
// -->