Package quadbase.util

Class HyperLink

java.lang.Object
quadbase.util.HyperLink

public class HyperLink extends Object
HyperLink

A structure to hold the hyperlink defined in the chart.

  • Field Details

    • DEFAULT_TARGET

      public static final String DEFAULT_TARGET
      Default target of the hyperlink, default is ""
      See Also:
    • series

      public String series
      Name of the series, a blank name (not null) represent all series
    • category

      public String category
      Name of the category, a blank name (not null) represent all category
    • sumBy

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

      public String xValue
      Value of X axis for surface chart, a string "All" represent all X values
    • zValue

      public String zValue
      Value of Z axis for surface chart, a string "All" represent all Z values
    • target

      public String target
      Specified target of the hyperlink
    • hint

      public String hint
      The hint to show when a right mouse click is done on the link.
  • Constructor Details

    • 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(String series, String category, String sumBy, String link, 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(String series, String category, String sumBy, 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 Details

    • 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(String xValue, String zValue, String link, 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(String xValue, String zValue, 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 Vector copy(Vector crl)
    • copy

      public void copy(HyperLink cr)
    • equals

      public boolean equals(Object obj)
      Check whether two hyperlink are equals, link field are igonred
      Overrides:
      equals in class Object
      Returns:
      true if series, category, sumBy field are equal.
    • write

      public void write(DataOutput out) throws IOException
      Output the link defination
      Parameters:
      out - data stream where the link output to
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • writeHint

      public void writeHint(DataOutput out) throws IOException
      Write the hint string to the output file also.
      Throws:
      IOException
    • read

      public static HyperLink read(DataInput in, boolean btarget, boolean isUTF) throws IOException
      Read the link defination
      Parameters:
      in - data stream where the link retrieve from
      btarget - true for file version >= 34
      Returns:
      the hyperlink
      Throws:
      IOException
    • readHint

      public void readHint(DataInput in, boolean isUTF) throws IOException
      Read the hint string from the input file.
      Throws:
      IOException
    • toString

      public String toString()
      Overide object.toString()
      Overrides:
      toString in class Object
      Returns:
      a string that represent the current hyperlink
    • findNewLink

      public HyperLink findNewLink(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(Vector vec, boolean forLegend)
    • setHintValue

      public void setHintValue(String hintString)
      Set the hint string associated with this hyperlink.
      Parameters:
      hintString - The hint string.
      See Also:
    • getHintValue

      public String getHintValue()
      Return the hint string associated with this hyperlink.
      Returns:
      The hint value.
      See Also: