|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.clustermap.ClusterMap
public class ClusterMap
A ClusterMap generates a cluster map visualisation of a ClusterModel.
The visual properties of a ClusterMap can be configured through a key-(subject-)value-based mechanism. See the ClusterMapConstants interface for a list of possible keys and some values. Their use is described in detail in the documentation provided with the Cluster Map library.
Changes to the ClusterMap can be observed through the ClusterMapListener interface.
| Constructor Summary | |
|---|---|
ClusterMap()
Create a new ClusterMap, initially showing an empty ClusterModel. |
|
| Method Summary | |
|---|---|
void |
addClusterMapListener(ClusterMapListener listener)
Add a ClusterMapListener to this ClusterMap, which is notified about various changes to this ClusterMap. |
void |
applyProperties()
Applies the properties that have been set on this ClusterMap since the last invocation of this method. |
void |
exportImageMap(Writer writer,
boolean fullHtmlDocument,
String mapName,
String title,
String imageFileName)
Exports the clickable regions of the current contents of the ClusterMap as an HTML image map to the specified Writer. |
void |
exportImageMap(Writer writer,
Properties properties)
Exports the clickable regions of the current contents of the ClusterMap as an HTML image map to the specified Writer. |
void |
exportPngImage(File file)
Exports the visual graph in PNG format to the specified File. |
void |
exportPngImage(OutputStream stream)
Exports the current contents of the ClusterMap to the specified stream as a PNG image. |
void |
exportXmlImageMap(Writer writer)
Exports the clickable regions of the current contents of the ClusterMap as a XML image map to the specified Writer, very similar to a HTML image map. |
void |
firePropertyChanged(String property,
Object subject)
Sends a "property changed" event with 'this' as argument to all ClusterMapListeners. |
ClusterModel |
getClusterModel()
Returns the current ClusterModel. |
Graph |
getGraph()
|
LayoutManager |
getLayoutManager()
|
Object |
getProperty(String key,
Object subject)
Returns the value of the property indicated by the specified key and optionally the specified subject. |
Object |
getPropertyDefault(String key,
Object subject)
Returns the default value of the property indicated by the specified key and optionally the specified subject. |
RenderingProperties |
getRenderingProperties()
|
Collection<?> |
getSelection()
Returns the set of currently selected objects. |
String |
getVersion()
Returns a String representation of the version of the library. |
void |
removeClusterMapListener(ClusterMapListener listener)
Remove a ClusterMapListener from this ClusterMap. |
void |
selectRenderers(Collection<VertexRenderer> renderers)
Utility method that allows for specifying selections at the graph level. |
void |
setClusterModel(ClusterModel clusterModel)
Sets the ClusterModel that should be visualised by this ClusterMap. |
void |
setContent(ClusterModel clusterModel,
Graph graph)
Sets the content (the ClusterModel and the Graph) at once. |
void |
setProperty(String key,
Object subject,
Object value)
Sets the property indicated by the specified key and optionally the specified subject to the specified value. |
void |
setSelection(Collection<?> objects)
Let the specified set of objects appear to be selected. |
void |
updateGraph()
Updates the contents of the ClusterMap so that it visualises the current ClusterModel. |
void |
updateLayout()
Invokes the LayoutManager and updates the rendering coordinates. |
void |
updateRenderer()
Updates the GraphRenderer and sends an event to all ClusterMapListeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterMap()
| Method Detail |
|---|
public void setClusterModel(ClusterModel clusterModel)
throws IllegalArgumentException
model - The ClusterModel that will be visualised in this ClusterMap.
IllegalArgumentException - when the specified model is 'null'.updateGraph()public ClusterModel getClusterModel()
public Graph getGraph()
public LayoutManager getLayoutManager()
public RenderingProperties getRenderingProperties()
public void updateGraph()
setClusterModel(info.aduna.clustermap.ClusterModel)public void updateLayout()
public void updateRenderer()
public void setSelection(Collection<?> objects)
public void selectRenderers(Collection<VertexRenderer> renderers)
public Collection<?> getSelection()
public void setContent(ClusterModel clusterModel,
Graph graph)
public void setProperty(String key,
Object subject,
Object value)
throws IllegalArgumentException
The specified settings will be parsed immediately but will only become effective when the applyProperties method is invoked. This strategy allows efficient updates of several properties at once.
IllegalArgumentException - when the key or subject is unknown or when the value is illegal.ClusterMapConstants
public Object getProperty(String key,
Object subject)
throws IllegalArgumentException
IllegalArgumentException - in case of unknown keys or subjects.
public Object getPropertyDefault(String key,
Object subject)
throws IllegalArgumentException
IllegalArgumentException - in case of unknown keys or subjects.public void applyProperties()
public String getVersion()
public void addClusterMapListener(ClusterMapListener listener)
public void removeClusterMapListener(ClusterMapListener listener)
public void firePropertyChanged(String property,
Object subject)
public void exportPngImage(File file)
throws IOException
file - The File to which the PNG image will be saved.
IOException - if an I/O error occurs.
public void exportPngImage(OutputStream stream)
throws IOException
stream - The OutputStream to which the PNG image will be send.
IOException - if an I/O error occurs.
public void exportImageMap(Writer writer,
Properties properties)
throws IOException
Various properties of the desired output can be indicated to the ClusterMap through the specified Properties instance. See the documentation provided with the Cluster Map library for possible keys and values.
writer - The Writer to which the HTML (fragment) will be written.properties - A Properties instance containing key-value pairs that indicate
desired characteristics of the HTML source. See class
documentation for allowed keys and values. This property may be
null, indicating that all default properties are used. Unknown
keys or values in this Properties are ignored.
IOException - If an I/O error occurs.
public void exportImageMap(Writer writer,
boolean fullHtmlDocument,
String mapName,
String title,
String imageFileName)
Various properties of the desired output can be indicated to the ClusterMap through the specified Properties instance. See the documentation provided with the Cluster Map library for possible keys and values.
writer - The Writer to which the HTML (fragment) will be written.fullHtmlDocument - Indicates whether a complete HTML document needs to be generated
or only the MAP element.mapName - The name used for the MAP element.title - The title of the HTML document, if a full document is to be
generated.imageFileName - The name of the referred image, if a full document is to be
generated.
IOException - If an I/O error occurs.
public void exportXmlImageMap(Writer writer)
throws IOException
IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||