synesketch.art.util
Class SynesketchPalette

java.lang.Object
  extended by synesketch.art.util.SynesketchPalette

public class SynesketchPalette
extends java.lang.Object

Representation of a six-part color palette used for Synesketch sketches. Each part of the palette represents colors -- defined by it's coded hex number -- used for visualization of a specific emotion by Ekman: happiness, sadness, anger, fear, disgust, and surprise.

Palettes are property documents written in XML. Synesketch provides one standard palette (data/palette/standard.xml), based on some phycology & visual design theories, but everyone can write it's own palette by writing one's own XML document similar to data/palette/standard.xml.

Version:
1.0
Author:
Uros Krcadinac email: uros@krcadinac.com

Constructor Summary
SynesketchPalette(java.lang.String paletteName)
          Class contructor which sets six palettes -- one for each emotion type, happiness, sadness, anger, fear, disgust, and surprise -- by taking data from a XML file defined by palette's name.
 
Method Summary
 int[] getAngerColors()
          Getter for the palette for the emotion of anger.
 int[] getDisgustColors()
          Getter for the palette for the emotion of disgust.
 int[] getFearColors()
          Getter for the palette for the emotion of fear.
 int[] getHappinessColors()
          Getter for the palette for the emotion of happiness.
 int getRandomAngerColor()
          Returns a random color from the anger palette.
 int getRandomDisgustColor()
          Returns a random color from the disgust palette.
 int getRandomFearColor()
          Returns a random color from the fear palette.
 int getRandomHappinessColor()
          Returns a random color from the hapiness palette.
 int getRandomSadnessColor()
          Returns a random color from the sadness palette.
 int getRandomSurpriseColor()
          Returns a random color from the surprise palette.
 int[] getSadnessColors()
          Getter for the palette for the emotion of sadness.
 int[] getSurpriseColors()
          Getter for the palette for the emotion of surprise
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynesketchPalette

public SynesketchPalette(java.lang.String paletteName)
Class contructor which sets six palettes -- one for each emotion type, happiness, sadness, anger, fear, disgust, and surprise -- by taking data from a XML file defined by palette's name.

Parameters:
paletteName - String name of the six-part palette -- XML file with the color codes for each emotion type
Method Detail

getAngerColors

public int[] getAngerColors()
Getter for the palette for the emotion of anger.

Returns:
array of integers representing the palette for the emotion of anger

getDisgustColors

public int[] getDisgustColors()
Getter for the palette for the emotion of disgust.

Returns:
array of integers representing the palette for the emotion of disgust

getFearColors

public int[] getFearColors()
Getter for the palette for the emotion of fear.

Returns:
array of integers representing the palette for the emotion of fear

getHappinessColors

public int[] getHappinessColors()
Getter for the palette for the emotion of happiness.

Returns:
array of integers representing the palette for the emotion of happiness

getSadnessColors

public int[] getSadnessColors()
Getter for the palette for the emotion of sadness.

Returns:
array of integers representing the palette for the emotion of sadness

getSurpriseColors

public int[] getSurpriseColors()
Getter for the palette for the emotion of surprise

Returns:
array of integers representing the palette for the emotion of surprise.

getRandomHappinessColor

public int getRandomHappinessColor()
Returns a random color from the hapiness palette.

Returns:
integer which represents the color

getRandomSadnessColor

public int getRandomSadnessColor()
Returns a random color from the sadness palette.

Returns:
integer which represents the color

getRandomAngerColor

public int getRandomAngerColor()
Returns a random color from the anger palette.

Returns:
integer which represents the color

getRandomFearColor

public int getRandomFearColor()
Returns a random color from the fear palette.

Returns:
integer which represents the color

getRandomDisgustColor

public int getRandomDisgustColor()
Returns a random color from the disgust palette.

Returns:
integer which represents the color

getRandomSurpriseColor

public int getRandomSurpriseColor()
Returns a random color from the surprise palette.

Returns:
integer which represents the color