com.davisor.graphics.chart
Class ComboFactory.ComboMetrics

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartFactory.ChartMetrics
      extended bycom.davisor.graphics.chart.ComboFactory.ComboMetrics
Enclosing class:
ComboFactory

public class ComboFactory.ComboMetrics
extends ChartFactory.ChartMetrics

Combo metrics. Contains code for chart resizing.


Field Summary
 ComboFactory.ComboContext context
           
 java.util.List metricsList
           
 
Fields inherited from class com.davisor.graphics.chart.ChartFactory.ChartMetrics
M_height, M_width
 
Constructor Summary
ComboFactory.ComboMetrics(float width, float height, ComboFactory.ComboContext context, java.util.List metricsList)
          Creates new chart metrics.
 
Method Summary
 void scale(float xFactor, float yFactor)
          Apply linear scaling to the image.
 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
 

Field Detail

context

public ComboFactory.ComboContext context

metricsList

public java.util.List metricsList
Constructor Detail

ComboFactory.ComboMetrics

public ComboFactory.ComboMetrics(float width,
                                 float height,
                                 ComboFactory.ComboContext context,
                                 java.util.List metricsList)
Creates new chart metrics.

Parameters:
width - chart width, in millimeters
height - chart height, in millimeters
metricsList - list of sub-chart metrices
Method Detail

scale

public void scale(float xFactor,
                  float yFactor)
Apply linear scaling to the image. Affects to all measurements.

This method iteraters through all sub-charts, and scales them with given scale factors.

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 method will recompute and refit all component metrics so that sub-chart component distribution becomes optimal with respect to the available size.

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:
ChartFactory.ChartMetrics.getSize(int)


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