org.netbeans.modules.j2ee.dd/1 1.13.0 2

org.netbeans.modules.j2ee.dd.api.common
Interface IconInterface

All Known Subinterfaces:
AppClient, Application, ComponentInterface, Ejb, EjbJar, Entity, EntityAndSession, Filter, JspPropertyGroup, Listener, MessageDestination, MessageDriven, RootInterface, ServiceRef, ServiceRefHandler, Servlet, Session, WebApp

public interface IconInterface

Super interface for all DD elements having the icon property/properties.

Important note: Do not provide an implementation of this interface unless you are a DD API provider!


Method Summary
 Map getAllIcons()
          Returns all icon elements in the form of <@link java.util.Map>.
 Icon getDefaultIcon()
          Returns the icon element value for default locale.
 String getLargeIcon()
          Returns the large-icon element value for default locale.
 String getLargeIcon(String locale)
          Returns the large-icon element value for particular locale.
If locale=null method returns large-icon for default locale.
 String getSmallIcon()
          Returns the small-icon element value for default locale.
 String getSmallIcon(String locale)
          Returns the small-icon element value for particular locale.
If locale=null method returns small-icon for default locale.
 void removeAllIcons()
          Removes all icon elements from DD element.
 void removeIcon()
          Removes icon element for default locale.
 void removeIcon(String locale)
          Removes the icon element for particular locale.
 void removeLargeIcon()
          Removes large-icon element for default locale.
 void removeLargeIcon(String locale)
          Removes the large-icon element for particular locale.
 void removeSmallIcon()
          Removes small-icon element for default locale.
 void removeSmallIcon(String locale)
          Removes the small-icon element for particular locale.
 void setAllIcons(String[] locales, String[] smallIcons, String[] largeIcons)
          Sets the multiple icon elements.
 void setIcon(Icon icon)
          Sets the icon element.
 void setLargeIcon(String icon)
          Sets the large-icon element value for icon element where xml:lang attribute is not specified.
 void setLargeIcon(String locale, String icon)
          Sets the large-icon element value for particular locale.
If locale=null the method sets the large-icon value for icon element where xml:lang attribute is not specified.
If icon=null method removes the large-icon element for a specified locale.
 void setSmallIcon(String icon)
          Sets the small-icon element value for icon element where xml:lang attribute is not specified.
 void setSmallIcon(String locale, String icon)
          Sets the small-icon element value for particular locale.
If locale=null the method sets the small-icon value for icon element where xml:lang attribute is not specified.
If icon=null method removes the small-icon element for a specified locale.
 

Method Detail

setSmallIcon

void setSmallIcon(String locale,
                  String icon)
                  throws VersionNotSupportedException
Sets the small-icon element value for particular locale.
If locale=null the method sets the small-icon value for icon element where xml:lang attribute is not specified.
If icon=null method removes the small-icon element for a specified locale.

Parameters:
locale - string representing the locale - the value for xml:lang attribute e.g. "fr"
icon - value for small-icon element
Throws:
VersionNotSupportedException

setSmallIcon

void setSmallIcon(String icon)
Sets the small-icon element value for icon element where xml:lang attribute is not specified.

Parameters:
icon - value for small-icon element

setLargeIcon

void setLargeIcon(String locale,
                  String icon)
                  throws VersionNotSupportedException
Sets the large-icon element value for particular locale.
If locale=null the method sets the large-icon value for icon element where xml:lang attribute is not specified.
If icon=null method removes the large-icon element for a specified locale.

Parameters:
locale - string representing the locale - the value for xml:lang attribute e.g. "fr"
icon - value for large-icon element
Throws:
VersionNotSupportedException

setLargeIcon

void setLargeIcon(String icon)
Sets the large-icon element value for icon element where xml:lang attribute is not specified.

Parameters:
icon - value for large-icon element

setAllIcons

void setAllIcons(String[] locales,
                 String[] smallIcons,
                 String[] largeIcons)
                 throws VersionNotSupportedException
Sets the multiple icon elements.

Parameters:
locales - array of locales (xml:lang attribute values for icon elements)
smallIcons - array of values for small-icon elements
largeIcons - array of values for large-icon elements
Throws:
VersionNotSupportedException

setIcon

void setIcon(Icon icon)
Sets the icon element. Looking for icon element with the same xml:lang attribute.
If found the element will be replaced by new icon value.

Parameters:
icon - value for icon element

getSmallIcon

String getSmallIcon(String locale)
                    throws VersionNotSupportedException
Returns the small-icon element value for particular locale.
If locale=null method returns small-icon for default locale.

Parameters:
locale - string representing the locale - the value of xml:lang attribute e.g. "fr".
Returns:
small-icon element value or null if not specified for given locale
Throws:
VersionNotSupportedException

getSmallIcon

String getSmallIcon()
Returns the small-icon element value for default locale.

Returns:
small-icon element value or null if not specified for default locale

getLargeIcon

String getLargeIcon(String locale)
                    throws VersionNotSupportedException
Returns the large-icon element value for particular locale.
If locale=null method returns large-icon for default locale.

Parameters:
locale - string representing the locale - the value of xml:lang attribute e.g. "fr".
Returns:
large-icon element value or null if not specified for given locale
Throws:
VersionNotSupportedException

getLargeIcon

String getLargeIcon()
Returns the large-icon element value for default locale.

Returns:
large-icon element value or null if not specified for default locale

getDefaultIcon

Icon getDefaultIcon()
Returns the icon element value for default locale.

Returns:
icon element value or null if not specified for default locale

getAllIcons

Map getAllIcons()
Returns all icon elements in the form of <@link java.util.Map>.

Returns:
map of all icons in the form of [locale:String[]{smallIcon, largeIcon}]

removeSmallIcon

void removeSmallIcon(String locale)
                     throws VersionNotSupportedException
Removes the small-icon element for particular locale. If locale=null the method removes the small-icon element for default locale.

Parameters:
locale - string representing the locale - the value of xml:lang attribute e.g. "fr"
Throws:
VersionNotSupportedException

removeLargeIcon

void removeLargeIcon(String locale)
                     throws VersionNotSupportedException
Removes the large-icon element for particular locale. If locale=null the method removes the large-icon element for default locale.

Parameters:
locale - string representing the locale - the value of xml:lang attribute e.g. "fr"
Throws:
VersionNotSupportedException

removeIcon

void removeIcon(String locale)
                throws VersionNotSupportedException
Removes the icon element for particular locale. If locale=null the method removes the icon element for default locale.

Parameters:
locale - string representing the locale - the value of xml:lang attribute e.g. "fr"
Throws:
VersionNotSupportedException

removeSmallIcon

void removeSmallIcon()
Removes small-icon element for default locale.


removeLargeIcon

void removeLargeIcon()
Removes large-icon element for default locale.


removeIcon

void removeIcon()
Removes icon element for default locale.


removeAllIcons

void removeAllIcons()
Removes all icon elements from DD element.


org.netbeans.modules.j2ee.dd/1 1.13.0 2

Built on December 1 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.