## com.bbn.openmap.tools.icon
Class IconPartList

    java.lang.Object
      com.bbn.openmap.tools.icon.IconPartList

All Implemented Interfaces:
  java.lang.Cloneable, IconPart

public class IconPartList
extends java.lang.Object
implements IconPart

An IconPartList is a group of IconParts that can be rendered together. If you ask an IconPartList for it's geometry, it will combine all its parts into one geometry, and use its DrawingAttributes to render that combined shape. The IconPartList is itself an IconPart, so the recursive possibilities are endless.

Field Summary
`protected java.awt.Shape` `clip`
`protected java.util.List` `parts`
`protected DrawingAttributes` `renderingAttributes`

Constructor Summary
`IconPartList()`

Method Summary
`void` `add(IconPart part)` First in drawn on bottom.
`void` `clear()`
`java.lang.Object` `clone()` Create a clone of this part.
`java.awt.Shape` `getClip()` Get a clip area for the IconPart.
`java.awt.Shape` `getGeometry()` If you ask a IconPartList for its geometry, it will combine all its parts to make one Shape object.
`protected java.util.List` `getList()`
`DrawingAttributes` `getRenderingAttributes()` Get the rendering attributes for this IconPart.
`java.util.Iterator` `iterator()`
`boolean` `remove(IconPart part)`
`void` `render(java.awt.Graphics g, int width, int height)` Have the IconPart render itself into the Graphic object for a given height and width.
`void` `render(java.awt.Graphics g, int width, int height, DrawingAttributes appDA)` Have the IconPart render itself into the Graphic object for a given height and width.
`void` `setClip(java.awt.Shape clipArea)` Set a clip area for the IconPart to draw only certain parts of the geometry.
`void` `setGeometry(java.awt.Shape shape)` Set the geometry for this IconPart.
`void` `setRenderingAttributes(DrawingAttributes da)` Set the rendering attributes for this IconPart.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### parts

    protected java.util.List parts

### renderingAttributes

    protected DrawingAttributes renderingAttributes

### clip

    protected java.awt.Shape clip

Constructor Detail

### IconPartList

    public IconPartList()

Method Detail

### getList

    protected java.util.List getList()

### iterator

    public java.util.Iterator iterator()

### add

    public void add(IconPart part)

  First in drawn on bottom. Last in on top.

### remove

    public boolean remove(IconPart part)

### clear

    public void clear()

### render

    public void render(java.awt.Graphics g,
                       int width,
                       int height)

  Description copied from interface: `IconPart`
  Have the IconPart render itself into the Graphic object for a given height and width.

  Specified by:
    `render` in interface `IconPart`

### render

    public void render(java.awt.Graphics g,
                       int width,
                       int height,
                       DrawingAttributes appDA)

  Description copied from interface: `IconPart`
  Have the IconPart render itself into the Graphic object for a given height and width. The DrawingAttributes will dictate how the geometries can be drawn, of the IconPart may react to a System setting or last-minute attributes. The IconPart may decide to ignore this provided DrawingAttributes and just use what it has. appDA may be null, in which case the internal DrawingAttributes will be used.

  Specified by:
    `render` in interface `IconPart`
  Parameters:
    `appDA` - drawing attributes to use under certain conditions. Certain IconParts on this list may use these drawing attributes if they want/should. May be null.

### setClip

    public void setClip(java.awt.Shape clipArea)

  Description copied from interface: `IconPart`
  Set a clip area for the IconPart to draw only certain parts of the geometry.

  Specified by:
    `setClip` in interface `IconPart`

### getClip

    public java.awt.Shape getClip()

  Description copied from interface: `IconPart`
  Get a clip area for the IconPart.

  Specified by:
    `getClip` in interface `IconPart`

### setGeometry

    public void setGeometry(java.awt.Shape shape)

  Description copied from interface: `IconPart`
  Set the geometry for this IconPart.

  Specified by:
    `setGeometry` in interface `IconPart`

### getGeometry

    public java.awt.Shape getGeometry()

  If you ask a IconPartList for its geometry, it will combine all its parts to make one Shape object. All the rendering attributes from the individual parts will be ignored. The contributions will be kept geometrically separate (disconnected) and their clipping areas will be ignored.

  Specified by:
    `getGeometry` in interface `IconPart`

### setRenderingAttributes

    public void setRenderingAttributes(DrawingAttributes da)

  Description copied from interface: `IconPart`
  Set the rendering attributes for this IconPart.

  Specified by:
    `setRenderingAttributes` in interface `IconPart`

### getRenderingAttributes

    public DrawingAttributes getRenderingAttributes()

  Description copied from interface: `IconPart`
  Get the rendering attributes for this IconPart.

  Specified by:
    `getRenderingAttributes` in interface `IconPart`

### clone

    public java.lang.Object clone()

  Description copied from interface: `IconPart`
  Create a clone of this part.

  Specified by:
    `clone` in interface `IconPart`

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details