info.aduna.clustermap
Interface IconFactory

All Known Implementing Classes:
DefaultIconFactory, ItemIconFactory

public interface IconFactory

An IconFactory is used by a ClusterMap to retrieve Images that it will use to represent certain objects in the visualisation.

A selection level is also specified that indicates whether the object is selected or not. Currently, only 0f (not selected) and 1f (selected) are used. In the future, values inbetween may also be used.

All Images returned by this interface should be fully loaded in memory, e.g. by using a BufferedImage, or an Image pre-loaded by the MediaTracker.

See Also:
ClusterMap

Method Summary
 Image getGraphNodeImage(Classification classification, double diameter, float selectionLevel)
          Returns the Image used to render the graph node of a Classification.
 int getGraphNodeImageDiameter()
          Returns the diameter of the graph node images at normal magnification.
 Image getLabelImage(Classification classification, double diameter, float selectionLevel)
          Returns the Image used in the label of the Classification.
 int getLabelImageDiameter()
          Returns the diameter of the label images at normal magnification.
 Image getObjectImage(Object object, double diameter, float selectionLevel)
          Returns the Image used to render an Object contained in a Cluster.
 int getObjectImageDiameter()
          Returns the diameter of the object images at normal magnification.
 

Method Detail

getObjectImageDiameter

int getObjectImageDiameter()
Returns the diameter of the object images at normal magnification.


getObjectImage

Image getObjectImage(Object object,
                     double diameter,
                     float selectionLevel)
Returns the Image used to render an Object contained in a Cluster.

This method should respond fast, as retrieved Images will not be cached.

Parameters:
object - The Object for which a representative Image should be returned.
diameter - The diameter the image should have. The image is assumed to depect a more-or-less round shape with transparent corners, hence 'diameter' instead of 'width. The diameter is encoded as a double to allow continuous scaling.
selectionLevel - A number indicating the level to which the Object is considered to be selected. This is a number between 0 and 1. Typically only these two values are used, future version of the software may also use intermediate values.
Returns:
A fully-loaded Image.

getGraphNodeImageDiameter

int getGraphNodeImageDiameter()
Returns the diameter of the graph node images at normal magnification.


getGraphNodeImage

Image getGraphNodeImage(Classification classification,
                        double diameter,
                        float selectionLevel)
Returns the Image used to render the graph node of a Classification. Note that certain Cluster Map rendering schemes may not use these icons.

This Image may be null.

Parameters:
classification - The Classification for which a representative Image should be returned.
diameter - The diameter the image should have, encoded as a double to allow continuous scaling.
selectionLevel - A number indicating the level to which the Classification is considered to be selected. This is a number between 0 and 1.
Returns:
A fully-loaded Image.

getLabelImageDiameter

int getLabelImageDiameter()
Returns the diameter of the label images at normal magnification.


getLabelImage

Image getLabelImage(Classification classification,
                    double diameter,
                    float selectionLevel)
Returns the Image used in the label of the Classification. This icon will be shown in the graph to the left of the Classification name.

Unlike the graph node image, the label image is always displayed by the Cluster Map, as it may contain vital semantics of the Classification that is necessary to correctly interpret the graph.

This Image may be null.

Parameters:
classification - The Classification for which a representative Image should be returned.
diameter - The diameter the image should have, encoded as a double to enable continuous scaling.
selectionLevel - A number indicating the level to which the Classification is considered to be selected. This is a number between 0 and 1.
Returns:
A fully-loaded Image.


Copyright © 1997-2008 Aduna. All Rights Reserved.