com.moximedia.aims
Class AimsLayerGroup

java.lang.Object
  extended bycom.moximedia.aims.AimsLayerGroup
All Implemented Interfaces:
java.io.Serializable

public class AimsLayerGroup
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected static int NEXT_GROUP_ID
           
static int REPORT_METHOD_DRILL
           
static int REPORT_METHOD_FIRST
           
static int REPORT_METHOD_LOCATION
           
 
Constructor Summary
AimsLayerGroup()
          Creates new AimsLayerGroup
AimsLayerGroup(AimsMap map)
          Creates new AimsLayerGroup with a map
 
Method Summary
 void addLayer(AimsLayer layer)
          Adds a layer to the AimsLayerGroup.
 void addLayerListLegend(AimsLayerListLegend legend)
          Adds a layer list legend.
 boolean canHideLabels()
          Returns a boolean value indicating whether labels can be hidden.
 boolean canHideLayerListLegend()
          Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.
 boolean canShowLayerListLegend()
          Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.
 AimsLayer getActiveIdentifyLayer(AimsPoint pt)
          Returns the active layer used for identify.
 AimsFeatureLayer getActiveSelectLayer(AimsPoint pt)
          Returns the active layer used for selection.
 boolean getCanIdentify()
          Returns whether the Layer Group can be identified.
 boolean getCanSelect()
          Returns whether the Layer Group can be selected.
 boolean getCanSetVisibility()
          Returns whether the Layer Group can be turned on and off by the user.
 boolean getCanSetVisibilityBeyondScale()
          Gets a boolean value indicating whether the layer group can be turned on and off by the user when the layer group is beyond scale.
 java.lang.String getId()
          Returns a String containing the group ID.
 int getIdentifyReportMethod()
          Gets the identify report method.
 boolean getIdentifyWindow()
          Gets whether a separate identify window is used for the layer group.
 boolean getImmediateRefresh()
          Returns whether the map should immediately refresh when the map layer visibility is changed.
 AimsLayerListLegend getLayerListLegend()
          Gets and indicator of whether a layer list legend exists at this scale.
 AimsLayerListLegends getLayerListLegends()
          Gets the array of layer list legends for this group.
 AimsLayers getLayers()
          Returns the layers contained in the AimsLayerGroup in an AimsLayers object.
 double getMaxScale()
          Gets the maximum scale at which the layer group will be displayed.
 java.lang.String getMetadataUrl()
          Returns the URL to the metadata page for this group, or null if no metatata URL is defined.
 double getMinScale()
          Gets the minimum scale at which the layer group will be displayed.
 java.lang.String getName()
          Returns a String containing the group name.
 int getObjectId()
          Returns the IMF internal id for this group.
 int getSelectReportMethod()
          Gets the select report method.
 java.lang.String getSelectShape()
          Gets the type of select tool that is used for this layer group.
 boolean getVisible()
          Gets the visiblity of the Layer Group.
 boolean hasAllLayersVisible()
          Gets the visiblity of the Layer Group layers.
 boolean hasLabelsToHide()
          Determines whether there are layers in this group with labels that can be hidden.
 boolean hasLayer(AimsLayer layer)
          Returns an indicator of whether a layer is in this layer group.
 boolean hasLayer(int layerObjectId)
          Returns an indicator of whether a layer with the specified object id is in this layer group.
 boolean hasLayerListLegend()
          Gets and indicator of whether a layer list legend exists at this scale.
 boolean hasLayerMetadata()
          Returns an indicator of whether the individual layers of this layer group have metadata.
 boolean isLayerWithinThreshold()
          Returns whether this layer is within threshold tolerance.
 boolean isOpen()
          Gets whether the layer group is open in the layer manager.
 boolean isVisible()
          Gets the visiblity of the Layer Group.
 boolean labelsHidden()
          Returns a boolean value indicating whether labels are currently hidden.
 void setAxlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 void setCanSetVisibilityBeyondScale(boolean canSetVisibility)
          Sets whether the layer group can be turned on and off by the user.
 void setIdentifyReportMethod(java.lang.String method)
          Sets the identify report method.
 void setOpen(boolean flag)
          Sets whether the layer group is open in the layer manager.
 void setSelectReportMethod(java.lang.String method)
          Sets the select report method.
 void setVisible(boolean isVisible)
          Sets the layers in this group to the specified visibility.
 void showLabels(boolean showLabels)
          Toggles the visibility of the label renderers in this layer group.
 java.lang.String toString()
          Returns a text representation of of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REPORT_METHOD_DRILL

