de.erichseifert.gral.graphics
Interface Container
-
- All Superinterfaces:
- java.lang.Iterable<Drawable>
- All Known Implementing Classes:
- AbstractLegend, AbstractLegend.Item, AbstractPlot, BarPlot, BarPlot.BarPlotLegend, BoxPlot, BoxPlot.BoxPlotLegend, DrawableContainer, PiePlot, PiePlot.PiePlotLegend, RasterPlot, SeriesLegend, ValueLegend, XYPlot, XYPlot.XYLegend
public interface Container extends java.lang.Iterable<Drawable>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(Drawable drawable)Adds a new component to this container.voidadd(Drawable drawable, java.lang.Object constraints)Adds a new component to this container.booleancontains(Drawable drawable)Returns whether the specifiedDrawableis stored.java.awt.geom.Rectangle2DgetBounds()Returns the bounds of this container.java.lang.ObjectgetConstraints(Drawable drawable)Return additional information on componentjava.util.List<Drawable>getDrawables()Returns a list of stored components.java.util.List<Drawable>getDrawablesAt(java.awt.geom.Point2D point)Returns the components at the specified point.Insets2DgetInsets()Returns the space that this container must preserve at each of its edges.LayoutgetLayout()Returns the layout associated with this container.voidlayout()Recalculates this container's layout.voidremove(Drawable drawable)Removes a component from this container.voidsetBounds(java.awt.geom.Rectangle2D bounds)Sets the bounds of this container.voidsetInsets(Insets2D insets)Sets the space that this container must preserve at each of its edges.voidsetLayout(Layout layout)Sets the layout associated with this container.intsize()Returns the number of components that are stored in this container.
-
-
-
Method Detail
-
getInsets
Insets2D getInsets()
Returns the space that this container must preserve at each of its edges.- Returns:
- The insets of this DrawableContainer
-
setInsets
void setInsets(Insets2D insets)
Sets the space that this container must preserve at each of its edges.- Parameters:
insets- Insets to be set.
-
getBounds
java.awt.geom.Rectangle2D getBounds()
Returns the bounds of this container.- Returns:
- bounds
-
setBounds
void setBounds(java.awt.geom.Rectangle2D bounds)
Sets the bounds of this container.- Parameters:
bounds- Bounds
-
getLayout
Layout getLayout()
Returns the layout associated with this container.- Returns:
- Layout manager
-
layout
void layout()
Recalculates this container's layout.
-
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, java.lang.Object constraints)
Adds a new component to this container.- Parameters:
drawable- Componentconstraints- Additional information (e.g. for layout)
-
contains
boolean contains(Drawable drawable)
Returns whether the specifiedDrawableis stored.- Parameters:
drawable- Element to be checked.- Returns:
trueif the element is stored in theContainer,falseotherwise.
-
getDrawablesAt
java.util.List<Drawable> getDrawablesAt(java.awt.geom.Point2D point)
Returns the components at the specified point. The first component in the resultListis the most specific component, i.e. the component with the deepest nesting level. If no component could be found an emptyListwill be returned.- Parameters:
point- Two-dimensional point.- Returns:
- Components at the specified point, with the deepest nested component first.
-
getDrawables
java.util.List<Drawable> getDrawables()
Returns a list of stored components.- Returns:
- Contained drawables.
-
getConstraints
java.lang.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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG