public class TraceColorRepository extends AbstractRepository
Modifier and Type | Class and Description |
---|---|
static class |
TraceColorRepository.TraceColorRepositoryData
This class groups the data required for a
TraceColorRepository . |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_PROPERTY_NAME_TRACE_COLOR_FILE_NAME
Name of the configuration property that contains the file name of the trace color file.
|
CONFIG_NAME, configuration, log, LOG, projectContext, recordsTimeUnitFromProjectContext
Constructor and Description |
---|
TraceColorRepository(Configuration configuration,
IProjectContext projectContext)
Creates a new description repository using the given configuration.
|
TraceColorRepository(Configuration configuration,
TraceColorRepository.TraceColorRepositoryData colorData,
IProjectContext projectContext)
Creates a new color repository with the given data.
|
Modifier and Type | Method and Description |
---|---|
static TraceColorRepository |
createFromFile(java.lang.String fileName,
IProjectContext projectContext)
Initializes a trace color repository from a given file.
|
Color |
getCollisionColor()
Returns the color to use for elements for which no unique color can be determined.
|
java.util.Map<java.lang.Long,Color> |
getColorMap()
Returns the color map stored in this repository.
|
Configuration |
getCurrentConfiguration()
This method should deliver a
Configuration object containing the current configuration of this instance. |
Color |
getDefaultColor()
Returns the color to use for elements which are not defined in the color map.
|
getDefaultConfiguration, getRepositoryDescription, getRepositoryName
getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public static final java.lang.String CONFIG_PROPERTY_NAME_TRACE_COLOR_FILE_NAME
public TraceColorRepository(Configuration configuration, IProjectContext projectContext) throws java.io.IOException
configuration
- The configuration to useprojectContext
- The project context for this plugin.java.io.IOException
- If an I/O error occurs during initializationpublic TraceColorRepository(Configuration configuration, TraceColorRepository.TraceColorRepositoryData colorData, IProjectContext projectContext)
configuration
- The configuration to usecolorData
- The color data to use for this repositoryprojectContext
- The project context to use for this repository.public Configuration getCurrentConfiguration()
Configuration
object containing the current configuration of this instance. In other words: The constructor should be
able to use the given object to initialize a new instance of this class with the same intern properties.getCurrentConfiguration
in interface IAnalysisComponent
getCurrentConfiguration
in class AbstractAnalysisComponent
public java.util.Map<java.lang.Long,Color> getColorMap()
public Color getDefaultColor()
public Color getCollisionColor()
public static TraceColorRepository createFromFile(java.lang.String fileName, IProjectContext projectContext) throws java.io.IOException
fileName
- The name of the file to read fromprojectContext
- The project context to use.java.io.IOException
- If an I/O error occursCopyright 2017 Kieker Project, http://kieker-monitoring.net