org.jbudget.gui.month
Class DatesInfoTable.Colors

java.lang.Object
  extended by org.jbudget.util.ActionSignaler
      extended by org.jbudget.gui.month.DatesInfoTable.Colors
Enclosing class:
DatesInfoTable

public static class DatesInfoTable.Colors
extends ActionSignaler

Class that stores colors associated with a particular Account or expense category.


Field Summary
private  java.util.Map<Pair<java.lang.String,java.lang.Integer>,java.awt.Color> accountColors
           
private  java.util.Map<Pair<java.lang.String,java.lang.Integer>,java.awt.Color> categoryColors
           
 
Constructor Summary
DatesInfoTable.Colors()
           
 
Method Summary
 java.awt.Color getColor(org.jbudget.Core.Account account)
          Returns a color associated with a particular Account or null if there is no color associated with the account.
 java.awt.Color getColor(org.jbudget.Core.ExpenseCategory category)
          Returns a color associated with a particular ExpenseCategory or null if there is no color associated with the expense category.
 java.awt.Color getColor(java.lang.Object o)
           
static DatesInfoTable.Colors getInstance(Element element)
           
 Element getXmlelement()
          Returns a JDOMElement describing this object.
 void setColor(org.jbudget.Core.Account account, java.awt.Color color)
          Changes the color associated with a particular account.
 void setColor(org.jbudget.Core.ExpenseCategory category, java.awt.Color color)
          Changes the color associated with a particular expense category.
 void setColor(java.lang.Object o, java.awt.Color color)
           
 
Methods inherited from class org.jbudget.util.ActionSignaler
addActionListener, removeActionListener, signal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accountColors

private final java.util.Map<Pair<java.lang.String,java.lang.Integer>,java.awt.Color> accountColors

categoryColors

private final java.util.Map<Pair<java.lang.String,java.lang.Integer>,java.awt.Color> categoryColors
Constructor Detail

DatesInfoTable.Colors

public DatesInfoTable.Colors()
Method Detail

getColor

public java.awt.Color getColor(java.lang.Object o)

setColor

public void setColor(java.lang.Object o,
                     java.awt.Color color)

getColor

public java.awt.Color getColor(org.jbudget.Core.Account account)
Returns a color associated with a particular Account or null if there is no color associated with the account.


setColor

public void setColor(org.jbudget.Core.Account account,
                     java.awt.Color color)
Changes the color associated with a particular account. Notifies all listeners that the color was changed.


getColor

public java.awt.Color getColor(org.jbudget.Core.ExpenseCategory category)
Returns a color associated with a particular ExpenseCategory or null if there is no color associated with the expense category.


setColor

public void setColor(org.jbudget.Core.ExpenseCategory category,
                     java.awt.Color color)
Changes the color associated with a particular expense category. Notifies all listeners that the color was changed.


getXmlelement

public Element getXmlelement()
Returns a JDOMElement describing this object.


getInstance

public static DatesInfoTable.Colors getInstance(Element element)
                                         throws JDOMException
Throws:
JDOMException