com.jbbres.lib.actions.tools.categories
Class SimpleCategory

java.lang.Object
  extended by com.jbbres.lib.actions.tools.categories.SimpleCategory
All Implemented Interfaces:
Category, java.lang.Comparable<Category>
Direct Known Subclasses:
CalendarCategory, ContactsCategory, DeveloperCategory, DocumentsCategory, EmailCategory, FilesCategory, ImagesCategory, InternetCategory, JavaCategory, MusicCategory, OtherCategory, TextCategory, VideosCategory

public class SimpleCategory
extends java.lang.Object
implements Category

Provides a basic implementations for the Category interface.

Since:
1.0.0
Version:
1.0.0
Author:
Jean-Baptiste Bres

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jbbres.lib.actions.elements.Category
Category.SearchField
 
Constructor Summary
SimpleCategory(java.lang.String categoryName)
          Creates a new Category, with the given name and the default category icon.
SimpleCategory(java.lang.String categoryName, javax.swing.ImageIcon categoryIcon)
          Creates a new Category, with the given name and icon.
SimpleCategory(java.lang.String categoryName, java.lang.String categoryDescription, javax.swing.ImageIcon categoryIcon)
          Creates a new Category, with the given name, description and icon.
 
Method Summary
 int compareTo(Category c)
           
 boolean equals(java.lang.Object c)
           
 java.lang.String getDescription()
          Returns the description of the category.
 javax.swing.ImageIcon getIcon()
          Returns the icon representing the category.
 java.lang.String getID()
          Returns the unique ID of the category.
 java.lang.String getName()
          Returns the name of the category.
 void setDescription(java.lang.String categoryDescription)
          Sets the description of the category.
 void setIcon(javax.swing.ImageIcon categoryIcon)
          Sets the icon representing the category.
 void setID(java.lang.String id)
          Sets the iD.
 void setName(java.lang.String categoryName)
          Sets the name of the category.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCategory

public SimpleCategory(java.lang.String categoryName)
Creates a new Category, with the given name and the default category icon.

Parameters:
categoryName - - name of the category

SimpleCategory

public SimpleCategory(java.lang.String categoryName,
                      javax.swing.ImageIcon categoryIcon)
Creates a new Category, with the given name and icon.

Parameters:
categoryName - - name of the category
categoryIcon - - icon representing the category

SimpleCategory

public SimpleCategory(java.lang.String categoryName,
                      java.lang.String categoryDescription,
                      javax.swing.ImageIcon categoryIcon)
Creates a new Category, with the given name, description and icon.

Parameters:
categoryName - - name of the category
categoryDescription - - description of the category
categoryIcon - - icon representing the category
Method Detail

setDescription

public void setDescription(java.lang.String categoryDescription)
Sets the description of the category.

Parameters:
categoryDescription - - description of the category

getDescription

public java.lang.String getDescription()
Description copied from interface: Category
Returns the description of the category.

This method not used by Action(s) yet.

Specified by:
getDescription in interface Category
Returns:
the description of the category.

setIcon

public void setIcon(javax.swing.ImageIcon categoryIcon)
Sets the icon representing the category.

Parameters:
categoryIcon - - icon representing the category

getIcon

public javax.swing.ImageIcon getIcon()
Description copied from interface: Category
Returns the icon representing the category.

Specified by:
getIcon in interface Category
Returns:
the icon representing the category.

setName

public void setName(java.lang.String categoryName)
Sets the name of the category.

Parameters:
categoryName - - name of the category

getName

public java.lang.String getName()
Description copied from interface: Category
Returns the name of the category.

Specified by:
getName in interface Category
Returns:
the name of the category

getID

public java.lang.String getID()
Description copied from interface: Category
Returns the unique ID of the category.

An action can define that it is member of a category by stating #id in its list of categories.

Specified by:
getID in interface Category
Returns:
the unique ID of the category

setID

public void setID(java.lang.String id)
Sets the iD.

Parameters:
id - the new iD

equals

public boolean equals(java.lang.Object c)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Category c)
Specified by:
compareTo in interface java.lang.Comparable<Category>


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.