gdl.config
Class ConnectionTypeSet
java.lang.Object
gdl.config.ConnectionTypeSet
public class ConnectionTypeSet extends java.lang.Object
A ConnectionTypesSet is a data structure that holds all available types of connections
as a list of connectionNames (the names that are used as the attribute value of
tags. Furthermore a description text for every
connection type is stored (specified on the configuration part of the source xml) -
these descriptions get displayed in the legend panel.
Author:
Martin Suntinger
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ConnectionTypeSet
public ConnectionTypeSet ()
addEntry
public void addEntry (java.lang.String connectionName,
java.lang.String displayName)
adds a new connection type to the set of connection types
Parameters: connectionName
- the name of the connection, which is also the attribute value in XML connection tagsdisplayName
- the displayname, or description of the connection, displayed in the legend canvas
getConnectionDisplayName
public java.lang.String getConnectionDisplayName (int index)
Parameters: index
- the index of the connection in the connection set you want to obtain the display name for
Returns: the display name of the specified connection as a String
getConnectionName
public java.lang.String getConnectionName (int index)
Parameters: index
- the index of the connection in the connection set you want to obtain the connection name for
Returns: the connection name of the specified connection as a String
getIndexOfType
public int getIndexOfType (java.lang.String type)
Parameters: type
- the connection name as a String you want to know the index within the connection type set
Returns: the index of the specified connection name within the connection type set
getSize
public int getSize ()
Returns: the amount of available connection types in the set