Chart FX 7 for Java Server

com.softwarefx.chartfx.server.maps
Class MapRegion

java.lang.Object
  extended by com.softwarefx.chartfx.server.maps.MapRegion

public abstract class MapRegion
extends Object

Provides access to the MapRegion object.

The supported members fo the MapRegion class allow you to read the attributes for a selected map region. Use the FindMapRegion method of the Map class to return a MapRegion object, which will then expose the properties and methods of this class. These members are also utilized within the mouse events (MouseUp, MouseDown, etc.).


Constructor Summary
MapRegion()
           
 
Method Summary
 void drillDownTo()
          Error: Member MapRegion.drillDownTo member not found
 double get(int series)
          Returns the element at the specified position in the MapRegion.
 AnnotationObject getBoundary()
          Returns the AnnotationObject of the selected MapRegion from the AnnotationObjectsList for the map.
 String getDataText()
          Gets the DataText attribute of the MapRegion object.
 String getDisplayText()
          Gets the DisplayText.
 Font getFont()
          Gets the Font.
 int getLevel()
          Gets the current DetailLevel which the MapRegion object exists.
 int getPoint()
          Gets the point index of the MapRegion object.
 PointAttributes getPointAttributes()
          Gets the PointAttributes object for the selected map region.
 String getSvgText()
          Gets the SvgText attribute of the MapRegion object.
 AnnotationObject getText()
          Returns the Text/Label part of the selected MapRegion from the map.
 int getWinnerSeries()
          Gets the WinnerSeries for the MapRegion.
 void setDisplayText(String value)
          Gets the DisplayText attribute of the MapRegion object.
 void setFont(Font value)
          Sets the Font for the selected MapRegion object.
 void zoomTo()
          Error: Member MapRegion.zoomTo member not found
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapRegion

public MapRegion()
Method Detail

drillDownTo

public void drillDownTo()

Error: Member MapRegion.drillDownTo member not found

ERROR: Doc member not found


get

public double get(int series)

Returns the element at the specified position in the MapRegion.

Parameters:
series - Index of the series to return.

getBoundary

public AnnotationObject getBoundary()

Returns the AnnotationObject of the selected MapRegion from the AnnotationObjectsList for the map.

Remarks:
  • This is a read only property.

  • Once you have selected a MapRegion using the Map.findMapRegion(java.lang.String) method of the Map class, using this property you can obtain the AnnotationObject that region contained in the Map.getAnnotationObjectsList().

    MapRegion mr = map1.FindMapRegion("CA",LabelLinkSearchTypes.FromDisplay);
    AnnotationObject annObj = mr.Boundary;
    annObj.Color = Color.Purple;

  • This could also be very useful if you wish to add an Annotation object to the map. For example, if you wanted to create an AnnotationArrow that points to a selected region:

    MapRegion mr = map1.FindMapRegion("CA",LabelLinkSearchTypes.FromDisplay);
    AnnotationObject annObj = mr.Boundary;
    AnnotationArrow arrow = new AnnotationArrow();
    arrow.Color = Color.Red;
    arrow.Height = 30;
    arrow.Width = 30;
    arrow.Top = annObj.Top;
    arrow.Left = (annObj.Left-10);
    arrow.Border.Color = Color.Red;
    map1.AnnotationObjectsList.Add(arrow);

  • See Also:
    Map.getAnnotationObjectsList(), Map.findMapRegion(java.lang.String), Map

    getDataText

    public String getDataText()

    Gets the DataText attribute of the MapRegion object.

    Remarks:
  • This is a read-only property.

  • The Map.findMapRegion(java.lang.String) method of the Map class returns a desired MapRegion object.

  • See Also:
    Map.findMapRegion(java.lang.String), Map

    getDisplayText

    public String getDisplayText()

    Gets the DisplayText. For more detail see setDisplayText(java.lang.String).


    getFont

    public Font getFont()

    Gets the Font. For more detail see setFont(java.awt.Font).


    getLevel

    public int getLevel()

    Gets the current DetailLevel which the MapRegion object exists.

    Remarks:
  • This is a read-only property.

  • The Map.findMapRegion(java.lang.String) method of the Map class returns a selected MapRegion object.

  • See Also:
    Map.setDetailLevel(int), Map.findMapRegion(java.lang.String), Map

    getPoint

    public int getPoint()

    Gets the point index of the MapRegion object.

    Remarks:
  • This is a read-only property.

  • The Map.findMapRegion(java.lang.String) method of the Map class returns a selected MapRegion object.

  • See Also:
    Map.findMapRegion(java.lang.String), Map

    getPointAttributes

    public PointAttributes getPointAttributes()

    Gets the PointAttributes object for the selected map region.

    Remarks:
  • This property may be used to return the PointAttributes object for a selected MapRegion. It is important to remember if this point object is utilized for any other region, that region will also be modified.

  • See Also:
    getBoundary()

    getSvgText

    public String getSvgText()

    Gets the SvgText attribute of the MapRegion object.

    Remarks:
  • This is a read-only property.

  • The Map.findMapRegion(java.lang.String) method of the Map class returns a selected MapRegion object.

  • See Also:
    Map.findMapRegion(java.lang.String), Map

    getText

    public AnnotationObject getText()

    Returns the Text/Label part of the selected MapRegion from the map.

    Remarks:
  • This is a read only property.

  • Once you have selected a MapRegion using the Map.findMapRegion(java.lang.String) methodMap, using this property you can obtain the text/label object for that region. The Map.getAnnotationObjectsList() is a collection of all the annotation objects used to create the map.

  • This property can return either an AnnotationText object or AnnotationGroup object. In the case of an AnnotationGroup object, one of the AnnotationObjects in the group will be of type AnnotationText. The Sample below illistrates how to determine the type of an object and modify the text:

    MapRegion mp = map1.FindMapRegion("CT",LabelLinkSearchTypes.FromDisplay);
    AnnotationText annText = null;
    AnnotationGroup annGrp = null;
    if( mp.Text != null)
    {
    if (mp.Text.GetType() == typeof(AnnotationText))
    {
    annText = (AnnotationText) mp.Text;
    annText.Text = "NewText";
    }
    else
    {
    annGrp = (AnnotationGroup) mp.Text;
    foreach ( AnnotationObject annObjTemp in annGrp.List)
    {
    // Only one text object per region
    if ( annObjTemp.GetType() == typeof(AnnotationText))
    {
    annText = (AnnotationText) annObjTemp;
    annText.Text = "NewText";
    break;
    }
    }
    }
    }

  • See Also:
    Map.getAnnotationObjectsList(), Map.findMapRegion(java.lang.String), Map

    getWinnerSeries

    public int getWinnerSeries()

    Gets the WinnerSeries for the MapRegion.

    Remarks:
  • This is a read only property used to obtain the WinnerSeries for the selected MapRegion object.

  • See Also:
    MapRegion

    setDisplayText

    public void setDisplayText(String value)

    Gets the DisplayText attribute of the MapRegion object.

    Remarks:
  • This is a read-only property.

  • The Map.findMapRegion(java.lang.String) method of the Map class returns a selected MapRegion object.

  • See Also:
    Map.findMapRegion(java.lang.String), Map

    setFont

    public void setFont(Font value)

    Sets the Font for the selected MapRegion object.

    Remarks:
  • The Map class also supports a #Font property which may be used to set a Font object for the entire map.

  • The Map.findMapRegion(java.lang.String) method is used to obtain a selected map region based on the DataText, DisplayText or SvgText of a map region.

  • For more information regarding the Font type, please refer to the java.awt.Font Documentation.

  • See Also:
    setFont(java.awt.Font), Map.findMapRegion(java.lang.String), Map

    zoomTo

    public void zoomTo()

    Error: Member MapRegion.zoomTo member not found

    ERROR: Doc member not found


    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.