NetCharts Pro

netcharts.pro.common
Class NFActiveLabel

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFActiveLabel
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFActiveLabel
extends NFBaseClass
implements NFCDLGenerator

All NetCharts chart objects support the display of informational labels and the ability to create actionable events using the NFActiveLabel object. The default behavior, sometimes referred to as "dwell labels or rollovers", occurs when the pointer (mouse or other pointing device) hovers over a configured data value or other chart element. If a label is defined for that element it will be displayed in a popup label in the style prescribed in the defined NFDwell object; if the user clicks on that element, the URL will be activated.

Active labels consist of three main fields, the label, the URL, and the target. The label is the text to be displayed when the rollover occurs. The URL is activated via a showDocument() using the given target. If the label is set to "OUTLINE", the chart element will display an outline on rollover and not a popup. If the target is set to "LOADPARAMS" the chart will attempt to load CDL parameters from the given URL when the chart element is clicked on.

Developers have the option to listen for active label behavior via an implementation of a NFChartActionListener object. Note that the NFActiveLabel's label, URL, and target fields are all presented as String objects - Therefore, programmers may use these fields to store any desired information (like a hashtable key) and then override the popup/drilldown behavior for custom needs.

See Also:
NFDwell, NFChartActionListener

Constructor Summary
NFActiveLabel()
          Constructs a default active label
NFActiveLabel(java.lang.String label, java.lang.String theurl, java.lang.String thetarget)
          Constructs an active label with the given popup label, url, and target.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this active label
 void getCDL(java.lang.StringBuffer sb, boolean includeParams)
          Append CDL parameters representing this active label to the given StringBuffer.
 java.lang.String getLabel()
          Get popup label
 java.lang.String getTarget()
          Return drilldown target
 java.lang.String getURL()
          Get string representing the URL.
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setLabel(java.lang.String label)
          Set popup label
 void setTarget(java.lang.String target)
          Set target for drilldown behavior
 void setURL(java.lang.String urlString)
          Set string representing the url
 java.lang.String toString()
          Returns a new String object representing this active label.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFActiveLabel

public NFActiveLabel()
Constructs a default active label


NFActiveLabel

public NFActiveLabel(java.lang.String label,
                     java.lang.String theurl,
                     java.lang.String thetarget)
Constructs an active label with the given popup label, url, and target.

Parameters:
label - Popup label text or OUTLINE.
theurl - The URL to activate if the active label is clicked on.
thetarget - The target for the activated URL.
Method Detail

setLabel

public void setLabel(java.lang.String label)
Set popup label

Parameters:
label - The popup label text or OUTLINE to outline the item.

getLabel

public java.lang.String getLabel()
Get popup label

Returns:
label or null if not set

setURL

public void setURL(java.lang.String urlString)
Set string representing the url

Parameters:
urlString - The URL string

getURL

public java.lang.String getURL()
Get string representing the URL.

Returns:
urlstring representing the drilldown URL or null if not set.

setTarget

public void setTarget(java.lang.String target)
Set target for drilldown behavior

Parameters:
target - Name of window that the drilldown should occur in or LOADPARAMS for this chart to read parameters from the URL.

getTarget

public java.lang.String getTarget()
Return drilldown target

Returns:
drilldown target.

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: ("label","url","target")

setCDL

public void setCDL(java.lang.String[] elements,
                   int offset)
Configures this object from a CDL parameter representation.

Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing popup label, drilldown url, and drilldown url target information.
offset - Offset into the elements array.

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParams)
Append CDL parameters representing this active label to the given StringBuffer.

Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this active label

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: ("label","url","target")

toString

public java.lang.String toString()
Returns a new String object representing this active label.

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
A new String object in the same form as that given by getCDL().

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011