Programming with JViews Maps > Introducing the Main Classes > Map Layers and Map Styles > Map Layers for Graphic Objects

The class relationship for map layers for graphic objects is shown in Figure 1.12.

map_layergraphicobj.png

Figure 1.12 Layers for Graphic Objects UML Diagram

Most map layers are used to manage graphic objects created from map features imported from various map data files. The styling options differ according to the content of each file and the map features imported by the different readers. For example, you do not style a polygon the same way you do an altitude raster image.

This section describes:

The IlvGeneralPathStyle Class

The IlvGeneralPathStyle class is used for IlvMapGeneralPath stylable graphic objects. Generally, most vectorial map renderers provide a setUsingGeneralPath method to allow a choice between using general paths, which give a better aspect and capabilities, or regular polygons, which provide better performance.

Table 1.3 General Path Styling Properties
Property name 
Content 
FILL_PAINT 
Paint object used to fill the shape. 
STROKE_PAINT 
Paint object used when stroking the path. 
FILL_ON 
Boolean indicating whether the inside of the object is filled. 
STROKE_ON 
Boolean indicating whether the shape of the object is stroked. 
PAINT_ABSOLUTE 
Boolean indicating whether the fill paint is adapted to the bounding rectangle of the object. 
STROKE_WIDTH 
Stroke width. 
PAINT_ZOOMED 
Boolean indicating whether the paint is zoomed according to the shape when the object is zoomed. 
END_CAP 
Type of decoration applied to the ends of unclosed subpaths (see java.awt.BasicStroke). 
LINE_JOIN 
Type of decoration applied at the intersection of two path segments (see java.awt.BasicStroke). 
LINE_STYLE 
Float table indicating how to make a dash pattern by alternating between opaque and transparent sections (see java.awt.BasicStroke). 
STROKE 
Object used for stroking the path. This attribute is dependant on all stroke attributes and is recomputed when one of them changes.This attribute is not visible in the Map Layer Tree Panel. 

The IlvPolylineStyle Class

The IlvPolylineStyle class is used for IlvMapPolyline stylable objects (non-filled polygons or polylines).

Table 1.4 Polyline Styling Properties
Property name 
Content 
FOREGROUND 
Color object used when drawing the polygon borders. 
LINE_WIDTH 
Polygon borders line width. 
END_CAP 
Type of decoration applied to the ends of unclosed subpaths (see java.awt.BasicStroke). 
LINE_JOIN 
Type of decoration applied at the intersection of two path segments (see java.awt.BasicStroke). 
LINE_STYLE 
Float table indicating how to make a dash pattern by alternating between opaque and transparent sections (see java.awt.BasicStroke). 
DECORATION 
Additional IlvPathDecoration object used for stroking the polygon. 
DECORATION_ONLY 
Boolean indicating whether only the decoration is displayed. 
DECORATION_PAINT 
Paint color of the decoration. By default (when this attribute is null), the decoration is colored using the FOREGROUND attribute. 

The IlvGraphicPathStyle Class

The IlvGraphicPathStyle class is a subclass of IlvPolylineStyle and so provides all the attributes in The IlvPolylineStyle Class. It provides the style for IlvMapGraphicPath objects (filled polygon areas), by adding the following:

Table 1.5 Graphic Path Styling Properties
Property name 
Content 
PAINT 
Paint object used to fill the polygon area. 
DO_FILL 
Boolean indicating whether the inside of the polygon is filled. 
DO_STROKE 
Boolean indicating whether the borders of the polygon are stroked. 

The IlvPointStyle Class

The IlvPointStyle class controls the style of map point (IlvMapPoint) objects. It provides the following attributes:

Table 1.6 Point Styling Properties
Property name 
Content 
FOREGROUND 
Color object used for displaying the point. 
MARKER_SIZE 
The size of the marker. 
MARKER_TYPE 
The type of marker to use. 

The IlvMapTextStyle Class

The IlvMapTextStyle class controls the style of map stylable label objects (IlvMapText). It provides the following attributes:

Table 1.7 Map Text Styling Properties
Property name 
Content 
ANTIALIASING 
Boolean indicating whether text should be specifically anti-aliased (even if the view setting itself is different). 
ATTACHMENT 
The label attachment. 
FILL_PAINT 
Paint object used to fill the characters of the text. 
FONT 
The label Font
FRAME_PAINT 
Paint object used to draw the frame of the label. 
INNER_MARGIN 
Spacing between the frame of the label and the text. 
INTERLINE 
Spacing between two lines of text. 
MAXIMUM_HEIGHT 
The maximum height of the label. 
MINIMUM_HEIGHT 
The minimum height of the label. 
STROKE_PAINT 
Paint object used to draw the shape of the text character. 
BACKGROUND_PAINT 
Paint object used to fill the frame of the label. 
ALIGNMENT 
Alignment of the multi-line text. 

The IlvRasterStyle Class

The IlvRasterStyle class is used with IlvRasterIcon graphic objects, and provides attributes to control the appearance of the image:

Table 1.8 Raster Styling Properties
Property name 
Content 
BRIGHTNESS 
A Double percentage applied to the color model to make the entire image brighter or darker. 0% gives a black image. 
CONTRAST 
A Double percentage applied to the color model to increase the color difference. 0% gives a completely grey image. 
SATURATION 
A Double percentage applied to the color model of the image to change the color saturation. 0% gives a completely grey image. 
COLOR_MODEL 
The ColorModel object used to transform the pixel values of the image into RGBA colors.