net.ctdp.rfdynhud.widgets.base.widget
Class WidgetPackage

java.lang.Object
  extended by net.ctdp.rfdynhud.widgets.base.widget.WidgetPackage
All Implemented Interfaces:
java.lang.Comparable<WidgetPackage>

public class WidgetPackage
extends java.lang.Object
implements java.lang.Comparable<WidgetPackage>

The WidgetPackage class encapsulates properties for a Widget's virtual package.

Author:
Marvin Froehlich (CTDP)

Field Summary
static java.net.URL CTDP_ICON
           
static java.net.URL EXTRA_ICON
           
 
Constructor Summary
WidgetPackage(WidgetSet widgetSet, java.lang.String name)
          Creates a new WidgetPackage instance.
WidgetPackage(WidgetSet widgetSet, java.lang.String name, java.io.File... iconFiles)
          Creates a new WidgetPackage instance.
WidgetPackage(WidgetSet widgetSet, java.lang.String name, java.net.URL... iconURLs)
          Creates a new WidgetPackage instance.
 
Method Summary
 int compareTo(WidgetPackage o)
           
 boolean equals(java.lang.Object o)
          
 javax.swing.Icon[] getIcons()
          Gets the package's icons to be displayed in the editor.
 java.lang.String getName()
          Gets the package's name.
 WidgetSet getWidgetSet()
          Gets the WidgetSet this WidgetPackage belongs to.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CTDP_ICON

public static final java.net.URL CTDP_ICON

EXTRA_ICON

public static final java.net.URL EXTRA_ICON
Constructor Detail

WidgetPackage

public WidgetPackage(WidgetSet widgetSet,
                     java.lang.String name,
                     java.net.URL... iconURLs)
Creates a new WidgetPackage instance.

Parameters:
widgetSet - the WidgetSet this package belongs to
name - the package name. This can be null or an empty string to denote the root of the menu or a slash separated path.
iconURLs - URLs to icons for the editor

WidgetPackage

public WidgetPackage(WidgetSet widgetSet,
                     java.lang.String name,
                     java.io.File... iconFiles)
Creates a new WidgetPackage instance.

Parameters:
widgetSet - the WidgetSet this package belongs to
name - the package name. This can be null or an empty string to denote the root of the menu or a slash separated path.
iconFiles - files for icons for the editor

WidgetPackage

public WidgetPackage(WidgetSet widgetSet,
                     java.lang.String name)
Creates a new WidgetPackage instance.

Parameters:
widgetSet - the WidgetSet this package belongs to
name - the package name. This can be null or an empty string to denote the root of the menu or a slash separated path.
Method Detail

getWidgetSet

public final WidgetSet getWidgetSet()
Gets the WidgetSet this WidgetPackage belongs to.

Returns:
the WidgetSet this WidgetPackage belongs to.

getName

public final java.lang.String getName()
Gets the package's name.

Returns:
the package's name.

getIcons

public final javax.swing.Icon[] getIcons()
Gets the package's icons to be displayed in the editor.

Returns:
the package's icon for the editor or null.

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

compareTo

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

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object