Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID Class Reference

Inherits Serializable.

List of all members.

Public Member Functions

int getCurrent ()
int getFavorite ()

Static Public Member Functions

static boolean isValid (int colorID)

Static Public Attributes

static final int UNKNOWN = -1

Package Functions

 UserColorID ()
 UserColorID (int current, int favorite)
void setCurrent (int colorID)
void setFavorite (int colorID)

Detailed Description

Holder class for a current and favorite color id.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.UserColorID ( ) [package]

Constructs a newly allocated UserColorID object with current and favorite color id set to UNKNOWN.

de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.UserColorID ( int  current,
int  favorite 
) [package]

Constructs a newly allocated UserColorID object with current and favorite color id set to the given values.

Parameters:
currentthe value to use for the current color id
favoritethe value to use for the favorite color id

Member Function Documentation

int de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.getCurrent ( )

Returns the current color id.

Returns:
the current color id
int de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.getFavorite ( )

Returns the favorite color id.

Returns:
the favorite color id
static boolean de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.isValid ( int  colorID) [static]

Checks if the given color id is valid. A negative color id will never be valid.

Parameters:
colorIDthe color id to check
Returns:
true if the color id is valid, false otherwise
void de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.setCurrent ( int  colorID) [package]

Sets the current color id

Parameters:
colorIDthe new color id to set
void de.fu_berlin.inf.dpp.editor.colorstorage.UserColorID.setFavorite ( int  colorID) [package]

Sets the favorite color id

Parameters:
colorIDthe new favorite color id to set

Member Data Documentation

A constant for presenting an unknown and invalid color id

 All Classes Namespaces Files Functions Variables Enumerations