Sunteți pe pagina 1din 37

ALOV Map/TMJava.

Free Java GIS

QUICK START
You need some map data of your own (in ESRI Shapefile format or MapInfo MIF) or you can get started with the data provided with the demoes. You should also have a web browser which fully supports Java 1.1 or higher. Download the latest version of the applet The easiest way to setup ALOV Map is to store alov_applet.jar file, your HTML files and shape or MIF files into the same directory. 1. Assuming that you have a WWW directory http://www. [yourserver].com/alovmap and a GIS shapefile "cities.shp". 2. Create a file myproject.xml. <?xml version="1.0"?>
<project> <layer name="Cities"> <dataset url="cities.shp"/> <symbol fill="0:0:255" outline="0:128:255" size="6"/> </layer> </project>

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

Pay attention on char case in file names. NOTE: MIF files should be in pair with DBF files (not with MID). 3. Create an HTML file "mydemo.html". The simplest file will look like the following <html>
<applet codebase =. code = org.alov.viewer.SarApplet archive = alov_applet.jar width = 500 height = 300 align=center> <param name="pid" value="myproject.xml"> </applet> </html>

4. Copy alov_applet.jar, cities.shp, cities.dbf, mydemo.html and myproject.xml to your web directory. 5. Now you can publish your GIS shapefile "cities.shp" through http://www.[yourserver].com/alovmap/mydemo.html

top next

ALOV 2002-2005
http://alov.org/docs/quickstart.html8/5/2005 09:01:28

ALOV Map/TMJava. Free Java GIS

APPLICATION SERVER SETUP

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

ALOV Map's server side is implemented using Java servlets and filters. They are running on our server under Tomcat 4.x. You may use any other server that is Servlet 2.2 compliant. Tomcat can be downloaded from http://jakarta.apache.org/tomcat/ index.html. Step-by-step instructions for installing server software under Tomcat: 1. Create a dir in [TOMCAT_HOME]/webapps. 2. Unzip the distribution zip file into this folder. 3. The distribution contains demo an MS Access database which is the alovbase.mdb file in the [installation_dir]/base dir. You have to create an ODBC DSN "ALOVBASE" for this database. 4. Run Tomcat. Using your browser (depending on your configuration) go to : http://yourhost:port/[installation dir]/ index.html You may use as demo the MySQL, Interbase or Hypersonic databases. 1. Download it from our download page. 2. Restore the database from dump. 3. If needed, download and install the appropriate JDBC driver MySQL: http://www.mysql.com/downloads/api-jdbc. html Interbase: http://info.borland.com/devsupport/ interbase/opensource Hypersonic: http://hsqldb.sourceforge.net/ 7. Ensure the JDBC driver that you are using is installed either at [TOMCAT_HOME]/lib [TOMCAT_HOME]/webapps/[installation_dir]/WEB-INF/ lib. 10. Either enter in admin zone and define location of database or in the installation folder, find the dir WEB_INF/mapserv-home. Open the file mapserv.xml and setup the connection parameters for the appropriate database manually. For MySQL
<clearinghouse type="db"> <database url="jdbc:mysql://localhost/alov?autoReconnect=true" user="sa" password="" driver="org.gjt.mm.mysql.Driver"/> </clearinghouse>

DOCUMENTATION
q q q q q q q q q q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

For Interbase
<clearinghouse type="db"> <database url="jdbc:interbase://localhost/[path]/alov.gdb"

http://alov.org/docs/setup.html (1 of 2)8/5/2005 09:02:32

ALOV Map/TMJava. Free Java GIS


user="SYSDBA" password="masterkey" driver="interbase.interclient.Driver"/> </clearinghouse>

For Hypersonic
<clearinghouse type="db"> <database url="jdbc:hsqldb:hsql://localhost:3309" user="sa" password="" driver="org.hsqldb.jdbcDriver"/> </clearinghouse>

previous top next

ALOV 2002-2005

http://alov.org/docs/setup.html (2 of 2)8/5/2005 09:02:32

ALOV Map/TMJava. Free Java GIS

STRUCTURE OF APPLICATION
A complete ALOV Map application is consituted of three elements :
q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

CLIENT - a thin HTML client, which enables the user to perform URL requests to ALOV driven Web Map Service and obtain maps rendered in a pictorial format such as GIF or JPEG. OR - a client applet, which enables the user to retrieve and handle the vector and raster map using the map tools (zoom, pan, select...) and applet's components. GIS DATA Vector
q

DOCUMENTATION
q q q q q q q q q q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

ESRI shapefiles can contain points, multipoints, polylines and polygons objects. The attribute data should be in dBaseIV. MapInfo MIF should be in pair with DBF (dBaseIV) file not with MID. MIF can contain REGION, PLINE MULTIPLE, PLINE, LINE and POINT. All objects must be of the same type. SQL database. Currently Interbase, MySQL, MSSQL and Hypersonic are being tested. It is supposed that any SQL server with JDBC driver can be used. There is a dedicated WWW interface to upload data from shape or MIF files to an SQL database and to register them in ALOV Clearinhouse base.

Raster
q q q

GIF and JPG image files. MrSID image server by LizardTech Software OpenGIS Web Map Service

SERVER and CLEARINGHOUSE DATABASE

ALOV Map's server side is implemented using Java servlets. Clearinghouse database is an SQL database or an XML document includes records where the description of GIS datasets is stored. These records include descriptive data for resource discovery allowing identification of resources relevant to a particular place, time or thematic interest. They also contain connection parameters for each dataset which allows server to connect to the data servers across the Internet (or to local files).

http://alov.org/docs/appscheme.html (1 of 2)8/5/2005 09:03:05

ALOV Map/TMJava. Free Java GIS

previous top next

ALOV 2002-2005

http://alov.org/docs/appscheme.html (2 of 2)8/5/2005 09:03:05

ALOV Map/TMJava. Free Java GIS

ADMIN ZONE. UPLOAD AND REGISTER YOUR GIS DATA


Assumed that you were able to install and run ALOV map client/server demo.
q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

Entering the admin zone Using your browser go to : http://yourhost:port/[installation_dir]/pump Enter the default values username = Administrator and password = masterkey To change username and password go in the installation folder, find the dir WEB_INF/mapserv-home. Open the file mapserv.xml and change the login parameters:
<master user="username" password="your_password" ip="*"/>

DOCUMENTATION
q q q q q q q q q q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

You may prevent entering the admin zone from other computers by setting the ip attribute. The asterisk joker means that the connection may be performed from any ip address. If attribute "ip" is omitted you may only connect yourself from the local host. Setting up the Clearinhouse database You may either use the demo Clearinhouse database or create your own new database. Click "Location" to define the connection to the database. Leave field "XML file" empty and specify database parameters. Set "Type" to "SQL database". In case you work with new database you need to create a new set of tables. Click on the red-coloured link "New Clearinghouse Database". A link "JDBC drivers" will appears just after you create Clearinhouse database. Click this link and verify/change the names of the JDBC drivers which are set up on your system. Now you may upload your GIS data (Shapefile or Mif) to SQL server. Click "Upload shapefile"
q q q q

Browse the data source: pair of files shp+dbf or mif+dbf Define connection parameters for destination SQL database Define name of table in destination SQL database You may leave "Unique key field" empty. In this case a new INTEGER field will be created in the database table. Its name will be [table_name]_ID In case you leave the list of uploaded fields empty all fields from dBase file will be uploaded to the server side

After a successful upload you will be offered to register this dataset. If you accept this offer many fields in the registration form will be filled already. But you may register this dataset later. Dataset registration The mandatory elements in registration form are marked with asterisks. Fill in the descriptive data for identification of dataset.
http://alov.org/docs/adminzone.html (1 of 3)8/5/2005 09:03:46

ALOV Map/TMJava. Free Java GIS

Vector datasets Fill in the connection parameters. The set of connection parameters are dataset-specific. File-based datasets Shape/MIF files. To describe the connection you should define the URL of this file. You can define the relative path. The absolute URL will be based on Servlet URL.
url=http://somehost/mapfiles/cities.shp url=MyFiles/cities.shp

Dataset in SQL database. You have to define three parameters: url - a database url of the form jdbc:subprotocol:subname user - the database user on whose behalf the connection is being password - the user's password.

made.

It is recommended to use user with readonly rights. URL examples


Interbase jdbc:interbase://xyz.com/sm/base/sm.gdb MySQL url=jdbc:mysql://qwerty.edu/base/mapbase Some ODBC url=jdbc:odbc:MyDSN

Define other dataset parameters


q q q

Table name - table name in SQL database Key field - field with unique values in SQL table Description field for description/notes of feature. This field is used for tips and this is the search field by default. List of fields to be downloaded - comma separated names of fields to be downloaded from SQL database table. This list MUST contain all fields which are used in renderers on client side X/Y coordinates field. If you already have an table in SQL database with fields that contain lat/long coordinates you may register this dataset directly (without uploading of shapefile) To define web links see Web Links

Raster datasets Image registration values are the transformation parameters to map raster images. They are similar to ESRI world file parameters. MrSID image server You have to define a URL of appropriated server

http://alov.org/docs/adminzone.html (2 of 3)8/5/2005 09:03:46

ALOV Map/TMJava. Free Java GIS

partially:
url = [MrSID script URL]?client=[client name]&image=[MrSID image file name]

Image width and height are number of pixels in the X(longitude) and Y (latitude) directions in original MrSID image OGC WMS Like for previous server type you have to define a URL partially:
url = [WMS script URL]?[query]

You should define the following parameters in [query] part of URL: request=GetMap srs=EPSG%3A4326 version=1.1.0 format=image/jpeg OR image/gif exceptions=application/vnd.ogc.se_inimage bgcolor= <hexadecimal colour value> Image width and height are maximum width and height of WMS returning image Layers is a list of comma separated names of layers to be obtained from WMS Styles is a list of comma separated names of styles to be used for WMS After registration you may map the registered dataset immediately. As soon as you register several datasets you may click on link "Search" and get list of registered datasets. Mark the desired datasets in column "map", click the "Map marked datasets" button and obtain a map with project file generated on fly. Download the generated project and use it as template for your further development.

previous top next

ALOV 2002-2005

http://alov.org/docs/adminzone.html (3 of 3)8/5/2005 09:03:46

ALOV Map/TMJava. Free Java GIS

PROJECT FILE. ADD DATA


The project file (or in terms of TimeMap "mapspace file") is XML document which describes the structure of map. It contains the list of layers, describes their renderers, symbology and the sources of data. 1. Define layers and data source for standalone mode. In this mode applet loads data directly. No dedicated server side is needed. This is the simplest example of project consists of single layer. The dataset for this layer is ESRI shapefile that is located in the applet code base directory. <project>
<layer> <dataset url="mymap.shp"/> </layer> </project>

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q

Quick start Server setup Structure Admin zone Project file

Thus, you see that you have to define subelement layer with another subelement dataset. Dataset may be described. There are four elements for file based datasets:
q

q q

q q q q

Add layers Layers and domains Symbols Renderers Web links Summary Applet Applet Layout Legend Search data Localization Customization

q q q

#51 - field name for description/notes of feature, search field by default. #63 - main web link mask #301 - web link mask for search #302 - web link mask for list of features.

See for details Web links Example

q q q q q q

<project> <layer> <dataset url="mymap.shp"> <metadata> <meta id="51" content="NAME"/> <meta id="63" content="http://somehost/facts/[FIPS,$L].html"/> </metadata> </dataset> </layer> </project>

It is recommended to store the metadata in the separate file together with dataset file. It allows to use metadata in many projects. For our example you have to extract element metadata and save it in file mymap.xml. To reduce downloading's time you may to compress your data files (shp and dbf) and metadatafile (xml) with zip. The reference to this dataset will be:
<dataset url="mymap.zip">

http://alov.org/docs/mapspace.html (1 of 3)8/5/2005 09:03:59

ALOV Map/TMJava. Free Java GIS

The following example shows how to attach raster image layer.


<layer> <dataset type="image" url="Afgan/af_image.jpg"> <metadata> <meta id="142" content="59.6831188784329"/> <meta id="143" content="38.9063"/> <meta id="144" content="0.02633"/> <meta id="145" content="0.02633"/> </metadata> </dataset> </layer>

The metadata elements are the transformation parameters to map raster image. They are similar to ESRI world file parameters.
q q q q

#142 #143 #144 #145

X-coordinate of the center of the upper left pixel Y-coordinate of the center of the upper left pixel Dimension of a pixel in map units in the x-direction Dimension of a pixel in map units in the y-direction

2. Using server side. Using direct loading is easy but it has some inconveniences. The data must be stored in applet code base (or in its subdirectories). You can't prevent unauthorized downloading of your map data. The dataset downloads completely. Load of data via ALOV server solves these issues. Here is the example how to define dataset to load data via servlet.
<layer> <dataset direct="no" full="no" url="file://usr/map/af_provinces.shp"/> </layer>

direct="no" means that dataset af_provinces.shp loads via servelt. full="no" means that dataset will be download to client partially - only for current map extent. If full="yes" the data will be downloaded completely at once. 3. Dataset registered in ALOV's Clearinghouse database. Using the Clearinghouse database is the best way for the centralized storing and administering of datasets. The dataset described and registered in Clearinghouse database once can be re-used in many projects. See how to register dataset in Clearinghouse database here The definition of datasets in project file from Clearinghouse database is quite simply:
<layer> <dataset id="345"/> </layer> <layer>

http://alov.org/docs/mapspace.html (2 of 3)8/5/2005 09:03:59

ALOV Map/TMJava. Free Java GIS


<dataset id="123" type="image"/> </layer>

id is unique dataset's ID in Clearinghouse database. First layer is vector, second one is raster. 4. Several layers can use the same dataset. You can define several layers based on the same dataset. The data will be downloaded only once.

previous top next

ALOV 2002-2005

http://alov.org/docs/mapspace.html (3 of 3)8/5/2005 09:03:59

ALOV Map/TMJava. Free Java GIS

PROJECT FILE. LAYERS AND DOMAINS


The most important challenge for web-mapping applications is the reducing of the size of downloaded data. The aim is the setting up each packet of data as small as possible. The ALOV Map gives you all means to design your project in proper way. You have to strive to define your project in order that the size of initial packet of data will be in range 50-150KB and the next packets - 10-50KB. To reduce initial packet you may switch off the initial visibility of unimportant and high-resolution layers.
<layer name="Main roads" visible="yes">...</layer> <layer name="Other roads" visible="no">...</layer>

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q

Quick start Server setup Structure Admin zone Project file

Zoom Layering allows you to set the minimum and maximum distances at which a layer is visible. This is particularly useful if you have an high-resolution layers. It is not effective to download and to see all these data at once. Set the zoom layer to display the generalized maps first and detail maps only when the map zoom level is within a particular range.
<layer name="Countries" zmin="2500">...</layer> <layer name="States" zmax="2500" zmin="1000">...</layer> <layer name="Counties" zmax="1000">...</layer>

q q

q q q q

Add layers Layers and domains Symbols Renderers Web links Summary Applet Applet Layout Legend Search data Localization Customization

The zoom range values must be set in project's zoom units. There are two types of units in project: map units and zoom units. Map units are the units in which the coordinates of the spatial data contained in your map are stored. It is important to determine what map units your spatial data is stored in. IMPORTANT: All data added in your project MUST BE the same coordinate system and map units. Map Units setting is independent of its Zoom Units setting. Zoom units are the units used to display the current map extent or set up zoom ranges for layers. To set a project's map and zoom units define the appropriate attributes for project element.
<project zoomunits="km" mapunits="meters">

q q q q q q

The possible values are "degrees";"meters";"km";"inches";"feet";"miles"; "degree" is applicable for map units only. This is default value for map units. "meters" is default for zoom units. You may set zoom ranges for whole project as well.

http://alov.org/docs/mapspace2.html (1 of 2)8/5/2005 09:04:34

ALOV Map/TMJava. Free Java GIS

<project

zoomunits="km" zmin="10">

It is strictly recommended to define full project's extent (domain). Otherwise all initially visible layers are downloaded completely and its summary extent is considered as full project's domain. You see that it removes all benefits of incremental downloading of data. Define the startup domain as well. This is the additional way to reduce the initial download size.
<project name="USA" zoomunits="km" zmin="70">

<domain name="Full Map" full="yes" xmin="-178.2176" ymin="0.20647" xmax="-66.96927" ymax="90"/> <domain name="East Coast" startup="yes" xmin="-86.01414" ymin="32.64062" xmax="-66.48508" ymax="48.42526"/> <domain name="California" xmin="-126.8" ymin="31.56" xmax="-112.15" ymax="42.8" /> .... </project>

The domain's bounds must be defined in Map units.

previous top next

ALOV 2002-2005

http://alov.org/docs/mapspace2.html (2 of 2)8/5/2005 09:04:34

ALOV Map/TMJava. Free Java GIS

PROJECT FILE. SYMBOLS


A Symbol is graphic symbology used to draw a shape on the map. A Symbol element in project file consists of attributes that control how a graphic shape is displayed. Depending on the kind of shape you're working with, you can specify the particular Colour, Font (where applicable), Size, or Style of symbol. name = mapApplet align=center> See project file Here is example for Graphics2D features

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q

Quick start Server setup Structure Admin zone Project file

Note: JRE 1.3 or

higher must be installed


Colours attributes fill - is the background colour of the symbol. Line symbols do not have background colours. Foreground colour for label symbol. filled - whether symbol has solid fill. outline is the outline colour of the point and polygon symbol. Shade colour for label symbol. outlined - whether symbol has outline. Point symbol Style: 0 CIRCLE; 1 SQUARE; 2 TRIANGLE; 3 CROSS size is the current size of the point symbol. Use image attribute to define custom image for point symbol. Line symbol Style: 0 SOLID; 1 DASH; 2 DOT; 3 DASHDOT; 4 DASHDOTDOT; 5

q q

q q q q

Add layers Layers and domains Symbols Renderers Web links Summary Applet Applet Layout Legend Search data Localization Customization

q q q q q q

STRIPE

size is the current width of line. It can be 1 or 2. step is the length of dashes. Label symbol Style:

http://alov.org/docs/mapspace3.html (1 of 2)8/5/2005 09:05:26

ALOV Map/TMJava. Free Java GIS

0 NORMAL; 1 BOLD; 2 ITALIC; 3 BOLD ITALIC font is logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol. size is the size of font

previous top next

ALOV 2002-2005

http://alov.org/docs/mapspace3.html (2 of 2)8/5/2005 09:05:26

ALOV Map/TMJava. Free Java GIS

WEB LINKS
To link a map objects with www resources you have to define URL templates. URL template can contain tags that will be dynamically substituted at runtime with values from attribute data or other program variables. For example "NAME" is field name from Cities layer and your link is:
http://www.xyz.com/[NAME].html

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q

Quick start Server setup Structure Admin zone Project file

If user selects Paris on map, applet request the browser show the document
http://www.xyz.com/Paris.html

q q

q q q q

Add layers Layers and domains Symbols Renderers Web links Summary Applet Applet Layout Legend Search data Localization Customization

The field value can be formatted. You may define the result length and char case. Length specifier indicates that the resulting string must be specified length; if the field's value has less chars, the resulting string is left-padded with zeros. Char case specifier may be $U (the resulting string will be in upper case) or $L (lower case). For example your link is:
http://www.xyz.com/photos/[PHOTO_ID,5,$L].jpeg

If value of field PHOTO_ID is "1A" the the resulted URL will be


http://www.xyz.com/photos/001a.jpeg

q q q q q q

The following table summarizes other possible tags:

$LAYERNAME $LAYERID $DATASETID

name of current (active) layer (defined by "label" attribute). id of current layer (defined by "name" attribute). id of current layer (dataset id) in Clearinghouse database this tag is substituted with value of applet's parameter "external". the value of search criterion for "searchlink", or list of records ids for "infolink"

$PASSTHROUGH

$SEARCH

Extents. The tags that start with "BBOX" gives a single comma-delimited string in a particular order containing values for xmin, xmax, ymin and ymax. Four others are substituted with the separate coordinates. $BBOXALL current map extent $BBXMIN, $BBXMAX, $BBYMIN, $BBYMAX

http://alov.org/docs/weblinks.html (1 of 3)8/5/2005 09:06:11

ALOV Map/TMJava. Free Java GIS


$BBOXDR marked extent $DRXMIN, $DRXMAX, $DRYMIN, $DRYMAX $BBOXSEL extent of selected records $SELXMIN, $SELXMAX, $SELYMIN, $SELYMAX

The links may defined in the metadata or in project file. In metadata:


<metadata> ... <meta id="63" content="http://www.google.com/search?q=[ID]"> </metadata>

In project file:
<project> <mainlink> http://www.google.com/search?q=[NAME] </mainlink> <layer name="layer2"> <dataset url="zyx.zip"/> <mainlink> http://www.xyz.com/q=[NAME] </mainlink> </layer> </project>

If link for a layer is defined in project file it is utilized instead of link from metadata. The project level link is used by default if layer hasn't a link. There are four types of web links.

Name of element in project file

Metadata element #

Description It is utilized when program has to create a link for a particular object - when user selects one object on map or highlights a row in the grid on the attribute window Invoked when user selects several objects. If this link is defined, the program uses it instead of opening an attribute window This link overdefines the internal search routine. It's used instead of standard tips. It's invoked when user moves the cursor over objects on map. Because this link is invoked very frequently, it is recommended to link some client side resources. For example javascript invocation in the neighbour frame.

mainlink

63

infolink

301

searchlink

302

tipslink

310

before v0.84 mainlink was renamed from linkmask


By default applet request the browser show the linked Web page in HTML frame (or window) with name "infoWindow". Before it, applet tries to load in this window the page top.html. This page contains small JavaScript code that gives focus (moves on top) to the this browser window. You may define your own target browser frame and

http://alov.org/docs/weblinks.html (2 of 3)8/5/2005 09:06:11

ALOV Map/TMJava. Free Java GIS

pre-load page via applet's parameters:


<applet ...> <param name="prepage" value="load_first.html"> <param name="target" value="wnd_result"> </applet>

To prevent preliminary load, set the value "no" for parameter "prepage".
<param name="prepage" value="no">

This example demonstrates how the links work. Compare behaviour of layers with and without links.

See project file

previous top next

ALOV 2002-2005

http://alov.org/docs/weblinks.html (3 of 3)8/5/2005 09:06:11

ALOV Map/TMJava. Free Java GIS

PROJECT FILE. SUMMARY


The complete list of elements and their attributes:
q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

ATTRIBUTE Element: project name mapunits zoomunits

TYPE

DESRIPTION

string degrees|meters|km|inches|feet| miles meters|km|inches|feet|miles float float color

project's title Units in which the coordinates of the spatial data contained in your project are stored. Units used to set zoom ranges. minimum possible zoom maximum possible zoom. This is a width of project extent by default. background color for map

DOCUMENTATION
q q q q

Quick start Server setup Structure Admin zone Project file

zmin zmax backcolor Element: domain name full

string boolean boolean float float

domain's title Full domain defines bounding box for project. Startup domain defines extent which applies on project start.

q q

q q q q

Add layers Layers and domains Symbols Renderers Web links Summary Applet Applet Layout Legend Search data Localization Customization

startup xmin ymax ymin xmax movebeyond Element: map name

Bounding box coordinates float float boolean If "yes", it allows to zoom outside domain. Applicable for "full" domain only

q q q q q q

string

Thematic map title Unique id. It used in attribute map of element renderer Defines thematic map which applies on project start.

id

string

startup Element: layer name zmin

boolean

string float

layer's title minimum zoom of map below which layer is disabled maximum zoom of map above which layer is disabled Unique id. It used in "depeneded" attribute List of ids of dependent layers. Visibility of all dependent layers will change according visibility of master layer draw order

zmax id

float string

dependent

list

order

int

http://alov.org/docs/mapspace6.html (1 of 3)8/5/2005 09:06:30

ALOV Map/TMJava. Free Java GIS


