public class TLcdS52DisplaySettings extends Object implements ILcdDataObject, ILcdCloneable, ILcdPropertyChangeSource
TLcdS52DisplaySettings
object to all S-52 components (painter providers,
model list builders, symbologies, ...) that work on the same model, or need to behave identical
w.r.t. S-52 rendering.
This class centralizes and replaces all setters which were previously available on the
individual S-52 components. It is advised to only configure S-52 settings through this central
settings object.
A class can be registered as a PropertyChangeListener
to this class.
The listener will be notified each time one of the rendering settings has been changed.Constructor and Description |
---|
TLcdS52DisplaySettings()
Creates a new
TLcdS52DisplaySettings instance with default display settings for ENC. |
TLcdS52DisplaySettings(ELcdS57ProductType aProductType)
Creates a new
TLcdS52DisplaySettings instance with default display settings for the given product. |
TLcdS52DisplaySettings(TLcdS52DisplaySettings aDisplaySettings)
Creates a new display settings instance, initialized with the settings of the given display
settings.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
Registers the given
PropertyChangeListener to be notified when this object's
properties change. |
TLcdS52DisplaySettings |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object o) |
double |
getAirDraft()
Returns the currently configured ship's air draft, in meters.
|
int |
getAreaBoundarySymbolType()
Returns the symbol type to be used for the rendering of boundaries of area objects.
|
double |
getBeam()
Returns the currently configured ship's beam, in meters.
|
int |
getColorType()
Returns the S-52 color scheme to be used.
|
TLcdDataType |
getDataType()
Returns the type of this data object.
|
Date |
getDateFilterValue()
Returns the date value for filtering.
|
double |
getDeepContour()
Returns the depth of the deep contour.
|
int |
getDisplayCategory()
Returns the S-52 display category to be rendered.
|
boolean[] |
getDisplayTextGroups()
Returns a boolean array indicating which text groups to display.
|
int[] |
getObjectClasses()
Returns the set of object class that is displayed.
|
int |
getPointSymbolType()
Returns the symbol type to be used for the rendering of point objects.
|
ELcdS57ProductType |
getProductType()
Returns the product type for which these display settings are meant to be applied.
|
ELcdS52RadarCategory |
getRadarCategory()
Returns the currently configured radar category property.
|
double |
getSafetyContour()
Returns the depth of the safety contour.
|
double |
getSafetyDepth()
Returns the ship's safety depth.
|
int[] |
getScaleDenominators()
Returns the scale denominators to use for each
navigational purpose or level . |
double[] |
getScaleRanges()
Deprecated.
Use
getScaleDenominators() instead, which uses device-independent scales. |
double |
getShallowContour()
Returns the depth of the shallow contour.
|
Color |
getUnderscaleIndicationColor()
Returns the color in which to render the underscale indication.
|
Object |
getValue(String aPropertyName)
Convenience method that returns the value of the property with the given name.
|
Object |
getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
|
int |
hashCode() |
boolean |
hasValue(String aPropertyName)
Indicates whether this data object has a value for the given property.
|
boolean |
hasValue(TLcdDataProperty aProperty)
Indicates whether this data object has a value for the given property.
|
boolean |
isDisplayChartBoundaries()
Returns whether to display chart boundaries.
|
boolean |
isDisplayFullLengthLightSectorLines()
Returns whether sector lines of lights should be displayed at full length.
|
boolean |
isDisplayIsolatedDangersInShallowWater()
Returns whether to display isolated dangers in shallow water.
|
boolean |
isDisplayLandAreas()
Indicates whether land and built-up areas are displayed.
|
boolean |
isDisplayMetaData()
Returns whether metadata should be displayed or not.
|
boolean |
isDisplayObjectsOutsideView()
Returns whether objects located outside the view but whose graphical extent overlaps with the
view should be displayed.
|
boolean |
isDisplayOverscaleIndication()
Returns whether to display an overscale indication for cells which are being viewed on a scale
larger than
the intended scale range.
|
boolean |
isDisplayShallowPattern()
Returns whether to fill areas with a depth less than the shallow depth with a special fill
pattern, as defined by
the S-52 specification.
|
boolean |
isDisplaySoundings()
Returns whether depth soundings should be displayed or not.
|
boolean |
isDisplayText()
Returns whether textual information of objects should be displayed or not.
|
boolean |
isDisplayUnderscaleIndication()
Returns whether to display an underscale indication for cells which are not visible yet (the
map scale is smaller
than the intended scale range of the cell).
|
boolean |
isObjectClassSelectionEnabled()
Indicates whether the
selected object classes on this display settings should be taken
into account. |
boolean |
isUseAbbreviations()
Returns whether to use abbreviations for text rendering.
|
boolean |
isUseNationalLanguage()
Returns whether to use the national language text labels instead of the default
(international)
labels.
|
boolean |
isUseTwoShades()
Returns whether to use a 2- or 4-color schema for depth area rendering.
|
void |
removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
De-registers the given
PropertyChangeListener from receiving property change events
for this object. |
void |
setAirDraft(double aAirDraft)
Set the ship's air draft, in meters.
|
void |
setAll(TLcdS52DisplaySettings aDisplaySettings)
Configures this display settings with the configuration of the specified display settings.
|
void |
setAreaBoundarySymbolType(int aAreaBoundarySymbolType)
Sets the symbol type to be used for the rendering of boundaries of area objects.
|
void |
setBeam(double aBeam)
Set the ship's beam, in meters.
|
void |
setColorType(int aColorType)
Sets the S-52 color scheme to be used.
|
void |
setDateFilterValue(Date aDateFilterValue)
Sets a date value for filtering.
|
void |
setDeepContour(double aDeepContour)
Sets the depth of the deep contour.
|
void |
setDisplayCategory(int aDisplayCategory)
Sets the S-52 display category to be rendered.
|
void |
setDisplayChartBoundaries(boolean aDisplayChartBoundaries)
Sets whether to display chart boundaries.
|
void |
setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines)
Sets whether sector lines of lights should be displayed at full length.
|
void |
setDisplayIsolatedDangersInShallowWater(boolean aDisplayIsolatedDangersInShallowWater)
Sets whether to display isolated dangers in shallow water.
|
void |
setDisplayLandAreas(boolean aDisplayLandAreas)
Enable or disable display of land and built-up areas.
|
void |
setDisplayMetaData(boolean aDisplayMetaData)
Sets whether metadata should be displayed or not.
|
void |
setDisplayObjectsOutsideView(boolean aDisplayObjectsOutsideBorder)
Indicates whether the S-57 layers should render objects which are located outside the view
bounds,
but whose graphical extent overlaps with the view.
|
void |
setDisplayOverscaleIndication(boolean aDisplayOverscaleIndication)
Sets whether to display an overscale indication for cells which are being viewed on a scale
larger than
the intended scale range.
|
void |
setDisplayShallowPattern(boolean aDisplayShallowPattern)
Returns whether to fill areas with a depth less than the shallow depth with a special fill
pattern, as defined by
the S-52 specification.
|
void |
setDisplaySoundings(boolean aDisplaySoundings)
Sets whether depth soundings should be displayed or not.
|
void |
setDisplayText(boolean aDisplayText)
Sets whether textual information of objects should be displayed or not.
|
void |
setDisplayTextGroups(boolean[] aDisplayTextGroups)
Sets the boolean array indicating which text groups to display.
|
void |
setDisplayUnderscaleIndication(boolean aDisplayUnderscaleIndication)
Sets whether to display an underscale indication for cells which are not visible yet (the map
scale is smaller
than the intended scale range of the cell).
|
void |
setObjectClasses(int[] aObjectClasses)
Sets the set of object classes to display.
|
void |
setObjectClassSelectionEnabled(boolean aNewValue)
Sets whether the
selected object classes on this display settings should be taken
into account. |
void |
setPointSymbolType(int aPointSymbolType)
Sets the symbol type to be used for the rendering of point objects.
|
void |
setRadarCategory(ELcdS52RadarCategory aRadarCategory)
Set the radar category property.
|
void |
setSafetyContour(double aSafetyContour)
Sets the ship's safety contour depth.
|
void |
setSafetyDepth(double aSafetyDepth)
Sets the ship's safety depth.
|
void |
setScaleDenominators(int[] aScaleDenominators)
Sets the scale denominators to use for each navigational purpose.
|
void |
setScaleRanges(double[] aScaleRanges)
Deprecated.
Use
setScaleDenominators(int[]) instead, which uses device-independent
scales. |
void |
setShallowContour(double aShallowContour)
Sets the depth of the shallow contour.
|
void |
setUnderscaleIndicationColor(Color aUnderscaleIndicationColor)
Sets the color in which to render the underscale indication.
|
void |
setUseAbbreviations(boolean aUseAbbreviations)
Sets whether to use abbrevations for text rendering.
|
void |
setUseNationalLanguage(boolean aUseNationalLanguage)
Sets whether to use national language text labels.
|
void |
setUseTwoShades(boolean aUseTwoShades)
Sets whether to use a 2- or 4-color schema for depth area rendering.
|
void |
setValue(String aPropertyName,
Object aValue)
Convenience method that sets the value of the property with the given name.
|
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
public static final TLcdDataProperty COLOR_SCHEME_PROPERTY
TLcdDataProperty
which represents the getColorType()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be an ELcdS52ColorScheme
instance.public static final TLcdDataProperty POINT_SYMBOL_TYPE_PROPERTY
TLcdDataProperty
which represents the getPointSymbolType()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be an ELcdS52PointSymbol
instance.public static final TLcdDataProperty AREA_BOUNDARY_SYMBOL_TYPE_PROPERTY
TLcdDataProperty
which represents the getAreaBoundarySymbolType()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be an ELcdS52AreaBoundarySymbol
instance.public static final TLcdDataProperty DISPLAY_FULL_LENGTH_LIGHT_SECTOR_LINES_PROPERTY
TLcdDataProperty
which represents the isDisplayFullLengthLightSectorLines()
.
Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_CATEGORY_PROPERTY
TLcdDataProperty
which represents the getDisplayCategory()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be an ELcdS52DisplayCategory
instance.public static final TLcdDataProperty DISPLAY_SOUNDINGS_PROPERTY
TLcdDataProperty
which represents the isDisplaySoundings()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_LAND_AREAS_PROPERTY
TLcdDataProperty
which represents the isDisplayLandAreas()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_METADATA_PROPERTY
TLcdDataProperty
which represents the isDisplayMetaData()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_TEXT_PROPERTY
TLcdDataProperty
which represents the isDisplayText()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_TEXT_GROUPS_PROPERTY
The TLcdDataProperty
which represents the getDisplayTextGroups()
. Can be
passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which case
the return value will be a List
instance containing Integer
s. The list will
contain the indices of the groups for which text is displayed.
Note that editing the List
instance has no effect. In order to make changes to the
List
retrieved using getValue(com.luciad.datamodel.TLcdDataProperty)
, you
need
to set a new, modified List
instance using setValue(com.luciad.datamodel.TLcdDataProperty,
Object)
.
public static final TLcdDataProperty USE_ABBREVIATIONS_PROPERTY
TLcdDataProperty
which represents the isUseAbbreviations()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty USE_NATIONAL_LANGUAGE_PROPERTY
TLcdDataProperty
which represents the isUseNationalLanguage()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty SAFETY_DEPTH_PROPERTY
TLcdDataProperty
which represents the getSafetyDepth()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance.public static final TLcdDataProperty SHALLOW_CONTOUR_PROPERTY
TLcdDataProperty
which represents the getShallowContour()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance.public static final TLcdDataProperty SAFETY_CONTOUR_PROPERTY
TLcdDataProperty
which represents the getSafetyContour()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance.public static final TLcdDataProperty DEEP_CONTOUR_PROPERTY
TLcdDataProperty
which represents the getDeepContour()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance.public static final TLcdDataProperty USE_TWO_SHADES_PROPERTY
TLcdDataProperty
which represents the isUseTwoShades()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_SHALLOW_PATTERN_PROPERTY
TLcdDataProperty
which represents the isDisplayShallowPattern()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_ISOLATED_DANGERS_IN_SHALLOW_WATER_PROPERTY
TLcdDataProperty
which represents the isDisplayIsolatedDangersInShallowWater()
.
Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_CHART_BOUNDARIES_PROPERTY
TLcdDataProperty
which represents the isDisplayChartBoundaries()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_OVERSCALE_INDICATION_PROPERTY
TLcdDataProperty
which represents the isDisplayOverscaleIndication()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty DISPLAY_UNDERSCALE_INDICATION_PROPERTY
TLcdDataProperty
which represents the isDisplayUnderscaleIndication()
.
Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty UNDERSCALE_INDICATION_COLOR_PROPERTY
TLcdDataProperty
which represents the getUnderscaleIndicationColor()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Color
instance.public static final TLcdDataProperty DISPLAY_OBJECTS_OUTSIDE_VIEW_PROPERTY
TLcdDataProperty
which represents the isDisplayObjectsOutsideView()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Boolean
instance.public static final TLcdDataProperty SCALE_DENOMINATORS_PROPERTY
The TLcdDataProperty
which represents the getScaleDenominators()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a List
instance containing all scale denominators.
Note that editing the List
instance has no effect. In order to make changes to the
List
retrieved using getValue(com.luciad.datamodel.TLcdDataProperty)
, you
need
to set a new, modified List
instance using setValue(com.luciad.datamodel.TLcdDataProperty,
Object)
.
public static final TLcdDataProperty OBJECT_CLASS_SELECTION_ENABLED_PROPERTY
Property that represents whether object classes are selectable. One can change this value by invoking
setObjectClassSelectionEnabled(boolean)
. Can be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which case the return value will be a Boolean
instance. The default value for this property
is true
.
public static final TLcdDataProperty DATE_FILTER_VALUE_PROPERTY
TLcdDataProperty
which represents the getDateFilterValue()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Date
instance. Default value for this property is null.public static final TLcdDataProperty OBJECT_CLASSES_PROPERTY
The TLcdDataProperty
which represents the getObjectClasses()
. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a List
instance containing all object classes.
Note that editing the List
instance has no effect. In order to make changes to the
List
retrieved using getValue(com.luciad.datamodel.TLcdDataProperty)
, you
need
to set a new, modified List
instance using setValue(com.luciad.datamodel.TLcdDataProperty,
Object)
.
public static final TLcdDataProperty BEAM_PROPERTY
TLcdDataProperty
which represents the getBeam()
, in meters. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance. Default value for this property is 10.0.getBeam()
public static final TLcdDataProperty AIR_DRAFT_PROPERTY
TLcdDataProperty
which represents the getAirDraft()
, in meters. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a Double
instance. Default value for this property is 10.0.getAirDraft()
public static final TLcdDataProperty RADAR_CATEGORY_PROPERTY
TLcdDataProperty
which represents the getRadarCategory()
property. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a ELcdS52RadarCategory
instance. Default value for this property is BOTH
.getRadarCategory()
public static final TLcdDataProperty PRODUCT_TYPE_PROPERTY
TLcdDataProperty
which represents the getProductType()
property. Can
be passed to the getValue(com.luciad.datamodel.TLcdDataProperty)
method, in which
case the return value will be a ELcdS57ProductType
instance. Default value for this property is ENC
.getProductType()
public TLcdS52DisplaySettings(TLcdS52DisplaySettings aDisplaySettings)
aDisplaySettings
- the display settings to copy the properties frompublic TLcdS52DisplaySettings()
TLcdS52DisplaySettings
instance with default display settings for ENC.public TLcdS52DisplaySettings(ELcdS57ProductType aProductType)
TLcdS52DisplaySettings
instance with default display settings for the given product.aProductType
- The product type (ENC, IENC or AML) to initialize the display settings forpublic ELcdS57ProductType getProductType()
public void setAll(TLcdS52DisplaySettings aDisplaySettings)
aDisplaySettings
- the display settings from which to copy the configuration.public int getColorType()
setColorType(int)
public void setColorType(int aColorType)
ILcdS52Symbology.DAY_BRIGHT_COLORS
,
ILcdS52Symbology.DUSK_COLORS
or ILcdS52Symbology.NIGHT_COLORS
.aColorType
- the color scheme to be used.getColorType()
public int getPointSymbolType()
setPointSymbolType(int)
public void setPointSymbolType(int aPointSymbolType)
ILcdS52Symbology.SIMPLIFIED_POINT_SYMBOLS
or ILcdS52Symbology.PAPER_CHART_POINT_SYMBOLS
.aPointSymbolType
- the symbol type to be used for the rendering of point objects.getPointSymbolType()
public int getAreaBoundarySymbolType()
setAreaBoundarySymbolType(int)
public void setAreaBoundarySymbolType(int aAreaBoundarySymbolType)
ILcdS52Symbology.PLAIN_AREA_BOUNDARY_SYMBOLS
or ILcdS52Symbology.SYMBOLIZED_AREA_BOUNDARY_SYMBOLS
.aAreaBoundarySymbolType
- the symbol type to be used for the rendering of boundaries of
area objects.getAreaBoundarySymbolType()
public boolean isDisplayFullLengthLightSectorLines()
setDisplayFullLengthLightSectorLines(boolean)
public void setDisplayFullLengthLightSectorLines(boolean aDisplayFullLengthLightSectorLines)
aDisplayFullLengthLightSectorLines
- boolean indicating whether to display full length light sector lines or not.isDisplayFullLengthLightSectorLines()
public int getDisplayCategory()
setDisplayCategory(int)
public void setDisplayCategory(int aDisplayCategory)
ILcdS52Style.STANDARD
,
ILcdS52Style.DISPLAYBASE
and ILcdS52Style.OTHER
.
See the S-52 specification for more information on display categories.aDisplayCategory
- the S-52 display category to be rendered.getDisplayCategory()
public boolean isDisplaySoundings()
setDisplaySoundings(boolean)
public void setDisplaySoundings(boolean aDisplaySoundings)
aDisplaySoundings
- boolean indicating whether to display depth soundings or not.
#see #isDisplaySoundingspublic boolean isDisplayMetaData()
setDisplayMetaData(boolean)
public void setDisplayMetaData(boolean aDisplayMetaData)
aDisplayMetaData
- boolean indicating whether metadata should be displayed or notisDisplayMetaData()
public boolean isDisplayText()
setDisplayText(boolean)
public void setDisplayText(boolean aDisplayText)
aDisplayText
- boolean indicating whether textual information of objects should be
displayed or not.isDisplayText()
,
setDisplayTextGroups(boolean[])
public boolean[] getDisplayTextGroups()
Returns a boolean array indicating which text groups to display.
Warning: you should not modify the returned array directly. Instead, call the corresponding setter with a new, modified instance.
setDisplayTextGroups(boolean[])
public void setDisplayTextGroups(boolean[] aDisplayTextGroups)
aDisplayTextGroups
- the boolean array indicating which text groups to display. Must have
a length
of 100 (specified by the S-52 specification)getDisplayTextGroups()
,
setDisplayText(boolean)
public boolean isUseAbbreviations()
setUseAbbreviations(boolean)
public void setUseAbbreviations(boolean aUseAbbreviations)
aUseAbbreviations
- boolean indicating whether to use abbrevations for text rendering.isUseAbbreviations()
public boolean isUseNationalLanguage()
true
if national language labels are used, false
otherwise.
The default is false
.public void setUseNationalLanguage(boolean aUseNationalLanguage)
false
, the international name
will be used (default).aUseNationalLanguage
- true
if national language labels should be used,
false
otherwise.public double getSafetyDepth()
setSafetyDepth(double)
public void setSafetyDepth(double aSafetyDepth)
aSafetyDepth
- the ship's safety depth.getSafetyDepth()
,
setSafetyContour(double)
public double getShallowContour()
setShallowContour(double)
public void setShallowContour(double aShallowContour)
aShallowContour
- the shallow contour depth.getShallowContour()
,
setUseTwoShades(boolean)
public double getSafetyContour()
setSafetyContour(double)
public void setSafetyContour(double aSafetyContour)
aSafetyContour
- the ship's safety contour depth.getSafetyContour()
,
setSafetyDepth(double)
public double getDeepContour()
setDeepContour(double)
public void setDeepContour(double aDeepContour)
aDeepContour
- the deep contour depth.getDeepContour()
,
setUseTwoShades(boolean)
public boolean isUseTwoShades()
setUseTwoShades(boolean)
public void setUseTwoShades(boolean aUseTwoShades)
true
, only 2
colors will be used
(darker for depths less than the safety contour, lighter for depths more than the safety
contour), if false
,
4 colors will be used (the shallow and deep contour depth will also be taken into account).aUseTwoShades
- boolean indicating whether to use a 2- or 4-color schema for depth area
rendering.isUseTwoShades()
,
setSafetyContour(double)
,
setShallowContour(double)
,
setDeepContour(double)
public boolean isDisplayShallowPattern()
setDisplayShallowPattern(boolean)
public void setDisplayShallowPattern(boolean aDisplayShallowPattern)
aDisplayShallowPattern
- boolean indicating whether to fill shallow areas with a special
fill pattern.isDisplayShallowPattern()
,
setShallowContour(double)
public boolean isDisplayIsolatedDangersInShallowWater()
setDisplayIsolatedDangersInShallowWater(boolean)
public void setDisplayIsolatedDangersInShallowWater(boolean aDisplayIsolatedDangersInShallowWater)
aDisplayIsolatedDangersInShallowWater
- boolean indicating whether to display isolated dangers in shallow water.isDisplayIsolatedDangersInShallowWater()
,
setShallowContour(double)
public boolean isDisplayChartBoundaries()
setDisplayChartBoundaries(boolean)
public void setDisplayChartBoundaries(boolean aDisplayChartBoundaries)
true
, the boundaries of S-57 cells will be rendered in a special linestyle, as
defined by the S-52
specification.
This setting is only applicable to cells in catalogues, not for cells which are loaded
individually.aDisplayChartBoundaries
- boolean indicating whether to display chart boundaries.isDisplayChartBoundaries()
public boolean isDisplayOverscaleIndication()
setDisplayOverscaleIndication(boolean)
public void setDisplayOverscaleIndication(boolean aDisplayOverscaleIndication)
aDisplayOverscaleIndication
- boolean indicating whether to display an overscale
indication.isDisplayOverscaleIndication()
public boolean isDisplayUnderscaleIndication()
setDisplayUnderscaleIndication(boolean)
public void setDisplayUnderscaleIndication(boolean aDisplayUnderscaleIndication)
aDisplayUnderscaleIndication
- boolean indicating whether to display an underscale
indication.isDisplayUnderscaleIndication()
public double[] getScaleRanges()
getScaleDenominators()
instead, which uses device-independent scales.Returns the scale range to use for each navigational purpose. The double at index 0 specifies the minimum scale range for navigational purpose 0 (Overview), the double at index 1 the minimum scale range for navigational purpose 1 (General), and so on.
The scales are expressed in pixels/meter.
Warning: you should not modify the returned array directly. Instead, call the corresponding setter with a new, modified instance.
setScaleRanges(double[])
public void setScaleRanges(double[] aScaleRanges)
setScaleDenominators(int[])
instead, which uses device-independent
scales.Sets the scale range to use for each navigational purpose. The double at index 0 specifies the minimum scale range for navigational purpose 0 (Overview), the double at index 1 the minimum scale range for navigational purpose 1 (General), and so on.
The scales are expressed in pixels/meter.
aScaleRanges
- the scale range to use for each navigational purpose. Must not be
null
and should have a length of 10 (one entry for each
navigational purpose)public int[] getScaleDenominators()
Returns the scale denominators to use for each navigational purpose or level
.
A scale is expressed as the ratio between one centimeter on the map and the corresponding number of centimeters in reality (similar to paper chart scales).
The array always has 10 elements. The index in the array corresponds to the cell level - 1. To get the appropriate scale for a navigational purpose, use:
double scale = displaySettings.getScaleDenominators()[modelDescriptor.getLevel() - 1];
For ENC
, the default scales per level / navigational purpose are as prescribed by S-57 and S-52 specifications:
Inland ENC
has four additional levels:
For AML
, the default scales per level / navigational purpose are prescribed by the AML V3 specification.
Note that for compatibility, level 0 (non-scaled information) must be mapped to index 9.
Warning: you should not modify the returned array directly. Instead, call the corresponding setter with a new, modified instance.
setScaleDenominators(int[])
public void setScaleDenominators(int[] aScaleDenominators)
Sets the scale denominators to use for each navigational purpose.
aScaleDenominators
- the scale denominators to use for each navigational purpose. Must not
be
null
and should have a length of 10 (one entry for each
navigational purpose)getScaleDenominators()
public Color getUnderscaleIndicationColor()
setUnderscaleIndicationColor(java.awt.Color)
public void setUnderscaleIndicationColor(Color aUnderscaleIndicationColor)
aUnderscaleIndicationColor
- the color in which to render the underscale indication.getUnderscaleIndicationColor()
public boolean isDisplayObjectsOutsideView()
setDisplayObjectsOutsideView(boolean)
public void setDisplayObjectsOutsideView(boolean aDisplayObjectsOutsideBorder)
aDisplayObjectsOutsideBorder
- flag indicating whether objects located outside the view
but whose graphical extent overlaps with the view should
be
displayed.isDisplayObjectsOutsideView()
public boolean isObjectClassSelectionEnabled()
selected object classes
on this display settings should be taken
into account.
In case the property value is true
, the visibility of object classes behaves as defined by the
documentation of getObjectClasses()
.
In case the property value is false
, the value of property OBJECT_CLASSES_PROPERTY
is ignored
completely. In this case, the visibility of object classes is defined by the
display category
.
By default, this property is set to true
.
selected
or notpublic void setObjectClassSelectionEnabled(boolean aNewValue)
selected object classes
on this display settings should be taken
into account.
In case the property
value is true
, the visibility of object
classes behaves as defined by the documentation of getObjectClasses()
.
In case the property
value is false
, the value of property
OBJECT_CLASSES_PROPERTY
is ignored completely. In this case, the visibility of object classes is defined
by the display category
.
aNewValue
- the new property valuepublic int[] getObjectClasses()
Returns the set of object class that is displayed. This value is only taken into account when object classes
are selectable
.
Warning: you should not modify the returned array directly. Instead, call the corresponding setter with a new, modified instance.
null
value means no object class
filter is applied.setObjectClasses(int[])
public void setObjectClasses(int[] aObjectClasses)
This new value is only taken into consideration if object classes are
indeed selectable
.
aObjectClasses
- the set of object classes to display. The integers refer to the object
class
codes, as returned by TLcdS57ObjectClassDescriptor.getCode()
.
If null
, this filter will be ignored.getObjectClasses()
public void setDisplayLandAreas(boolean aDisplayLandAreas)
If false
, land areas (LNDARE) and built-up areas (BUAARE) will not be visualized and
cannot be selected.
By default, land area are displayed (value true
).
Note that this feature only has effect on Lightspeed layers, not GXY layers.
aDisplayLandAreas
- true
if land area should be displayed, false
otherwisepublic boolean isDisplayLandAreas()
true
if enabled.setDisplayLandAreas(boolean)
public void setDateFilterValue(Date aDateFilterValue)
aDateFilterValue
- new filtering valuegetDateFilterValue()
public Date getDateFilterValue()
public double getBeam()
InlandECDIS
datasets.public void setBeam(double aBeam)
getBeam()
for details.aBeam
- the new beam, in meters.public double getAirDraft()
InlandECDIS
datasets.public void setAirDraft(double aAirDraft)
getAirDraft()
for details.aAirDraft
- the new air draft, in meters.public ELcdS52RadarCategory getRadarCategory()
ELcdS52RadarCategory.UNDER
,ELcdS52RadarCategory.OVER
.ELcdS52RadarCategory.BOTH
.public void setRadarCategory(ELcdS52RadarCategory aRadarCategory)
getRadarCategory()
for details.aRadarCategory
- the new radar category value.public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
ILcdPropertyChangeSource
Registers the given PropertyChangeListener
to be notified when this object's
properties change.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source,
you can use a ALcdWeakPropertyChangeListener
instance as property change listener.
addPropertyChangeListener
in interface ILcdPropertyChangeSource
aPropertyChangeListener
- The listener to be notifiedALcdWeakPropertyChangeListener
,
ILcdPropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
ILcdPropertyChangeSource
De-registers the given PropertyChangeListener
from receiving property change events
for this object.
If the listener was added more than once, it will be notified one less time after being
removed.
If the listener is null
, or was never added, no exception is thrown and no action is taken.
removePropertyChangeListener
in interface ILcdPropertyChangeSource
aPropertyChangeListener
- the listener that should no longer be notified of changes of
this object's propertiesILcdPropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)
public TLcdDataType getDataType()
ILcdDataObject
null
.getDataType
in interface ILcdDataObject
public Object getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the data object's type
or in one of its super types.
Otherwise an IllegalArgumentException
is thrown.
Warning: if this method returns a modifiable object (for example a List
as for the object classes), you should not modify the
object directly. Instead, if you want to change the value you need to create a new, modified
version
and set this using setValue(com.luciad.datamodel.TLcdDataProperty, Object)
or
setValue(String, Object)
.
getValue
in interface ILcdDataObject
aProperty
- the property for which the value is to be returnedpublic Object getValue(String aPropertyName)
Convenience method that returns the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.getValue(TLcdDataProperty)
for more information.
Warning: if this method returns a modifiable object (for example a List
as for the object classes), you should not modify the
object directly. Instead, if you want to change the value you need to create a new, modified
version
and set this using setValue(com.luciad.datamodel.TLcdDataProperty, Object)
or
setValue(String, Object)
.
getValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be returnedTLcdDataType.getProperty(String)
public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public void setValue(String aPropertyName, Object aValue)
ILcdDataObject
Convenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)
for more information.setValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be setaValue
- the value to setpublic boolean hasValue(TLcdDataProperty aProperty)
ILcdDataObject
aProperty
is from the right data type
, and this instance has a value for it: returns true
aProperty
is from the right data type
, and this instance has no value for it: returns false
aProperty
is not from the right data type
: not allowed, you will get IllegalArgumentExceptionaProperty
is null
: not allowed, you will get NullPointerExceptionhasValue
in interface ILcdDataObject
aProperty
- the property for which to return whether a value is present or not.true
if this data object has a value for the given property, false
otherwise.public boolean hasValue(String aPropertyName)
ILcdDataObject
ILcdDataObject.hasValue(TLcdDataProperty)
for more information.hasValue
in interface ILcdDataObject
aPropertyName
- the name of the property for which to return whether a value is present
or not.true
if this data object has a value for the property with the given name,
false
otherwise.public TLcdS52DisplaySettings clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()