public static final int REPORT_METHOD_DRILL
See Also:
Constant Field Values

REPORT_METHOD_FIRST

public static final int REPORT_METHOD_FIRST
See Also:
Constant Field Values

REPORT_METHOD_LOCATION

public static final int REPORT_METHOD_LOCATION
See Also:
Constant Field Values

NEXT_GROUP_ID

protected static int NEXT_GROUP_ID
Constructor Detail

AimsLayerGroup

public AimsLayerGroup()
Creates new AimsLayerGroup


AimsLayerGroup

public AimsLayerGroup(AimsMap map)
Creates new AimsLayerGroup with a map

Parameters:
map - The applicable map
Method Detail

addLayerListLegend

public void addLayerListLegend(AimsLayerListLegend legend)
Adds a layer list legend.

Parameters:
legend - The legend to add.

hasLayerListLegend

public boolean hasLayerListLegend()
Gets and indicator of whether a layer list legend exists at this scale.

Returns:
True if the layer has a legend which could be shown.

getLayerListLegend

public AimsLayerListLegend getLayerListLegend()
Gets and indicator of whether a layer list legend exists at this scale.

Returns:
True if the layer has a legend which could be shown.

getLayerListLegends

public AimsLayerListLegends getLayerListLegends()
Gets the array of layer list legends for this group.

Returns:
An AimsLayerListLegends object containing the legends.

canHideLayerListLegend

public boolean canHideLayerListLegend()
Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.

Returns:
True if the layer has a legend which could be shown.

canShowLayerListLegend

public boolean canShowLayerListLegend()
Gets and indicator of whether the legend could be shown, true regardless of whether or not it is turned off.

Returns:
True if the layer has a legend which could be shown.

getObjectId

public int getObjectId()
Returns the IMF internal id for this group.

Returns:
The internal id for the group.

addLayer

public void addLayer(AimsLayer layer)
Adds a layer to the AimsLayerGroup.


getId

public java.lang.String getId()
Returns a String containing the group ID.

Returns:
The ID of the group.

getIdentifyWindow

public boolean getIdentifyWindow()
Gets whether a separate identify window is used for the layer group. Only applicable to drill type of identify reports for the group. Other identify methods use the setting defined for the layer being identified.

Returns:
True if a separate identify window is used for the drill identify.

getImmediateRefresh

public boolean getImmediateRefresh()
Returns whether the map should immediately refresh when the map layer visibility is changed.

Returns:
True if the map should immediately refresh, otherwise false.

getLayers

public AimsLayers getLayers()
Returns the layers contained in the AimsLayerGroup in an AimsLayers object.

Returns:
An AimsLayers object containing the layers in the AimsLayerGroup.

getName

public java.lang.String getName()
Returns a String containing the group name.

Returns:
The name of the group.

getActiveIdentifyLayer

public AimsLayer getActiveIdentifyLayer(AimsPoint pt)
Returns the active layer used for identify. This routine returns the first identifiable feature layer that is within threshold and visible.

Returns:
The active identify layer, or null if no layer is identifiable.

getActiveSelectLayer

public AimsFeatureLayer getActiveSelectLayer(AimsPoint pt)
Returns the active layer used for selection. This routine returns the first selectable feature layer that is within threshold and visible.

Returns:
The active select layer, or null if no layer is selectable.

setVisible

public void setVisible(boolean isVisible)
Sets the layers in this group to the specified visibility.

Parameters:
isVisible - The visibility.

getVisible

public boolean getVisible()
Gets the visiblity of the Layer Group.

Returns:
True if the Layer Group is visible, otherwise false.

hasAllLayersVisible

public boolean hasAllLayersVisible()
Gets the visiblity of the Layer Group layers. Used with layer manager applications where individual layers can be toggled..

Returns:
True if all layers in the Layer Group are visible, otherwise false. Note that this will return true if there are not any layers are in the group.

isVisible

public boolean isVisible()
Gets the visiblity of the Layer Group.

Returns:
True if the Layer Group is visible, otherwise false.

getCanIdentify

