com.davisor.graphics.chart
Class LabelLegendFactory.LabelLegendMetrics

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartFactory.ChartMetrics
      extended bycom.davisor.graphics.chart.LabelLegendFactory.LabelLegendMetrics
Enclosing class:
LabelLegendFactory

public class LabelLegendFactory.LabelLegendMetrics
extends ChartFactory.ChartMetrics

Legend metrics contain the legend sizing information.


Field Summary
 
Fields inherited from class com.davisor.graphics.chart.ChartFactory.ChartMetrics
M_height, M_width
 
Constructor Summary
LabelLegendFactory.LabelLegendMetrics(float width, float height, float rowHeight, float rowMargin, float colWidth, float colMargin, float labelOffset, int cols)
          Creates new legend chart metrics.
 
Method Summary
 void scale(float xFactor, float yFactor)
          Scales all metrics components.
 void scaleToSize(java.lang.Number width, java.lang.Number height)
          Scales the metrics to make the chart meet given new size.
 
Methods inherited from class com.davisor.graphics.chart.ChartFactory.ChartMetrics
add, getHeight, getSize, getWidth, scale, setHeight, setSize, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelLegendFactory.LabelLegendMetrics

public LabelLegendFactory.LabelLegendMetrics(float width,
                                             float height,
                                             float rowHeight,
                                             float rowMargin,
                                             float colWidth,
                                             float colMargin,
                                             float labelOffset,
                                             int cols)
Creates new legend chart metrics.

Parameters:
width - chart width, in millimeters
height - chart height, in millimeters
rowHeight - legend row height
rowMargin - legend row margin
colWidth - legend column width
colMargin - legend column margin
labelOffset - distance between label rows
cols - number of legend columns
Method Detail

scale

public void scale(float xFactor,
                  float yFactor)
Scales all metrics components.

Overrides:
scale in class ChartFactory.ChartMetrics
Parameters:
xFactor - horizontal scaling factor
yFactor - vertical scaling factor

scaleToSize

public void scaleToSize(java.lang.Number width,
                        java.lang.Number height)
Scales the metrics to make the chart meet given new size. The old width or height is kept if a coresponding new value is not given.

This simple implementation scales legends to given size by calling scale(float,float).

Overrides:
scaleToSize in class ChartFactory.ChartMetrics
Parameters:
width - new chart width (may be null = keep the old width)
height - new chart height (may be null = keep the old height)
See Also:
scale(float,float)


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.