EspressReport 6.6

quadbase.util
Class HyperLink

java.lang.Object
  extended by quadbase.util.HyperLink

public class HyperLink
extends java.lang.Object

HyperLink

A structure to hold the hyperlink defined in the chart.


Nested Class Summary
static class HyperLink.HintStyle
           
 
Field Summary
 java.lang.String category
          Name of the category, a blank name (not null) represent all category
static java.lang.String DEFAULT_TARGET
          Default target of the hyperlink, default is ""
 java.lang.String hint
          The hint to show when a right mouse click is done on the link.
 java.lang.String link
          The hyperlink which is any valid URL string.
 java.lang.String series
          Name of the series, a blank name (not null) represent all series
 java.lang.String sumBy
          Name of the sum category for stack chart, a blank name (not null) represent all sum category
 java.lang.String target
          Specified target of the hyperlink
 java.lang.String xValue
          Value of X axis for surface chart, a string "All" represent all X values
 java.lang.String zValue
          Value of Z axis for surface chart, a string "All" represent all Z values
 
Constructor Summary
HyperLink()
          Constructor for HyperLink
HyperLink(PickData pd)
          Constructor for HyperLink, internal use by chart package only
HyperLink(java.lang.String series, java.lang.String category, java.lang.String sumBy, java.lang.String link)
          Constructor for HyperLink using the default target window
HyperLink(java.lang.String series, java.lang.String category, java.lang.String sumBy, java.lang.String link, java.lang.String target)
          Constructor for HyperLink
 
Method Summary
 void copy(HyperLink cr)
           
static java.util.Vector copy(java.util.Vector crl)
           
static HyperLink createHyperLinkForSurfaceChart(java.lang.String xValue, java.lang.String zValue, java.lang.String link)
          HyperLink constructor for surface chart using the default target window
static HyperLink createHyperLinkForSurfaceChart(java.lang.String xValue, java.lang.String zValue, java.lang.String link, java.lang.String target)
          create HyperLink for surface chart
 boolean equals(java.lang.Object obj)
          Check whether two hyperlink are equals, link field are igonred
 HyperLink findNewLink(java.util.Vector vec)
          Search for a valid hyperlink define in the Vector of HyperLink using the category, series and sumBy of this object.
 HyperLink findNewLink(java.util.Vector vec, boolean forLegend)
           
 HyperLink.HintStyle getHintStyle()
           
 java.lang.String getHintValue()
          Return the hint string associated with this hyperlink.
 int hashCode()
           
static HyperLink read(java.io.DataInput in, boolean btarget, boolean isUTF)
          Read the link defination
 void readHint(java.io.DataInput in, boolean isUTF)
          Read the hint string from the input file.
 void setHintStyle(HyperLink.HintStyle style)
          Sets behavior of the hyperlink hints against the data points hints.
 void setHintValue(java.lang.String hintString)
          Set the hint string associated with this hyperlink.
 java.lang.String toString()
          Overide object.toString()
 void write(java.io.DataOutput out)
          Output the link defination
 void writeHint(java.io.DataOutput out)
          Write the hint string to the output file also.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TARGET

public static final java.lang.String DEFAULT_TARGET
Default target of the hyperlink, default is ""

See Also:
Constant Field Values

series

public java.lang.String series
Name of the series, a blank name (not null) represent all series


category

public java.lang.String category
Name of the category, a blank name (not null) represent all category


sumBy

public java.lang.String sumBy
Name of the sum category for stack chart, a blank name (not null) represent all sum category


xValue

public java.lang.String xValue
Value of X axis for surface chart, a string "All" represent all X values


zValue

public java.lang.String zValue
Value of Z axis for surface chart, a string "All" represent all Z values


link

public java.lang.String link
The hyperlink which is any valid URL string. If the extension is .cht or .tpl then current chart will replace by new one. For other extension the browser will load that page.


target

public java.lang.String target
Specified target of the hyperlink


hint

public java.lang.String hint
The hint to show when a right mouse click is done on the link.

Constructor Detail

HyperLink

public HyperLink(PickData pd)
Constructor for HyperLink, internal use by chart package only

Parameters:
pd - a PickData object

HyperLink

public HyperLink()
Constructor for HyperLink


HyperLink