public boolean getCanIdentify()
Returns whether the Layer Group can be identified. return True if the layer group can be identified, otherwise false.


getCanSelect

public boolean getCanSelect()
Returns whether the Layer Group can be selected. return True if the layer group can be selected, otherwise false.


getCanSetVisibility

public boolean getCanSetVisibility()
Returns whether the Layer Group can be turned on and off by the user. return True if the layer group can be controlled, otherwise false.


showLabels

public void showLabels(boolean showLabels)
Toggles the visibility of the label renderers in this layer group.

Parameters:
showLabels - The visibility property.

hasLabelsToHide

public boolean hasLabelsToHide()
Determines whether there are layers in this group with labels that can be hidden.

Returns:
True if labels can be hidden, otherwise false.

canHideLabels

public boolean canHideLabels()
Returns a boolean value indicating whether labels can be hidden.

Returns:
True if the labels can be hidden, otherwise false.

labelsHidden

public boolean labelsHidden()
Returns a boolean value indicating whether labels are currently hidden.

Returns:
True if the labels are hidden, otherwise false.

getCanSetVisibilityBeyondScale

public boolean getCanSetVisibilityBeyondScale()
Gets a boolean value indicating whether the layer group can be turned on and off by the user when the layer group is beyond scale.

Returns:
True if the layer group can be controlled, otherwise false.

setCanSetVisibilityBeyondScale

public void setCanSetVisibilityBeyondScale(boolean canSetVisibility)
Sets whether the layer group can be turned on and off by the user.


getMaxScale

public double getMaxScale()
Gets the maximum scale at which the layer group will be displayed.

Returns:
The maximum scale at which the layer group will be displayed.

getMinScale

public double getMinScale()
Gets the minimum scale at which the layer group will be displayed.

Returns:
The minimum scale at which the layer group will be displayed.

getMetadataUrl

public java.lang.String getMetadataUrl()
Returns the URL to the metadata page for this group, or null if no metatata URL is defined.

Returns:
The URL to the metadata page for this group, or null if no metatata URL is defined.

getSelectShape

public java.lang.String getSelectShape()
Gets the type of select tool that is used for this layer group. The options are: "point", "box", or "polygon".

Returns:
A string containing the select shape.

isLayerWithinThreshold

public boolean isLayerWithinThreshold()
Returns whether this layer is within threshold tolerance.

Returns:
True if the layer is shown at the present scale, otherwise false.

toString

public java.lang.String toString()
Returns a text representation of of this class.

Returns:
A string describing the class

setAxlAttribute

public void setAxlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The AXL element tag containing this attribute (not used).
name - The AXL attribute name.
value - The AXL attribute value.

getIdentifyReportMethod

public int getIdentifyReportMethod()
Gets the identify report method.

Returns:
The method, REPORT_METHOD_DRILL, REPORT_METHOD_FIRST, or REPORT_METHOD_LOCATION.

setIdentifyReportMethod

public void setIdentifyReportMethod(java.lang.String method)
Sets the identify report method.

Parameters:
method - The method, drill, first, or location.

getSelectReportMethod

public int getSelectReportMethod()
Gets the select report method.

Returns:
The method, REPORT_METHOD_DRILL, REPORT_METHOD_FIRST, or REPORT_METHOD_LOCATION.

setSelectReportMethod

public void setSelectReportMethod(java.lang.String method)
Sets the select report method.

Parameters:
method - The method, first or location.

hasLayerMetadata

public boolean hasLayerMetadata()
Returns an indicator of whether the individual layers of this layer group have metadata.

Returns:
True if one or more layers have metadata, otherwise false.

hasLayer

public boolean hasLayer(int layerObjectId)
Returns an indicator of whether a layer with the specified object id is in this layer group.

Parameters:
layerObjectId - The object id of the target layer.
Returns:
True if found, otherwise false.

hasLayer

public boolean hasLayer(AimsLayer layer)
Returns an indicator of whether a layer is in this layer group.

Returns:
True if found, otherwise false.

isOpen

public boolean isOpen()
Gets whether the layer group is open in the layer manager.

Returns:
True if it should be open, otherwise false;

setOpen

public void setOpen(boolean flag)
Sets whether the layer group is open in the layer manager.

Parameters:
flag - True if it should be open, otherwise false;