Style Intelligence v12.0

inetsoft.graph.aesthetic
Class CompositeColorFrame

java.lang.Object
  extended by inetsoft.graph.aesthetic.VisualFrame
      extended by inetsoft.graph.aesthetic.ColorFrame
          extended by inetsoft.graph.aesthetic.CompositeColorFrame
All Implemented Interfaces:
CompositeVisualFrame, Serializable, Cloneable

public class CompositeColorFrame
extends ColorFrame
implements CompositeVisualFrame

CompositeColorFrame combines multiple color frames to provide a cascading behavior. Each frame is checked, and the first frame that returns a color for the value is used.

See Also:
Serialized Form

Constructor Summary
CompositeColorFrame()
          Constructor.
 
Method Summary
 void addFrame(VisualFrame frame)
          Add a legend frame.
 Object clone()
          Create a copy of this object.
 Color getColor(DataSet data, String col, int row)
          Get the color for the specified cell.
 Color getColor(Object val)
          Get the color for the specified value.
 String getField()
          Get the column associated with this frame.
 VisualFrame getFrame(int idx)
          Get the legend frame at the specified index.
 int getFrameCount()
          Get the number of legend frames.
 VisualFrame getGuideFrame()
          Get the legend frame to generate legend guide.
 Object[] getLabels()
          Get the labels of the values to show on the legend.
 LegendSpec getLegendSpec()
          Get the legend specification.
 Scale getScale()
          Get the scale for mapping the value from a dataset to the frame.
 String getTitle()
          Get the title to show on the legend.
 Object[] getValues()
          Get the values mapped by this frame.
 void init(DataSet data)
          Initialize the legend frame with values from the dataset.
 boolean isValid()
          Check if this frame has been initialized and is ready to be used.
 void removeFrame(int idx)
          Remove the legend frame at the specified index.
 void setBrightness(double bright)
          Set the brightness.
 void setField(String field)
          Set the column associated with this frame.
 void setLegendSpec(LegendSpec legendSpec)
          Set the legend attributes.
 void setScale(Scale scale)
          Set the scale for mapping the value from a dataset to the frame.
 void setScaleOption(int option)
          Set the scaleOption for suppressing null.
 
Methods inherited from class inetsoft.graph.aesthetic.ColorFrame
equals, getBrightness, isGrayscale, process, setGrayscale
 
Methods inherited from class inetsoft.graph.aesthetic.VisualFrame
createComparator, getLegendFrame, getScaleOption, hashCode, isVisible, setLegendFrame, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeColorFrame

public CompositeColorFrame()
Constructor.

Method Detail

addFrame

public void addFrame(VisualFrame frame)
Add a legend frame.

Specified by:
addFrame in interface CompositeVisualFrame

getFrameCount

public int getFrameCount()
Get the number of legend frames.

Specified by:
getFrameCount in interface CompositeVisualFrame

getFrame

public VisualFrame getFrame(int idx)
Get the legend frame at the specified index.

Specified by:
getFrame in interface CompositeVisualFrame

removeFrame

public void removeFrame(int idx)
Remove the legend frame at the specified index.

Specified by:
removeFrame in interface CompositeVisualFrame

setScale

public void setScale(Scale scale)
Set the scale for mapping the value from a dataset to the frame.

Overrides:
setScale in class VisualFrame

getScale

public Scale getScale()
Get the scale for mapping the value from a dataset to the frame.

Overrides:
getScale in class VisualFrame

setScaleOption

public void setScaleOption(int option)
Set the scaleOption for suppressing null.

Overrides:
setScaleOption in class VisualFrame

setField

public void setField(String field)
Set the column associated with this frame.

Overrides:
setField in class VisualFrame

getField

public String getField()
Get the column associated with this frame.

Overrides:
getField in class VisualFrame

init

public void init(DataSet data)
Initialize the legend frame with values from the dataset.

Overrides:
init in class VisualFrame

getColor

public Color getColor(DataSet data,
                      String col,
                      int row)
Get the color for the specified cell.

Specified by:
getColor in class ColorFrame
Parameters:
data - the specified dataset.
col - the specified column name.
row - the specified row index.

getColor

public Color getColor(Object val)
Get the color for the specified value.

Specified by:
getColor in class ColorFrame

getTitle

public String getTitle()
Get the title to show on the legend.

Overrides:
getTitle in class VisualFrame

getValues

public Object[] getValues()
Get the values mapped by this frame.

Overrides:
getValues in class VisualFrame

getLabels

public Object[] getLabels()
Get the labels of the values to show on the legend. The default implementation will just convert values to labels.

Overrides:
getLabels in class VisualFrame

getGuideFrame

public VisualFrame getGuideFrame()
Get the legend frame to generate legend guide.

Specified by:
getGuideFrame in interface CompositeVisualFrame

setBrightness

public void setBrightness(double bright)
Set the brightness. The return color is adjusted by multiplying the brightness value. A value of one (1) doesn't change the color.

Overrides:
setBrightness in class ColorFrame

getLegendSpec

public LegendSpec getLegendSpec()
Get the legend specification.

Overrides:
getLegendSpec in class VisualFrame

setLegendSpec

public void setLegendSpec(LegendSpec legendSpec)
Set the legend attributes.

Overrides:
setLegendSpec in class VisualFrame

clone

public Object clone()
Create a copy of this object.

Overrides:
clone in class VisualFrame

isValid

public boolean isValid()
Check if this frame has been initialized and is ready to be used.

Overrides:
isValid in class VisualFrame

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