Package hec.map
Class MapIdentifier
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.io.Identifier
hec.map.MapIdentifier
- All Implemented Interfaces:
AsciiSerializable
,FieldAccessor
,Serializable
,Cloneable
,Comparable
,Observer
,Modifiable
Provides a description of a Map and its characteristics.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GlyphDataRecord
The Display Characteristics for the Mapprotected boolean
whether this map represents a backgroundprotected boolean
whether this map should be shown automatically in all MapPanelsprotected boolean
whether this map represents a managerprotected boolean
The if the map is shownprotected String
The class of the Mapprotected int
This provides the upper scale limit that this map will be valid.protected int
This provides the lower scale limit that this map will be valid.protected long
Last time the map was added, for cachingFields inherited from class hec.io.Identifier
_directory, _file, _hidden, _lastModified, _length, _path, _readOnly, _type, DEFAULT_RMI_FILE, RMI_FILE_MAP
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.Create a new MapIdentifier using the default constructor.MapIdentifier
(String path) Create a new MapIdentifier using the default constructor.MapIdentifier
(String path, HecFile file) Create a new MapIdentifier using the default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Get the class name of the Map.Get the Glyph characteritics object.boolean
get the default state of whether or not the map is shown.boolean
getMapShown
(MapGlyph glyph) Get whether or not the map is shown.int
int
long
boolean
get whether this mapId represents a backgroundboolean
boolean
get whether this mapId represents a managerboolean
isMap()
void
setClassName
(String str) Set the class name of the Map.void
setDefaultMap
(boolean defaultMap) set whether this map should be shown automatically in all MapPanelsvoid
Set the Glyph characteritics object.void
Change the Identifier characteristics of the MapIdentifier.void
void
setIsBackground
(boolean b) set whether this mapId represents a backgroundvoid
setIsManager
(boolean b) set whether this mapId represents a managervoid
setMapShown
(boolean tf) Set the default state of whether or not the map is shown.void
setMapShown
(boolean shown, MapGlyph glyph) Set whether or not the map is shown.void
setMaximumScale
(int maxScale) void
setMinimumScale
(int minScale) void
setModifiedTime
(long modifiedTime) Methods inherited from class hec.io.Identifier
compareTo, copy, equals, getFile, getPath, getType, hashCode, initToFile, instantiateRmiFile, isDirectory, isHidden, isReadOnly, lastModified, length, paramString, setFile, setHidden, setIsDirectory, setLastModified, setLength, setPath, setReadOnly, setType, toString
Methods inherited from class hec.lang.NamedType
addModifiableListener, clone, fireModifiedStateChanged, getDescription, getDisplayName, getFieldObject, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setFieldObject, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, update, useRecursiveModifiedTest
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
m_maximumScale
protected int m_maximumScaleThis provides the upper scale limit that this map will be valid. -
m_minimumScale
protected int m_minimumScaleThis provides the lower scale limit that this map will be valid. -
m_modifiedTime
protected long m_modifiedTimeLast time the map was added, for caching -
_mapShown
protected boolean _mapShownThe if the map is shown -
_glyphDataRec
The Display Characteristics for the Map -
_stringClass
The class of the Map -
_isManager
protected boolean _isManagerwhether this map represents a manager -
_isBackground
protected boolean _isBackgroundwhether this map represents a background -
_isDefaultMap
protected boolean _isDefaultMapwhether this map should be shown automatically in all MapPanels
-
-
Constructor Details
-
MapIdentifier
public MapIdentifier()The default constructor. -
MapIdentifier
Create a new MapIdentifier using the default constructor. Set the MapIdentifier's path String to the path String argument. Set the MapIdentifier's HecFile to the HecFile argument. -
MapIdentifier
Create a new MapIdentifier using the default constructor. Set the MapIdentifier's path String to the path String argument. -
MapIdentifier
Create a new MapIdentifier using the default constructor. Set the MapIdentifier's superclass data members to the argument Identifier's values using super(Identifier). -
MapIdentifier
-
-
Method Details
-
setIdentifier
Change the Identifier characteristics of the MapIdentifier. This is used for where the MapIdentifier is identifying a map, but the underlying file for the map is being changed. Example, a DLGMap starts off as "map.dlg". Once it is loaded once, the binary version is created as "map.dlgbin". From then on the binary version should be loaded for speed. Therefore the MapIdentifiers underlying File attributes are changed using setIdentifer().
setIdentifier() set's the String path, Class, directory flag, and HecFile of the MapIdentifier. It keeps the name, description, and all MapIdentifier data members. -
setIdentifier
-
getMaximumScale
public int getMaximumScale() -
getMinimumScale
public int getMinimumScale() -
setMaximumScale
public void setMaximumScale(int maxScale) -
setMinimumScale
public void setMinimumScale(int minScale) -
setModifiedTime
public void setModifiedTime(long modifiedTime) -
getModifiedTime
public long getModifiedTime() -
setMapShown
public void setMapShown(boolean tf) Set the default state of whether or not the map is shown. -
getMapShown
public boolean getMapShown()get the default state of whether or not the map is shown.- Returns:
- the default shown state
-
setMapShown
Set whether or not the map is shown. -
getMapShown
Get whether or not the map is shown. -
getGlyphDataRecord
Get the Glyph characteritics object. -
setGlyphDataRecord
Set the Glyph characteritics object. -
setClassName
Set the class name of the Map.- Overrides:
setClassName
in classIdentifier
-
getClassName
Get the class name of the Map.- Overrides:
getClassName
in classIdentifier
-
setIsManager
public void setIsManager(boolean b) set whether this mapId represents a manager -
isManager
public boolean isManager()get whether this mapId represents a manager -
setIsBackground
public void setIsBackground(boolean b) set whether this mapId represents a background -
isBackground
public boolean isBackground()get whether this mapId represents a background -
isMap
public boolean isMap() -
isDefaultMap
public boolean isDefaultMap()- Returns:
- whether this map should be shown automatically in all MapPanels
-
setDefaultMap
public void setDefaultMap(boolean defaultMap) set whether this map should be shown automatically in all MapPanels- Parameters:
defaultMap
- true to have this map added to all MapPanels
-
clearGlyphShownFlags
public void clearGlyphShownFlags()
-