org.netbeans.modules.projectuiapi/1 1.13.22 5

org.netbeans.spi.project.ui.support
Class ProjectCustomizer.Category

java.lang.Object
  extended by org.netbeans.spi.project.ui.support.ProjectCustomizer.Category
Enclosing class:
ProjectCustomizer

public static final class ProjectCustomizer.Category
extends Object

Describes category of properties to be customized by given component


Method Summary
static ProjectCustomizer.Category create(String name, String displayName, Image icon, ProjectCustomizer.Category[] subcategories)
          Factory method which creates new category description.
 String getDisplayName()
          Gets display name of given category.
 String getErrorMessage()
          Returns an error message for this category.
 Image getIcon()
          Gets icon of given category.
 String getName()
          Gets programmatic name of given category.
 ProjectCustomizer.Category[] getSubcategories()
          Gets subcategories of given category.
 boolean isValid()
          Returns whether this category is valid or not.
 void setErrorMessage(String message)
          Set an errror message for this category which than may be shown in a project customizer.
 void setValid(boolean valid)
          Set a validity of this category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ProjectCustomizer.Category create(String name,
                                                String displayName,
                                                Image icon,
                                                ProjectCustomizer.Category[] subcategories)
Factory method which creates new category description.

Parameters:
name - Programmatic name of the category
displayName - Name to be shown to the user
icon - Icon for given category. Will use default icon if null.
subcategories - Subcategories to be shown under given category. Category won't be expandable if null or empty array.

getName

public String getName()
Gets programmatic name of given category.

Returns:
Programmatic name of the category

getDisplayName

public String getDisplayName()
Gets display name of given category.

Returns:
Display name of the category

getIcon

public Image getIcon()
Gets icon of given category.

Returns:
Icon name of the category or null

getSubcategories

public ProjectCustomizer.Category[] getSubcategories()
Gets subcategories of given category.

Returns:
Subcategories of the category or null

getErrorMessage

public String getErrorMessage()
Returns an error message for this category.


isValid

public boolean isValid()
Returns whether this category is valid or not. See ProjectCustomizer.createCustomizerDialog(org.netbeans.spi.project.ui.support.ProjectCustomizer.Category[], org.netbeans.spi.project.ui.support.ProjectCustomizer.CategoryComponentProvider, java.lang.String, java.awt.event.ActionListener, org.openide.util.HelpCtx) for more details.

Returns:
whether this category is valid or not (true by default)

setValid

public void setValid(boolean valid)
Set a validity of this category. See ProjectCustomizer.createCustomizerDialog(org.netbeans.spi.project.ui.support.ProjectCustomizer.Category[], org.netbeans.spi.project.ui.support.ProjectCustomizer.CategoryComponentProvider, java.lang.String, java.awt.event.ActionListener, org.openide.util.HelpCtx) for more details.

Parameters:
valid - set whether this category is valid or not

setErrorMessage

public void setErrorMessage(String message)
Set an errror message for this category which than may be shown in a project customizer.

Parameters:
message - message for this category. To reset a message usually null or an empty string is passed. (similar to behaviour of JTextComponent.setText(String))

org.netbeans.modules.projectuiapi/1 1.13.22 5

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.