de.erichseifert.gral
Interface Container

All Superinterfaces:
Iterable<Drawable>
All Known Implementing Classes:
BarPlot, DrawableContainer, Legend, PiePlot, Plot, XYPlot, XYPlot.XYLegend

public interface Container
extends Iterable<Drawable>

An interface that provides functions to store and layout Drawables.


Method Summary
 void add(Drawable drawable)
          Adds a new component to this container.
 void add(Drawable drawable, Object constraints)
          Adds a new component to this container.
 Rectangle2D getBounds()
          Returns the bounds of this container.
 Object getConstraints(Drawable drawable)
          Return additional information on component
 Insets2D getInsets()
          Return the space that this DrawableContainer must leave at each of its edges.
 Layout getLayout()
          Returns the layout associated with this container.
 void remove(Drawable drawable)
          Removes a component from this container.
 void setBounds(Rectangle2D bounds)
          Sets the bounds of this container.
 void setInsets(Insets2D insets)
          Sets the space that this DrawableContainer must leave at each of its edges.
 void setLayout(Layout layout)
          Sets the layout associated with this container.
 int size()
          Returns the number of components that are stored in this container.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getInsets

Insets2D getInsets()
Return the space that this DrawableContainer must leave at each of its edges.

Returns:
The insets of this DrawableContainer

setInsets

void setInsets(Insets2D insets)
Sets the space that this DrawableContainer must leave at each of its edges.

Parameters:
insets - Insets to be set.

getBounds

Rectangle2D getBounds()
Returns the bounds of this container.

Returns:
bounds

setBounds

void setBounds(Rectangle2D bounds)
Sets the bounds of this container.

Parameters:
bounds - Bounds

getLayout

Layout getLayout()
Returns the layout associated with this container.

Returns:
Layout manager

setLayout

void setLayout(Layout layout)
Sets the layout associated with this container.

Parameters:
layout - Layout to be set.

add

void add(Drawable drawable)
Adds a new component to this container.

Parameters:
drawable - Component

add

void add(Drawable drawable,
         Object constraints)
Adds a new component to this container.

Parameters:
drawable - Component
constraints - Additional information (e.g. for layout)

getConstraints

Object getConstraints(Drawable drawable)
Return additional information on component

Parameters:
drawable - Component
Returns:
Information object or null

remove

void remove(Drawable drawable)
Removes a component from this container.

Parameters:
drawable - Component

size

int size()
Returns the number of components that are stored in this container.

Returns:
total number of components


Copyright © 2009-2010. All Rights Reserved.