com.bbn.openmap.tools.icon
Class OMIconFactory

java.lang.Object
  extended by com.bbn.openmap.tools.icon.OMIconFactory

public class OMIconFactory
extends java.lang.Object

The OMIconFactory is a factory to build ImageIcons, with content described by IconParts for a certain size.


Constructor Summary
OMIconFactory()
           
 
Method Summary
static javax.swing.ImageIcon createImageIcon(int width, int height)
          Create an ImageIcon that is a certain pixel height and width.
static javax.swing.ImageIcon createImageIcon(int width, int height, int imageType)
          Create an ImageIcon that is a certain pixel height and width, with a specified image type (ARGB, RGB, etc).
static javax.swing.ImageIcon getIcon(int width, int height, IconPart geometry)
          Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry.
static javax.swing.ImageIcon getIcon(int width, int height, IconPart geometry, DrawingAttributes appDA)
          Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry.
static javax.swing.ImageIcon getIcon(int width, int height, IconPart geometry, DrawingAttributes appDA, java.awt.geom.AffineTransform af)
          Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry.
static javax.swing.ImageIcon getIcon(int width, int height, IconPart geometry, DrawingAttributes appDA, double rot)
          Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMIconFactory

public OMIconFactory()
Method Detail

createImageIcon

public static javax.swing.ImageIcon createImageIcon(int width,
                                                    int height)
Create an ImageIcon that is a certain pixel height and width. This will return an empty ImageIcon, and you'd have to do the rendering into its image.


createImageIcon

public static javax.swing.ImageIcon createImageIcon(int width,
                                                    int height,
                                                    int imageType)
Create an ImageIcon that is a certain pixel height and width, with a specified image type (ARGB, RGB, etc). This will return an empty ImageIcon, and you'd have to do the rendering into its image.


getIcon

public static javax.swing.ImageIcon getIcon(int width,
                                            int height,
                                            IconPart geometry)
Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry. The geometry will be drawing with default DrawingAttributes.


getIcon

public static javax.swing.ImageIcon getIcon(int width,
                                            int height,
                                            IconPart geometry,
                                            DrawingAttributes appDA)
Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry. Also, the DrawingAttributes can be used to add color/texture to the IconPart geometries.


getIcon

public static javax.swing.ImageIcon getIcon(int width,
                                            int height,
                                            IconPart geometry,
                                            DrawingAttributes appDA,
                                            java.awt.geom.AffineTransform af)
Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry. Also, the DrawingAttributes can be used to add color/texture to the IconPart geometries, and an AffineTransform can be used to further modify the geometry. How the DrawingAttributes are used depends on the IconPart, how it handles its getAttributesForRendering(...) method. Some IconParts allow for accents to be painted that might be part of a theme. This appDA argument lets you specify how those accents might be rendered. General DrawingAttributes should be set on the IconPart, however.


getIcon

public static javax.swing.ImageIcon getIcon(int width,
                                            int height,
                                            IconPart geometry,
                                            DrawingAttributes appDA,
                                            double rot)
Create an ImageIcon that is a certain pixel height and width created with a certain IconPart geometry. Also, the DrawingAttributes can be used to add color/texture to the IconPart geometries, and an angle can be provided to rotate the geometry (zero is north up, positive clockwise, angle in RADIANS).



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