ChartCat 1.2

li.netcat.chart.util.elem
Class ElementLayout

java.lang.Object
  extended byli.netcat.chart.util.elem.ElementLayout
All Implemented Interfaces:
IteratableLayout, Layout
Direct Known Subclasses:
DefaultLayout

public class ElementLayout
extends java.lang.Object
implements IteratableLayout

Implementation of an iteratable layout that contains a list of elements.

Author:
Arthur Marxer

Constructor Summary
ElementLayout()
          Constructs a new and empty ElementLayout.
 
Method Summary
 void addElement(Element element)
          Adds a new element with no translation to this layout.
 void addElement(Element element, float translateX, float translateY)
          Adds a new element with the given translation to this layout.
 void addToBounds(float x, float y)
          Adds an arbitrary point to the bounds of this layout.
 void addToBounds(java.awt.geom.Rectangle2D.Float bounds)
          Adds an arbitrary rectangle to the bounds of this layout.
 java.awt.Rectangle getBounds()
          Returns the bounds of this layout.
 java.awt.geom.Rectangle2D.Float getBounds2D(java.awt.geom.Rectangle2D.Float out)
          Returns the bounds of this layout in float precision.
 ElementIterator getElements()
          Returns an element iterator that provides a flat view to all the elements in this layout.
 LogicalPoint getLogicalPoint(java.awt.Point p)
          Returns a logic point for a given physcal point.
 void paint(java.awt.Graphics g)
          Paints this layout to the given graphics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementLayout

public ElementLayout()
Constructs a new and empty ElementLayout.

Method Detail

getBounds2D

public java.awt.geom.Rectangle2D.Float getBounds2D(java.awt.geom.Rectangle2D.Float out)
Returns the bounds of this layout in float precision.

Parameters:
out - The same as the return parameter, not null.
Returns:
The bounds of this layout.

addToBounds

public void addToBounds(float x,
                        float y)
Adds an arbitrary point to the bounds of this layout.

Parameters:
x - The x-coordinate of the point.
y - The y-coordinate ot the point.

addToBounds

public void addToBounds(java.awt.geom.Rectangle2D.Float bounds)
Adds an arbitrary rectangle to the bounds of this layout.

Parameters:
bounds - An arbitrary rectangle, not null.

addElement

public void addElement(Element element)
Adds a new element with no translation to this layout.

Parameters:
element - The element to be added, not null.

addElement

public void addElement(Element element,
                       float translateX,
                       float translateY)
Adds a new element with the given translation to this layout.

Parameters:
element - The element to be added, not null.
translateX - The translation of the element in x-direction.
translateY - The translation of the element in y-direction.

getBounds

public java.awt.Rectangle getBounds()
Description copied from interface: Layout
Returns the bounds of this layout. The bounds may lay somewhere in the coordinate system, even in negative areas.

Specified by:
getBounds in interface Layout
Returns:
The bounds of this layout, never null.

paint

public void paint(java.awt.Graphics g)
Description copied from interface: Layout
Paints this layout to the given graphics.

Specified by:
paint in interface Layout
Parameters:
g - The target graphics object.

getLogicalPoint

public LogicalPoint getLogicalPoint(java.awt.Point p)
Description copied from interface: Layout
Returns a logic point for a given physcal point. The logic point carries information about the underlying data model and the current indices of the model. This method is used to display for example a tooltip at the position of the mouse cursor or to implement a drill down mechanism.

Specified by:
getLogicalPoint in interface Layout
Parameters:
p - The point relative to the coordinate system of this layout.
Returns:
A logic point or null if the given point is not inside a shape.

getElements

public ElementIterator getElements()
Description copied from interface: IteratableLayout
Returns an element iterator that provides a flat view to all the elements in this layout.

Specified by:
getElements in interface IteratableLayout
Returns:
The element iterator, never null.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print