net.sf.borg.model
Class Theme

java.lang.Object
  extended by net.sf.borg.model.Theme

public class Theme
extends Object

Each Theme instance holds the values for the user tunable UI colors The Theme class also manages the persistence of Themes in the database and keeps a cache of Theme objects Themes are persisted as options in the OPTIONS table


Constructor Summary
Theme()
           
 
Method Summary
 boolean canEqual(Object other)
           
static void delete(String name)
          delete a theme by name
 boolean equals(Object o)
           
 int getBirthdayTextColor()
           
static Theme getCurrentTheme()
          return the active Theme
 int getDefaultBg()
           
 int getDefaultFg()
           
 int getHalfdayBg()
           
 int getHolidayBg()
           
 int getHolidayTextColor()
           
 String getName()
           
 int getStripeBg()
           
 int getTaskTextColor()
           
 int getTextColor1()
           
 int getTextColor2()
           
 int getTextColor3()
           
 int getTextColor4()
           
 int getTextColor5()
           
static Theme getTheme(String name)
          find a Theme by name
static Collection<String> getThemeNames()
          return a list of the persisted theme names
 int getTodayBg()
           
 int getTrayIconBg()
           
 int getTrayIconFg()
           
 int getVacationBg()
           
 int getWeekdayBg()
           
 int getWeekendBg()
           
 int hashCode()
           
 void save()
          save the current theme in the database
 void setBirthdayTextColor(int birthdayTextColor)
           
static void setCurrentTheme(Theme t)
          Set a theme to be the active theme
 void setDefaultBg(int defaultBg)
           
 void setDefaultFg(int defaultFg)
           
 void setHalfdayBg(int halfdayBg)
           
 void setHolidayBg(int holidayBg)
           
 void setHolidayTextColor(int holidayTextColor)
           
 void setName(String name)
           
 void setStripeBg(int stripeBg)
           
 void setTaskTextColor(int taskTextColor)
           
 void setTextColor1(int textColor1)
           
 void setTextColor2(int textColor2)
           
 void setTextColor3(int textColor3)
           
 void setTextColor4(int textColor4)
           
 void setTextColor5(int textColor5)
           
 void setTodayBg(int todayBg)
           
 void setTrayIconBg(int trayIconBg)
           
 void setTrayIconFg(int trayIconFg)
           
 void setVacationBg(int vacationBg)
           
 void setWeekdayBg(int weekdayBg)
           
 void setWeekendBg(int weekendBg)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Theme

public Theme()
Method Detail

delete

public static void delete(String name)
                   throws Exception
delete a theme by name

Parameters:
name - the Theme name
Throws:
Exception

getCurrentTheme

public static final Theme getCurrentTheme()
return the active Theme


getTheme

public static final Theme getTheme(String name)
find a Theme by name

Parameters:
name - the Theme name
Returns:
the Theme or null

getThemeNames

public static Collection<String> getThemeNames()
return a list of the persisted theme names


setCurrentTheme

public static void setCurrentTheme(Theme t)
                            throws Warning,
                                   Exception
Set a theme to be the active theme

Parameters:
t - the Theme
Throws:
Warning
Exception

save

public void save()
          throws Exception
save the current theme in the database

Throws:
Warning
Exception

getBirthdayTextColor

public int getBirthdayTextColor()

getDefaultBg

public int getDefaultBg()

getDefaultFg

public int getDefaultFg()

getHalfdayBg

public int getHalfdayBg()

getHolidayBg

public int getHolidayBg()

getHolidayTextColor

public int getHolidayTextColor()

getName

public String getName()

getStripeBg

public int getStripeBg()

getTaskTextColor

public int getTaskTextColor()

getTextColor1

public int getTextColor1()

getTextColor2

public int getTextColor2()

getTextColor3

public int getTextColor3()

getTextColor4

public int getTextColor4()

getTextColor5

public int getTextColor5()

getTodayBg

public int getTodayBg()

getVacationBg

public int getVacationBg()

getWeekdayBg

public int getWeekdayBg()

getWeekendBg

public int getWeekendBg()

getTrayIconBg

public int getTrayIconBg()

getTrayIconFg

public int getTrayIconFg()

setBirthdayTextColor

public void setBirthdayTextColor(int birthdayTextColor)

setDefaultBg

public void setDefaultBg(int defaultBg)

setDefaultFg

public void setDefaultFg(int defaultFg)

setHalfdayBg

public void setHalfdayBg(int halfdayBg)

setHolidayBg

public void setHolidayBg(int holidayBg)

setHolidayTextColor

public void setHolidayTextColor(int holidayTextColor)

setName

public void setName(String name)

setStripeBg

public void setStripeBg(int stripeBg)

setTaskTextColor

public void setTaskTextColor(int taskTextColor)

setTextColor1

public void setTextColor1(int textColor1)

setTextColor2

public void setTextColor2(int textColor2)

setTextColor3

public void setTextColor3(int textColor3)

setTextColor4

public void setTextColor4(int textColor4)

setTextColor5

public void setTextColor5(int textColor5)

setTodayBg

public void setTodayBg(int todayBg)

setVacationBg

public void setVacationBg(int vacationBg)

setWeekdayBg

public void setWeekdayBg(int weekdayBg)

setWeekendBg

public void setWeekendBg(int weekendBg)

setTrayIconBg

public void setTrayIconBg(int trayIconBg)

setTrayIconFg

public void setTrayIconFg(int trayIconFg)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

canEqual

public boolean canEqual(Object other)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Generated December 30 2011 by mbb using Apache Ant(TM) version 1.8.2 compiled on December 20 2010 and Java version 1.6.0_30 from Sun Microsystems Inc. on Linux i386 3.0.0-14-generic-pae