org.omegahat.Graphics.Primitives
Interface GraphicalContainerInt

All Superinterfaces:
GraphicalComponentInt, ScaledComponentInt, SimpleGraphicalContainerInt, Tree
All Known Implementing Classes:
GraphicalContainer

public interface GraphicalContainerInt
extends Tree, ScaledComponentInt, GraphicalComponentInt, SimpleGraphicalContainerInt

An interface defining a graphical object that can contain child elements. The object must be able to manage its children, allowing the caller to add and remove them from the collection. This must also allow control of both region and layer-specific additions to the hierarchy. Additionally, it must be able to control their positions by providing a coordinate org.omegahat.Environment.System for each dimension.


Method Summary
 void addGraphicalObject(GraphicalComponentInt go)
          Simplest version of the addition of a graphical component to a container, using the default region and layer.
 void addGraphicalObject(GraphicalComponentInt go, boolean withAllocator)
           
 void addGraphicalObject(GraphicalComponentInt go, boolean withAllocator, int layer)
           
 void addGraphicalObject(GraphicalComponentInt go, int regionId)
          Add the specified graphical component to this container with in the given region.
 void addGraphicalObject(GraphicalComponentInt go, int inRegion, int layer)
          Add the specified graphical component to this container in the region identified by region and draw it in the given layer.
 void addGraphicalObject(GraphicalComponentInt go, java.lang.Object regionId)
           
 void addGraphicalObject(GraphicalComponentInt go, java.lang.Object regionId, int layer)
           
 void addGraphicalObject(GraphicalComponentInt go, java.lang.String inRegion)
          Add the specified graphical component to this container with in the given region identified by name.
 void addGraphicalObject(GraphicalComponentInt go, java.lang.String inRegion, int layer)
          Add the graphical componen to the specified region within this container, drawing it in the given layer.
 GraphicalComponentInt getChild(int which)
           
 int getOrigin()
           
 RegionAllocator getRegionAllocator()
          Get the current region allocator used by this container.
 void removeGraphicalObject(GraphicalComponentInt go)
           
 void removeGraphicalObject(GraphicalComponentInt go, int layer)
           
 void setOrigin(int o)
          Set the location of the position to be determined
 void setRegionAllocator(RegionAllocator ra)
          Set the object that will control the creation of the different regions within the container to house sub-groups of components.
 
Methods inherited from interface org.omegahat.DataStructures.Trees.Tree
add, get, getChildCount, getChildren, remove
 
Methods inherited from interface org.omegahat.Graphics.Primitives.ScaledComponentInt
getXScale, getYScale, setXScale, setYScale
 
Methods inherited from interface org.omegahat.Graphics.Primitives.GraphicalComponentInt
draw, getParameters, getRegion, isActive, isVisible, parent, parent, parents, setActive, setParameters, setRegion, setVisible
 
Methods inherited from interface org.omegahat.Graphics.Primitives.SimpleGraphicalContainerInt
parent, parent
 

Method Detail

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               int regionId)
Add the specified graphical component to this container with in the given region. This is an alternative method to adding the component to the region directly and usually amounts to regionAllocator().get(inRegion).addGraphicalObject(go)

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               java.lang.String inRegion)
Add the specified graphical component to this container with in the given region identified by name. This is an alternative method to adding the component to the region directly and usually amounts to regionAllocator().get(inRegion).addGraphicalObject(go)

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               int inRegion,
                               int layer)
Add the specified graphical component to this container in the region identified by region and draw it in the given layer.

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               java.lang.String inRegion,
                               int layer)
Add the graphical componen to the specified region within this container, drawing it in the given layer.

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go)
Simplest version of the addition of a graphical component to a container, using the default region and layer.

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               boolean withAllocator)

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               boolean withAllocator,
                               int layer)

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               java.lang.Object regionId)
                        throws java.lang.Exception

addGraphicalObject

public void addGraphicalObject(GraphicalComponentInt go,
                               java.lang.Object regionId,
                               int layer)
                        throws java.lang.Exception

removeGraphicalObject

public void removeGraphicalObject(GraphicalComponentInt go)

removeGraphicalObject

public void removeGraphicalObject(GraphicalComponentInt go,
                                  int layer)

getChild

public GraphicalComponentInt getChild(int which)

setRegionAllocator

public void setRegionAllocator(RegionAllocator ra)
Set the object that will control the creation of the different regions within the container to house sub-groups of components.

getRegionAllocator

public RegionAllocator getRegionAllocator()
Get the current region allocator used by this container.

setOrigin

public void setOrigin(int o)
Set the location of the position to be determined

getOrigin

public int getOrigin()