com.ijchart.xychart.web
Class DefaultAreaFragment

java.lang.Object
  extended by com.ijchart.xychart.web.DefaultAreaFragment
All Implemented Interfaces:
IAreaFragment, java.io.Serializable, java.lang.Cloneable

public class DefaultAreaFragment
extends java.lang.Object
implements IAreaFragment, java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

The default implement of interface IAreaFragment.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_CLICK_FUNCTION_NAME
           The default click function name.
static boolean DEFAULT_GENERATE_URL
           A boolean flag controls whether or not generate URL.
static java.lang.String DEFAULT_STYLE
           The default style value.
static java.lang.String DEFAULT_URL_PREFIX
           The default url prefix.
 
Constructor Summary
DefaultAreaFragment(IJChart chart)
           The constructor.
DefaultAreaFragment(IJChart chart, java.lang.String style)
           The constructor.
 
Method Summary
 java.lang.Object clone()
           Creates and returns a copy of this object.
 boolean equals(java.lang.Object obj)
           Tests this instance for equality with an arbitrary object.
protected  java.lang.String getAppendAreaFragment(int shapeIndex, IChartData data)
           Returns the append area fragment.
 IJChart getChart()
           Returns the IJChart object.
 java.lang.String getClickFunctionName()
           Returns the click function name.
 java.lang.String getFragment(int shapeIndex, IChartData data)
           Returns the area fragment of hotspot shape.
 boolean getGenerateURL()
           Returns whether or not generate URL.
 java.lang.String getStyle()
           Returns the style value.
 java.lang.String getURLPrefix()
           Returns the url prefix.
 int hashCode()
           Returns a hash code value for the object.
 void setChart(IJChart chart)
           Sets the IJChart object.
 void setClickFunctionName(java.lang.String functionName)
           Sets the click function name.
 void setGenerateURL(boolean flag)
           Sets whether or not generate URL.
 void setStyle(java.lang.String style)
           Sets the style value.
 void setURLPrefix(java.lang.String url)
           Sets the url prefix.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STYLE

public static final java.lang.String DEFAULT_STYLE
The default style value.

See Also:
Constant Field Values

DEFAULT_URL_PREFIX

public static final java.lang.String DEFAULT_URL_PREFIX
The default url prefix.

See Also:
Constant Field Values

DEFAULT_GENERATE_URL

public static final boolean DEFAULT_GENERATE_URL
A boolean flag controls whether or not generate URL.

See Also:
Constant Field Values

DEFAULT_CLICK_FUNCTION_NAME

public static final java.lang.String DEFAULT_CLICK_FUNCTION_NAME
The default click function name.

See Also:
Constant Field Values
Constructor Detail

DefaultAreaFragment

public DefaultAreaFragment(IJChart chart)
The constructor.

Parameters:
chart - IJChart The IJChart object (null not permitted).

DefaultAreaFragment

public DefaultAreaFragment(IJChart chart,
                           java.lang.String style)
The constructor.

Parameters:
chart - IJChart The IJChart object (null not permitted).
style - String The style value (null permitted).
Method Detail

getChart

public IJChart getChart()
Returns the IJChart object.

Returns:
IJChart The IJChart object (never null).

setChart

public void setChart(IJChart chart)
Sets the IJChart object.

Parameters:
chart - IJChart The IJChart object (null not permitted).

getStyle

public java.lang.String getStyle()
Returns the style value.

Returns:
String (maybe null).

setStyle

public void setStyle(java.lang.String style)
Sets the style value.

Parameters:
style - String (null permitted).

getGenerateURL

public boolean getGenerateURL()
Returns whether or not generate URL.

Returns:
boolean A boolean.

setGenerateURL

public void setGenerateURL(boolean flag)
Sets whether or not generate URL.

Parameters:
flag - boolean A boolean.

getURLPrefix

public java.lang.String getURLPrefix()
Returns the url prefix.

Returns:
String The url prefix.

setURLPrefix

public void setURLPrefix(java.lang.String url)
Sets the url prefix.

Parameters:
url - String The url prefix (null permitted).

getClickFunctionName

public java.lang.String getClickFunctionName()
Returns the click function name.

Returns:
String The click function name (maybe null).

setClickFunctionName

public void setClickFunctionName(java.lang.String functionName)
Sets the click function name.

Parameters:
functionName - String The click function name (null permitted).

getFragment

public java.lang.String getFragment(int shapeIndex,
                                    IChartData data)
Returns the area fragment of hotspot shape.

Specified by:
getFragment in interface IAreaFragment
Parameters:
shapeIndex - int The index of shape in collection.
data - IChartData The IChartData object (maybe null).
Returns:
String The area segment.

getAppendAreaFragment

protected java.lang.String getAppendAreaFragment(int shapeIndex,
                                                 IChartData data)
Returns the append area fragment.

Parameters:
shapeIndex - int The index of shape in collection.
data - IChartData The IChartData object (maybe null).
Returns:
String

equals

public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
object a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.