startup visible showlegend legendoutofrange imagelabel Element: dataset id name string string ID in Clearinghouse database optional dataset name type of dataset. Is required if dataset loading via Server and its type is unknown beforehand. By default is "shape" Defines the mode of file loading: directly from applet code base or via Server. Is meaningful for file-based datasets only(Shape/MIF files or JPG/ GIF). Defines partial downloading. If "no" then Cache is used on server side. Is meaningful for vector datasets only. boolean boolean boolean boolean string Defines active layer on project start. Initial layer's visibility Represent in Legend Hide layer in legend when it is out of zoom range Text in legend for raster layer

type

shape|image

direct

boolean

full

boolean

Element: selsymbol. Symbology definitions for selected feature size filled fill outlined outline image int boolean color boolean color URL size for marker use fill fill color draw outline outline color URL to custom image for marker

Element: symbol. Symbology definitions size style filled fill outlined outline image label val int 0|1|2|3 boolean color boolean color URL string string size for marker or for font, line width 1 or 2 type of point marker. Circle-0; Square-1; Triangle-2; Cross-3. use fill for polygons and marker fill color, font color draw outline, draw halo for labels outline color, halo color for labels URL to custom image for marker text in legend A string expression that evaluates to the required value for the renderer

Element: renderer. Define renderer to customize Layer drawing as you please type label map set string list There are four possible types - default,label, gradcolor and chart text in legend List of thematic maps where this renderer applies. All maps by default

http://alov.org/docs/mapspace6.html (2 of 3)8/5/2005 09:06:30

ALOV Map/TMJava. Free Java GIS


showlegend boolean Represent in Legend Type of comparison. If "yes", the field value must be equal to value of "val" attribute for one of "symbols" in content. Otherwise renderer will use symbology of first symbol in content which has value less than field value. Applicable for label and gradcolor types. Use the default renderer if no one symbol fits renderer value A field that set to the value for the Gradcolor Renderer. A field that set to the value for the Label Renderer. A field that stores the text values to use as labels for the Label Renderer. Type of chart. Pie by default A chart pie diameter or bar height A field that stores the diameter for chart pie or height for bar. Use instead of "size" A min diamter for pie A max diamter for pie

equal

boolean

drawdefault

boolean

field

field

symbolfield

field

labelfield charttype size sizefield minsize maxsize

field pie|bar int field int int

Element: field - define fields that participate in chart rendering name fill label field color string field name fill color text in legend

Definitons for some types


q q q q

color - string "R:G:B" boolean - "yes" or "no" list - string delimited with space symbol field - field name in dataset

previous top next

ALOV 2002-2005

http://alov.org/docs/mapspace6.html (3 of 3)8/5/2005 09:06:30

ALOV Map/TMJava. Free Java GIS

APPLET
To embed ALOV Map in your HTML document you should specify APPLET tag according following rules:
Applet's attributes NAME codebase code DESCRIPTION identifies the base URL for the applet code specifies which class is the applet class (which class the browser should run initially). For ALOV Map this is org.alov.viewer.SarApplet name of archive file that stores classes name of applet. Useful for reference in Javascripts overall dimensions of the applet

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

archive name width, height

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

Applet's parameters NAME pid lang DESCRIPTION URL of project file or ID if project is registered in Clearinghouse database Interface language. See localization Specifies Encoding Set for convertion characters to Unicode in attribute data. See localization Specifies class which implements interface org.alov.util.LangDriver. It is used for conversion characters to Unicode for attribute data. See localization URL of applet layout file The applet font. This can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol. Note: You can specify the particular font for each applet's component using customized layout. The maximum size of image to be downloaded from MrSID image server. The larger the size of image the better the qulaity of the image. en DEFAULT

encoding

ISO8859_1

langdriver

layout

font

SansSerif

maxsidsize

15000

previous top next

ALOV 2002-2005
http://alov.org/docs/applet.html8/5/2005 09:06:55

ALOV Map/TMJava. Free Java GIS

APPLET LAYOUT
The layout file is XML document that specifies how components are placed on applet. It defines colours, captions and other properties of applet components. Using layout file you may add your own components . Besides, layout file may contain resources strings (for localization of messages, tips and captions). The root element for layout file is layout. This element defines the default colours and font for applet. The child elements object define components on applet. The component that is descendant of java. awt.Container can contain other components. You may add the following AWT components to ALOV applet: Panel, Button, Label, TextField, Choice and Image. Besides you may add the following ALOV components Legend, StatusPanel, ToolBar, ImageButton, KeyMap, SystemLog and Map. The type of component is defined by attribute type. The applet has the only component Map. Thus if you define several components type="map" only last defined component will be taken into account. Example:
<layout backcolor="255:255:255"> <object type="map" align="client" activetool="6" tips="yes"/> <object type="statuspanel" usezoom="no" align="bottom" bounds="0,470,400,35"/> </layout>

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

Each component have properties that are specific to the visual aspect of controls, such as the position and colours of the component, and behaviour of component. The properties are defined by values of attributes of element object. The list of attributes:

ATTRIBUTE

APPLIED FOR COMPONENT

DESRIPTION type of component. It may be ALOV components: legend, statuspanel, toolbar, imagebutton, keymap, btn_status and map. AWT components: panel, button, label, textfield, choice and image. name of java class that defines custom component. See details in "Create custom components"

type

any

class

any

http://alov.org/docs/applet_layout.html (1 of 5)8/5/2005 09:07:09

ALOV Map/TMJava. Free Java GIS

name

any

