Style Intelligence v12.0

inetsoft.graph.guide.form
Class LabelForm

java.lang.Object
  extended by inetsoft.graph.Graphable
      extended by inetsoft.graph.guide.form.GraphForm
          extended by inetsoft.graph.guide.form.LabelForm
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
TagForm

public class LabelForm
extends GraphForm

This is a text label form guide.


Constructor Summary
LabelForm()
          Default constructor.
LabelForm(Object label, double[] tuple)
          Create a label at position specified in logic space (scaled tuple values).
LabelForm(Object label, Object[] values)
          Create a label at position specified as data values (to be scaled).
LabelForm(Object label, Point2D pos)
          Create a label at a fixed position.
 
Method Summary
protected  inetsoft.graph.visual.LabelFormVO createFormVO(Object label, Point2D labelpos)
          Create the visual object for this form.
 Visualizable createVisual(Coordinate coord)
          Create a visual object to visualize this element.
 int getAlignmentX()
          Gets the the horizontal alignment.
 int getAlignmentY()
          Gets the the vertical alignment.
 int getCollisionModifier()
          Get the text collision resolution option.
 Insets getInsets()
          Get the label insets.
 Object getLabel()
          Get the text label of the form.
 Point2D getPoint()
          Get the fixed position for the label.
 TextSpec getTextSpec()
          Get the text attributes.
 double[] getTuple()
          Get the position tuple value.
 Object[] getValues()
          Get the position values value.
 void setAlignmentX(int alignx)
          Set the the horizontal alignment.
 void setAlignmentY(int aligny)
          Set the the vertical alignment.
 void setCollisionModifier(int modifier)
          Set the text collision resolution option.
 void setInsets(Insets insets)
          Set the label insets.
 void setLabel(Object label)
          Set the text label of the form.
 void setPoint(Point2D pos)
          Set the fixed position for the label.
 void setTextSpec(TextSpec spec)
          Set the text attributes.
 void setTuple(double[] tuple)
          Set the tuple for obtaining the position for the label in the coordinate.
 void setValues(Object[] values)
          Set the values for obtaining the position for the label in the coordinate.
 
Methods inherited from class inetsoft.graph.guide.form.GraphForm
createVisuals, getColor, getLine, getMeasure, getPosition, getXOffset, getYOffset, getZIndex, isInPlot, isVisible, scale, setColor, setInPlot, setLine, setMeasure, setXOffset, setYOffset, setZIndex
 
Methods inherited from class inetsoft.graph.Graphable
getHint, getHints, setHint, setHints, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LabelForm

public LabelForm()
Default constructor.


LabelForm

public LabelForm(Object label,
                 double[] tuple)
Create a label at position specified in logic space (scaled tuple values).

Parameters:
label - label content.
tuple - label point specified as a tuple of values.

LabelForm

public LabelForm(Object label,
                 Object[] values)
Create a label at position specified as data values (to be scaled).

Parameters:
label - label content.
values - label point specified as an unscaled tuple of values.

LabelForm

public LabelForm(Object label,
                 Point2D pos)
Create a label at a fixed position.

Parameters:
pos - the position in the graph. The position is in points using the math coordinate (Y grows upwards).
Method Detail

setLabel

public void setLabel(Object label)
Set the text label of the form.


getLabel

public Object getLabel()
Get the text label of the form.


setTuple

public void setTuple(double[] tuple)
Set the tuple for obtaining the position for the label in the coordinate. The tuple contains scaled values.


getTuple

public double[] getTuple()
Get the position tuple value.


setValues

public void setValues(Object[] values)
Set the values for obtaining the position for the label in the coordinate. The values are scaled to get the logic space.


getValues

public Object[] getValues()
Get the position values value.


setPoint

public void setPoint(Point2D pos)
Set the fixed position for the label.

Parameters:
pos - the point location in graph. If the value is between 0 and 1 (non-inclusive), it's treated as a proportion of the width/height. If the value is negative, it's the distance from the right/top of the graph.

getPoint

public Point2D getPoint()
Get the fixed position for the label.


setInsets

public void setInsets(Insets insets)
Set the label insets.


getInsets

public Insets getInsets()
Get the label insets.


setTextSpec

public void setTextSpec(TextSpec spec)
Set the text attributes.


getTextSpec

public TextSpec getTextSpec()
Get the text attributes.


getCollisionModifier

public int getCollisionModifier()
Get the text collision resolution option.


setCollisionModifier

public void setCollisionModifier(int modifier)
Set the text collision resolution option.


setAlignmentX

public void setAlignmentX(int alignx)
Set the the horizontal alignment.


setAlignmentY

public void setAlignmentY(int aligny)
Set the the vertical alignment.


getAlignmentX

public int getAlignmentX()
Gets the the horizontal alignment.


getAlignmentY

public int getAlignmentY()
Gets the the vertical alignment.


createVisual

public Visualizable createVisual(Coordinate coord)
Create a visual object to visualize this element.

Specified by:
createVisual in class GraphForm
Parameters:
coord - the coordinate the visual object is plotted on.
Returns:
the new visual object.

createFormVO

protected inetsoft.graph.visual.LabelFormVO createFormVO(Object label,
                                                         Point2D labelpos)
Create the visual object for this form.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.