public class LinkProperties extends java.util.Properties implements LinkPropertiesConstants, LinkGraphicConstants
Modifier and Type | Field and Description |
---|---|
static LinkProperties |
EMPTY_PROPERTIES
Used by the graphics if no properties were sent with it.
|
protected java.util.Hashtable |
renderAttributesCache |
protected java.lang.Boolean |
reuseProperties |
LPC_BACKWARD_DIAG_PATTERN, LPC_CENTER_LAT, LPC_CENTER_LONG, LPC_CLEAR_PROPERTIES, LPC_CLEAR_PROPERTIES_CHAR, LPC_CROSS_PATTERN, LPC_DASH, LPC_DASH_DOT, LPC_DASH_DOT_DOT, LPC_DIAG_CROSS_PATTERN, LPC_DOT, LPC_FILLCOLOR, LPC_FILLPATTERN, LPC_FORWARD_DIAG_PATTERN, LPC_GRAPHICID, LPC_HEIGHT, LPC_HIGHLIGHTCOLOR, LPC_HORIZONTAL_PATTERN, LPC_HTML, LPC_INFO, LPC_LATMAX, LPC_LATMIN, LPC_LINECOLOR, LPC_LINESTYLE, LPC_LINEWIDTH, LPC_LINKRASTERIMAGEURL, LPC_LINKROTATION, LPC_LINKTEXTBASELINE, LPC_LINKTEXTFONT, LPC_LINKTEXTSTRING, LPC_LONG_DASH, LPC_LONMAX, LPC_LONMIN, LPC_MESSAGE, LPC_OLD_FILLCOLOR, LPC_OLD_FILLPATTERN, LPC_OLD_HIGHLIGHTCOLOR, LPC_OLD_LINECOLOR, LPC_OLD_LINESTYLE, LPC_OLD_LINEWIDTH, LPC_OLD_LINKTEXTFONT, LPC_OLD_LINKTEXTSTRING, LPC_PROJECTION, LPC_PROPERY_MANAGEMENT_POLICY, LPC_PROPERY_MANAGEMENT_POLICY_CHAR, LPC_REUSE_PROPERTIES, LPC_REUSE_PROPERTIES_CHAR, LPC_SCALE, LPC_SOLID, LPC_SOLID_PATTERN, LPC_TIME, LPC_URL, LPC_VERTICAL_PATTERN, LPC_WIDTH
BASELINE_BOTTOM, BASELINE_MIDDLE, BASELINE_TOP, BLACK_COLOR_STRING, CLEAR_COLOR_STRING, COLORMODEL_DIRECT, COLORMODEL_INDEXED, COLORMODEL_URL, COLUMN_MAJOR, COORDMODE_ORIGIN, COORDMODE_PREVIOUS, DECIMAL_DEGREES, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, KM, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, MILES, NMILES, RADIANS, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, ROW_MAJOR
Constructor and Description |
---|
LinkProperties() |
LinkProperties(java.io.DataInput dis)
Create a LinkProperties, and read it's contents off a link.
|
LinkProperties(Link link)
Create a LinkProperties, and read it's contents off a link.
|
LinkProperties(LinkProperties settings) |
LinkProperties(java.lang.String keyString,
java.lang.String valueString)
Create a LinkProperties object with it's first pair.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Paint |
getFillPaint() |
java.awt.Paint |
getPaint(java.lang.String paintProperty,
java.lang.String defaultPaintString) |
java.lang.Boolean |
getReuseProperties() |
java.awt.Stroke |
getStroke() |
static LinkProperties |
loadPropertiesIntoOMGraphic(java.io.DataInput dis,
OMGraphic omg,
LinkProperties propertiesBuffer)
New, static method for more efficient property handling and loading the
properties into the OMGraphic.
|
void |
read(java.io.DataInput dis)
Read the link to create the properties object.
|
static LinkProperties |
read(java.io.DataInput dis,
LinkProperties props)
New, static method for more efficient property handling.
|
void |
readArgs(int numArgs,
java.io.DataInput dis)
Read the link to fetch properties for this LinkProperties object.
|
void |
setProperties(OMGraphic omg)
Method to call on the LinkProperties object to set the DrawingAttributes
properties on an OMGraphic.
|
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
Calls the hashtable method
put . |
void |
setReuseProperties(java.lang.Boolean reuseProperties)
A flag that controls how LinkProperties are managed.
|
void |
write(java.io.DataOutputStream dos)
Write the properties as several strings.
|
void |
write(Link link)
Write the properties as several strings.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames
public static final LinkProperties EMPTY_PROPERTIES
protected java.lang.Boolean reuseProperties
protected java.util.Hashtable renderAttributesCache
public LinkProperties()
public LinkProperties(LinkProperties settings)
public LinkProperties(java.lang.String keyString, java.lang.String valueString)
keyString
- the key for the pair.valueString
- the value for the pair.public LinkProperties(Link link) throws java.io.IOException
link
- the Link to read properties fromIOException.
java.io.IOException
public LinkProperties(java.io.DataInput dis) throws java.io.IOException
dis
- DataInput to read from.IOException.
java.io.IOException
public java.lang.Boolean getReuseProperties()
public void setReuseProperties(java.lang.Boolean reuseProperties)
reuseProperties
- public java.lang.Object setProperty(java.lang.String key, java.lang.String value)
put
. Provided to provide a
similar interface in jdk1.1.x or jdk1.2.x, enforcing that only strings
can be in properties files.setProperty
in class java.util.Properties
public void write(Link link) throws java.io.IOException
link
- the link to write to.java.io.IOException
public void write(java.io.DataOutputStream dos) throws java.io.IOException
dos
- the DataOutputStream to write to.java.io.IOException
public void read(java.io.DataInput dis) throws java.io.IOException
dis
- DataInput to read from.IOException.
java.io.IOException
public void readArgs(int numArgs, java.io.DataInput dis) throws java.io.IOException
numArgs
- the number of key + value strings to read.dis
- DataInput to read from.IOException.
java.io.IOException
public static LinkProperties read(java.io.DataInput dis, LinkProperties props) throws java.io.IOException
dis
- props
- java.io.IOException
public static LinkProperties loadPropertiesIntoOMGraphic(java.io.DataInput dis, OMGraphic omg, LinkProperties propertiesBuffer) throws java.io.IOException
dis
- omg
- java.io.IOException
public void setProperties(OMGraphic omg)
public java.awt.Stroke getStroke()
public java.awt.Paint getPaint(java.lang.String paintProperty, java.lang.String defaultPaintString)
public java.awt.Paint getFillPaint()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details