Specifies the name of the component as reference. For example ALOV ToolBar uses names for reference to its tool buttons and others child controls. background colour of the component (by default parent's background colour) foreground colour of the component (by default parent's foreground colour) defines font for component (by default parent's font). This is the list of three values "name, style, size". name - the font name. This can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol. style - the style constant for the Font. 0 - PLAIN, 1 - BOLD , 2 ITALIC, 3 - BOLD/ITALIC. size - the point size of the Font By default this is "SansSerif,0,11" Defines the location of the component. This is the list of four numbers. xtopleft,ytopleft, width, height. Use to align a component to the top, bottom, left, or right of a applet or panel and have it remain there even if the size of the applet or parent component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. It can have one of the following values:
The control remains where it was placed by bounds values. This is the default value.

backcolor

any

forecolor

any

font

any

bounds

any

none

http://alov.org/docs/applet_layout.html (2 of 5)8/5/2005 09:07:09

ALOV Map/TMJava. Free Java GIS


The control moves to the top of its parent and resizes to fill the width of its parent. The height of the control is not affected.

align

any

top

The control moves to the bottom of its parent and bottom resizes to fill the width of its parent. The height of the control is not affected. The control moves to the left side of its parent and resizes to fill the height of its parent. The width of the control is not affected. The control moves to the right side of its parent and resizes to fill the height of its parent. The width of the control is not affected. The control resizes to fill the client area of its parent. If another control already occupies part of the client area, the control resizes to fit within the remaining client area.

left

right

client

caption

button,label

Text for buttons and labels The relative path to image file. This image should appear on the face of the button or image component. determine how the button behaves when clicked. Buttons with the same group property value (other than 0), work together as a group. When the user clicks one of these buttons, it remains selected until the user clicks another button belonging to the same group. defines whether the image appears during network activity. Sets the selected item to the specified value. Sets the number of columns in this text field. A column is an approximate average character width that is platform-dependent. Text field will be initialized with the specified text.

image

imagebutton,image

group

imagebutton

networkactive select

image choice

size

textfield

value

textfield

http://alov.org/docs/applet_layout.html (3 of 5)8/5/2005 09:07:09

ALOV Map/TMJava. Free Java GIS

Active tool on start. 1 2 3 4 5 6 7 8 Center Zoom In Zoom Out Pan - default value Select Web Link Search in rectangle Draw rectangle

q q q

activetool

map

q q q q q

tips

map

Defines whether to show tips for map objects under mouse cursor. Possible values "yes" or "no" defines whether layers in legend will be separated with thin line active layer disabled layer layer that can't be loaded heighlight colour for layer in legend which downloads color of map message error message colour network message colour color for tips color of progress bar Defines whether to show zoom on status panel. Possible values "yes" or "no" Defines how perform search. The help document to be invoked in case user clicks Help button.

separator select_clr disabled_clr err_color net_color select_clr err_color net_color tip_color progress_color zoom equal helpdoc

legend legend legend legend legend status panel status panel status panel status panel status panel status panel toolbar toolbar

The toolbar component contains the set of child components such as tool buttons and choices. It uses name property to reference to them. Here is the list of controls and their activities
q

q q

q q q

btn_weblink, btn_zoomout, btn_zoomin, btn_pan, btn_select buttons to set map tool btn_help - button that invokes help page btn_getdata - button that show attribute data for selected objects btn_tips - show/hide tips tf_search - text field to enter search criterion btn_search - start the search for data

http://alov.org/docs/applet_layout.html (4 of 5)8/5/2005 09:07:09

ALOV Map/TMJava. Free Java GIS


q q

lst_domains - list of project domains lst_themes - list of thematic maps

The most recent defined components will be drawn last. To activate your own layout define parameter for applet.
<param name="layout" value="mylayout.xml">

previous top next

ALOV 2002-2005

http://alov.org/docs/applet_layout.html (5 of 5)8/5/2005 09:07:09

ALOV Map/TMJava. Free Java GIS

LEGEND
The legend indicates to the user how various features are represented on map. The legend indicates the current state of layer: visibility, out of ranges, out of zoom. It allows to control layers and renderers visibility. The layer or renderer entry in legend may be hidden permanently or temporarily. The legend appearance defined both in layout and project file. In layout file it is declared by object with type="legend"
<object type="legend" name="my_legend" bounds="0,52,300,120" align="client"/>
q q q q q q q q q q q

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

Note on attribute name. Applet may have several legends with the different list of layers. Name allows to distribute layers among legends. See "legend" attribute for layer. Besides backcolor and forecolor attributes which describe colours for background and text, the layout entry for legend may have the following attributes:

ATTRIBUTE select_clr disabled_clr err_color net_color separator selection font_bold font_plain

DESRIPTION heighlight colour for active layer disabled layer layer that can't be loaded heighlight colour for layer that is downloading defines whether layers in legend will be separated with thin line whether to use select_clr for active layer font for layer labels font for other labels

The attributes below refers to images which describes the state of layer. image_clock image_zoomin image_zoomout image_network image_outext image_key layer is out of time ranges current map's zoom is less than layer's min zoom range current map's zoom is more than layer's max zoom range layer data is downloading current map extent is out of layer's extent password for layer is not resolved

http://alov.org/docs/legend.html (1 of 2)8/5/2005 09:07:19

ALOV Map/TMJava. Free Java GIS

The objects in project file: layer; renderer and symbol have the attributes which describe their behavior in the legend. All of them have: showlegend - determines the visibility of object in legend label - label in legend. If it is not defined, name is utilized. Name is unique object identifier, in contrast to label. Label may be diffretent for different languages.
<layer name="Cities" label="Cities of USA"> <label xml:lang="fr">Les villes des Etats-Unis</label> ....

ATTRIBUTE legend legendexpanded hidelegend_zoom WrapLayerTitles legendsymbolshape legtype

DESRIPTION the name of legend component this layer is represented. Applet may have several legends with the different list of layers whether to expanded the item on map startup whether to hide the layer item if layer is out of zoom ranges whether to wrap labels in legend list of coordinates that allows to define your own shape for legend icon type of shape 1 - point, 2- line, 3- polyogon

Besides, if layer's attribute alwaysvisible is true, the checkbox in legend which allows to set layer's visibility will be hidden. The renderer object may have the attribute AllowOnOffInLegend. It enables the visibility of checkbox for renderer as well as for layer.

previous top next

ALOV 2002-2005

http://alov.org/docs/legend.html (2 of 2)8/5/2005 09:07:19

ALOV Map/TMJava. Free Java GIS

SEARCHING FOR ATTRIBUTE DATA


Search on Description field HTML form plus JavaScript q Customized embedded search dialogue Behind the scene. Method searchAttribute
q q

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

The default search function is defined in layout file by two controls: txt_search - entry text field and btn_search - button that starts the process. These two elements must be located on toolbar component.
<object type="toolbar" bounds="0,0,663,27" align="top"> ... <object name="txt_search" type="textfield" bounds="445,4,130,20"/> <object name="btn_search" type="imagebutton" bounds="577,2,23,23" image="img/tool_search.gif"/> .... </object>

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

The search function looks for value of the description field. The description field is a field in the attribute data table declared by metadata element #51.
<?xml version="1.0"?> <metadata> <meta id="51" content="NAME"/> </metadata>

The search function will be disabled if the description field is not defined in layer's metadata. If parent toolbar has property equal="yes", the user may type "%" in search field (txt_search) to match an arbitrary number of characters. Otherwise the exact search will be performed. By default equal="no", it allows partial-string matching. Searching is case insensitive. The default search function is simple and suitable for all layers in project. Of course it doesn't allow the complex conditional expressions based on several fields. For advanced search you may use HTML and JavaScript or write your own Search dialogue and embed it in our applet. HTML form plus JavaScript. Look at the source code for JavaScript function that is called by this simple HTML form. The function creates the complex conditional expression and invokes map's method searchAttribute.

Name than

population more

Search

Customized embedded search dialogue allows you to avoid the issues with JavaScript Applet interaction. We wrote the sample Search dialogue FrameSearch.java. You are free to modify it for your needs. This class is a good example of customized component you may embed in our applet. It is an implementation of two interfaces CarteHostListener and StatusListener, that allow to handle the events of applet and map respectively. To embed this dialogue in applet, it must be declared in applet layout file.

http://alov.org/docs/searchdata.html (1 of 2)8/5/2005 09:07:32

ALOV Map/TMJava. Free Java GIS

Behind the scene All searching of the attribute data is performed via method of the class org.alov.map.Carte searchAttribute(String layerId, String sQuery, int searchType) This is the main method for searching for the attribute data. It allows looking for data on both client and server sides. In other words, for downloaded part and data that are still on server. The parameters: layerId - unique identifier of layer in project file.(It is defined by name attribute). If this parameter is not defined this is the current active layer. sQuery - the text to compare with value of Description field (metadata #51) or conditional expression, like (NAME LIKE '%ville') AND (POPULATION>100000) searchtype - determines the type of search. There are four possible values: 1 or 2. Search for Description field value. They are similar, except that the type "2" forces the adding of the patterns "%" on both sides of search string. 3. Applet performs the search and downloads the data from server side if needed. Selection of objects, map repainting and others actions are your responsibility. 4. After the search operation, applet tries to show the attribute window with the

results.

previous top next

ALOV 2002-2005

http://alov.org/docs/searchdata.html (2 of 2)8/5/2005 09:07:32

ALOV Map/TMJava. Free Java GIS

LOCALIZATION
For localization of project (names of layers, labels for symbols etc) you have to define child elements for elements that have the following attributes name, label and labelfield.

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

<layer name="Cities"> ... <name xml:lang="fr">Les Villes</name> <name xml:lang="de">Die Stdte</name> ... <renderer type="label" labelfield="NAME" label="Names of cities">

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

<label xml:lang="fr">Les noms des villes</label> <label xml:lang="de">Die Benennungen der Stdte</label> <labelfield xml:lang="fr">NAME_FR</labelfield> <labelfield xml:lang="de">NAME_DE</labelfield> ... </renderer> </layer>

For localization of applet messages and labels of applet components you have to define element resources for your language in layout file. If you want to see ALOV Map available in your language, then all we need from you is a copy of the translated layout file. You may find the list of translated layouts on download page To activate the language you have to set up the parameter for applet tag.
<applet> ... <param name="lang" value=[language]> ... </applet>

[language] is a valid ISO Language Code. These codes are the lowercase two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as: http://www.ics.uci.edu/ pub/ietf/http/related/iso639.txt Our XML parser sets default encoding as ISO-8859-1. For non ISOLatin letters you may use other encodings sets but it is recommended to use UTF-8 for better portability.
<?xml version="1.0" encoding="UTF-8"?>

http://alov.org/docs/localization.html (1 of 2)8/5/2005 09:07:41

ALOV Map/TMJava. Free Java GIS

For proper displaying of characters stored in attribute data you have to define metadata element #305 for dataset:
<meta id="305" content=[encoding]/>

[encoding] is a canonical name of encoding set. See the list of supported encodings: http://java.sun.com/j2se/1.3/docs/guide/intl/ encoding.doc.html Besides, there is applet parameter. It is a encoding default value.
<applet> ... <param name="encoding" value=[encoding]> ... </applet>

To make sure you characters displays properly you may write your own translation to unicode. In this case you have to create the implementation of interface org.alov.util.LangDriver. You may download example for Cyrillic. In this case you have to set up the "langdriver" parameter for applet tag
<applet> ... <param name="langdriver" value="org.alov.util.LangDriver_ru"> ... </applet>

To define locale name for data fields you have to define metadata elements #304:
<meta id="304" xml:lang="fr" content="NAME=Le nom"/> <meta id="304" xml:lang="fr" content="POPULATION=la population"/> <meta id="304" xml:lang="fr" content="COUNTRY=le pays"/>

Here is example

previous top

next

ALOV 2002-2005

http://alov.org/docs/localization.html (2 of 2)8/5/2005 09:07:41

ALOV Map/TMJava. Free Java GIS

APPLET CUSTOMIZATION
As mentioned above you may define the applet appearance via layout file. Moreover you may create and add your own components and controls to the applet. It allows you to customize the applet behaviour as you please. There are only three steps. Create java class that is implementation of our interfaces described below. Declare this class in applet's layout file Include this class into applet jar file (or place it in applet codebase).

q q q q

OVERVIEW DOWNLOAD TIMEMAP FORUM

DOCUMENTATION
q q q q q q q q q q q

q q

Quick start Server setup Structure Admin zone Project file Applet Applet Layout Legend Search data Localization Customization

There are four interfaces that allows your class to handle applet and map events. All of them are in package org.alov.map. CarteHostListener.java This interface has two methods which are being invoked on starting and stopping of applet. public void setParameters(CarteHost host, XmlElement layout) This method is being called when applet loads the layout file. Straight after the creation of instance of your class. For example, you declare your class in the layout file:
<object class="MyControl" colour_for_small_fonts="255:0:0" some_other_property="bla bla" is_active="yes" image_icon="myicon.gif"/>

In this method you are able to read the values of attributes you described for this object.

public void setParameters(CarteHost host, XmlElement layout){ Color selectionColor = XmlUtils.getColor("colour_for_small_fonts", layout, Color.blue); my_property = XmlUtils.getString("some_other_property", layout,"default bla bla"); isActive = XmlUtils.getBoolean("isactive", layout, true);

myimage = host.getImage(XmlUtils.getString("image_icon",layout,null)); //adds this class to list of StatusListener and CarteListener implemetations Carte map = host.getMapByName(layout); map.mapListeners.addElement(this); map.statusListeners.addElement(this); }

Note: if your class is descendant of AWT visual component (label, panel, button etc) you may skip reading the following properties that defines its appearance:

http://alov.org/docs/custom.html (1 of 4)8/5/2005 09:07:51

ALOV Map/TMJava. Free Java GIS

name, caption, bounds, backcolor, forecolor, align, font. These values are loaded and assigned by default. If your class is the implementation of interfaces StatusListener or CarteListener you have to add it to the lists of implementation explicitly.
Carte map = host.getMapByName(layout); map.mapListeners.addElement(this); map.statusListeners.addElement(this);

public void stop() This method is being invoked on applet's stop. Use this method to free your resources and perform some finalization operations. CarteAttribute.java This interface has the only method public void showAttributes(LayerVector lyr, Vector records); It is being called to show the attribute data, after searching or for selected objects. StatusListener.java use this interface to handle map events such as changing of map extent or thematic map, start and stop the networking. There are two methods for this interface public void afterProjectLoaded(boolean bSuccess); This method is being called straight after map loading and parsing of the project file. Utilize this method to initialize the instance of your class and assign the action handlers for its child controls. For example your component is a descendant of panel (java.awt.Panel). It has a button with name "Hide_cities".
<object class="org.alov.addon.MyCustomPanel"/> <object name="hide_cities" type="button" bounds="5,2,60,23"/> </object>

If you wish to set its caption according to the title of layer "Cities" and assign Action Listener.
public void afterProjectLoaded( boolean bSuccess ) { if ( bSuccess ) { //find button with name Hide_cities Button btn = (Button)MapUtils.findComp( (Container)this, "hide cities"); //it is assumed that you have a variable map that you get in //setParameters method map =host.getMapByName(layout); //find layer by unique name Layer layer = map.getProject().getLayerById("Cities"); //assign title of layer to caption of button btn.setLabel(layer.getName()); //set action listeners MapUtils.addActionListener( this, this, "hide cities"); }

http://alov.org/docs/custom.html (2 of 4)8/5/2005 09:07:51

ALOV Map/TMJava. Free Java GIS


}

public void notifyStatus(int code, Object obj); It is invoked when internal map event occurs. It may be: the changing of active layer, thematic map, setting the domain extent, selection of objects on map, start and stop of data downloading. The parameter code is an identifier of map event. The parameter obj depends on event. Please refer to API documentation for detail description of events identifiers. CarteListener.java. This interface has three method that allows you to handle map mouse events public void mouseMapPressed(MouseEvent e); public void mouseMapReleased(FloatRectangle selRect, MouseEvent e); public void mouseMapMoved(MouseEvent e); Besides, there is method which is being called after map repaint. This is the place where you can write your code to modify final map image. public void afterMapDraw(Graphics g);

To declare your component in the layout file, set the value of the attribute "class". Class name is the name of Java class. For example
<object class="MyPanel" .... >

or if class MyPanel in the package


<object class="com.xyz.mycontrols.MyPanel" .... >

In the same XML element you may declare the attributes. If you class is the implementation of CarteHostListener interface, their values may be read in setParameter method. In layout file:
<object class="MyPanel" myproperty="bla bla" ... >

In setParameters
my_property = XmlUtils.getString("myproperty",layout,"default bla") ;

You may define more complex XML structure for your class.
<object class="MyPanel" .. > <image name="select" url="select.gif"/> <image name="alarm" url="alarm.gif"/> <image name="warning" url="warning.gif"/> </object>

http://alov.org/docs/custom.html (3 of 4)8/5/2005 09:07:51

ALOV Map/TMJava. Free Java GIS

in setParameters
Vector nodes = layout.getElementsByTagName("image"); int count = nodes.size(); for(int i=0; i<count; i++) { XmlElement el = (XmlElement)nodes.elementAt(i); String sName = XmlUtils.getString("name",el,null); String sFile = XmlUtils.getString("url",el,null); if((sFile!=null)&&(sName)) { Image img = host.getImage(sFile); if(img!=null){ myimages.put(sName, img); } } }

If your class is descendant of java.awt.Container, you may define other controls that will be placed on your component.
<object class="MyAtttributeDataDialogue"> <object type="panel" bounds="0,0,180,30" align="top"> <object type="panel" bounds="0,0,380,30" align="client"> <object name="lbl_recno" type="label" bounds="2,5,50,23" align="left"/> <object name="btn_onmap" type="button" caption="On Map" bounds="52,2,60,23" align="left"/> <object name="btn_weblink" type="button" caption="Link" bounds="115,2,60,23" align="left"/> <object name="lbl_weblink" type="label" bounds="175,5,550,23" align="left"/> </object> </object> <object class="org.alov.viewer.LightGrid" bounds="0,30,180,30" align="client"/> </object>

If you develop a class which is the descendant of java.awt.Frame, try our FrameAlign class. This class has a alignment feature that utilizes the values of attribute "align" declared in the layout file. Of course you are free to use standard Java layout classes.

After compilation of your class you have to copy Java class file into applet codebase or include it into alov_applet.jar. Download FrameSearch.java. It defines custom search dialogue. You may utilize as a start point for your own development.

previous top

ALOV 2002-2005

http://alov.org/docs/custom.html (4 of 4)8/5/2005 09:07:51

S-ar putea să vă placă și