public HyperLink(java.lang.String series,
                 java.lang.String category,
                 java.lang.String sumBy,
                 java.lang.String link,
                 java.lang.String target)
Constructor for HyperLink

Parameters:
series - series name, a blank name "" represent all series
category - category name, a blank name "" represent all category
sumBy - sumBy name, a blank name "" represent all sum category
link - the hyperlink, can be any valid URL name
target - the target window

HyperLink

public HyperLink(java.lang.String series,
                 java.lang.String category,
                 java.lang.String sumBy,
                 java.lang.String link)
Constructor for HyperLink using the default target window

Parameters:
series - series name, a blank name "" represent all series
category - category name, a blank name "" represent all category
sumBy - sumBy name, a blank name "" represent all sum category
link - the hyperlink, can be any valid URL name
Method Detail

setHintStyle

public void setHintStyle(HyperLink.HintStyle style)
Sets behavior of the hyperlink hints against the data points hints. REPLACE - data point hint is replaced by hyperlink hint. (default) ATTACH_START - hyperlink hint is placed at the start of the data point hint. ATTACH_END - hyperlink hint is appended to the data point hint.


getHintStyle

public HyperLink.HintStyle getHintStyle()

createHyperLinkForSurfaceChart

public static HyperLink createHyperLinkForSurfaceChart(java.lang.String xValue,
                                                       java.lang.String zValue,
                                                       java.lang.String link,
                                                       java.lang.String target)
create HyperLink for surface chart

Parameters:
xValue - value of X Axis, a string "All" represent all values in X axis
zValue - value of Z Axis, a string "All" represent all values in Z axis
link - the hyperlink, can be any valid URL name
target - the target window Note X, Z Axis form horizontal plane for 3D surface chart

createHyperLinkForSurfaceChart

public static HyperLink createHyperLinkForSurfaceChart(java.lang.String xValue,
                                                       java.lang.String zValue,
                                                       java.lang.String link)
HyperLink constructor for surface chart using the default target window

Parameters:
xValue - value of X Axis, a string "All" represent all values in X axis
zValue - value of Z Axis, a string "All" represent all values in Z axis
link - the hyperlink, can be any valid URL name Note X, Z Axis form horizontal plane for 3D surface chart

copy

public static java.util.Vector copy(java.util.Vector crl)

copy

public void copy(HyperLink cr)

equals

public boolean equals(java.lang.Object obj)
Check whether two hyperlink are equals, link field are igonred

Overrides:
equals in class java.lang.Object
Returns:
true if series, category, sumBy field are equal.

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Output the link defination

Parameters:
out - data stream where the link output to
Throws:
java.io.IOException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

writeHint

public void writeHint(java.io.DataOutput out)
               throws java.io.IOException
Write the hint string to the output file also.

Throws:
java.io.IOException

read

public static HyperLink read(java.io.DataInput in,
                             boolean btarget,
                             boolean isUTF)
                      throws java.io.IOException
Read the link defination

Parameters:
in - data stream where the link retrieve from
btarget - true for file version >= 34
Returns:
the hyperlink
Throws:
java.io.IOException

readHint

public void readHint(java.io.DataInput in,
                     boolean isUTF)
              throws java.io.IOException
Read the hint string from the input file.

Throws:
java.io.IOException

toString

public java.lang.String toString()
Overide object.toString()

Overrides:
toString in class java.lang.Object
Returns:
a string that represent the current hyperlink

findNewLink

public HyperLink findNewLink(java.util.Vector vec)
Search for a valid hyperlink define in the Vector of HyperLink using the category, series and sumBy of this object. If multiple links are found that match the criteria in the vector. The most specialize link will return.

Parameters:
vec - a Vector of object HyperLink
Returns:
a hyperlink, the url is store in the link of it

findNewLink

public HyperLink findNewLink(java.util.Vector vec,
                             boolean forLegend)

setHintValue

public void setHintValue(java.lang.String hintString)
Set the hint string associated with this hyperlink.

Parameters:
hintString - The hint string.
See Also:
IHyperLinkSet.gethHint()

getHintValue

public java.lang.String getHintValue()
Return the hint string associated with this hyperlink.

Returns:
The hint value.
See Also:
IHyperLinkSet.gethHint()

EspressReport 6.6