|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.tools.videolabeler.FeeltraceColourMap
public class FeeltraceColourMap
A Feeltrace colour map maps emotions to colours. It contains various methods to facilitate processes where emotion colours are involved.
The hue of an emotion colour is determined by the clockwise angle between the line through the origin and (-1,0) and the line through the origin and the emotion point. The colours vary from red (angle 0) to yellow (angle 0.5*PI) to green (angle PI) to blue (angle 1.5*PI) to red again (angle 2*PI).
The saturation of an emotion colour is determined by the distance of the emotion point from the origin (saturation 0 for distance 0, saturation 1 for distance 1).
Constructor Summary | |
---|---|
FeeltraceColourMap()
Constructs a new Feeltrace colour map. |
Method Summary | |
---|---|
java.awt.Color |
getEmotionColour(double evaluation,
double activation)
Returns the colour for the specified emotion. |
double |
getEmotionHue(double evaluation,
double activation)
Returns the hue for the specified emotion. |
java.util.HashMap |
getStyleMap()
Returns a style map that can be added to a text area to display text in the colour of an emotion. |
java.lang.String |
getStyleName(double evaluation,
double activation)
Returns the style name for the specified emotion. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeeltraceColourMap()
Constructs a new Feeltrace colour map.
Method Detail |
---|
public java.util.HashMap getStyleMap()
Returns a style map that can be added to a text area to display text
in the colour of an emotion. The
ColourFactory
is used
to get text colours that contrast with a white background. Call
getStyleName()
to get the style
name for a certain emotion colour.
public java.lang.String getStyleName(double evaluation, double activation)
Returns the style name for the specified emotion. The returned
name is one of the names in the style map (see getStyleMap()
. If evaluation and activation are 0 (no angle can be
determined), this method returns an empty string.
evaluation
- the evaluation of the emotionactivation
- the activation of the emotion
public double getEmotionHue(double evaluation, double activation)
Returns the hue for the specified emotion. If evaluation and
activation are 0 (no angle can be determined), this method returns
Double.NaN
.
evaluation
- the evaluation of the emotionactivation
- the activation of the emotion
Double.NaN
public java.awt.Color getEmotionColour(double evaluation, double activation)
Returns the colour for the specified emotion.
evaluation
- the evaluation of the emotionactivation
- the activation of the emotion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |