public static final class ProjectCustomizer.Category extends Object
Modifier and Type | Method and Description |
---|---|
static ProjectCustomizer.Category |
create(String name,
String displayName,
Image icon,
ProjectCustomizer.Category... subcategories)
Factory method which creates new category description.
|
ActionListener |
getCloseListener()
Returns the action listener that is executed outside of AWT EQ and is associated
with this category that gets notified when the customizer is going to be closed.
|
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.
|
ActionListener |
getOkButtonListener()
Returns the action listener associated with this category that gets notified
when OK button is pressed on the customizer.
|
ActionListener |
getStoreListener()
Returns the action listener that is executed outside of AWT EQ and is associated
with this category that gets notified when OK button is pressed on the customizer.
|
ProjectCustomizer.Category[] |
getSubcategories()
Gets subcategories of given category.
|
boolean |
isValid()
Returns whether this category is valid or not.
|
void |
setCloseListener(ActionListener listener)
Set the action listener that will get notified when the customizer is going to be closed
Listener is executed outside of AWT EventQueue.
|
void |
setErrorMessage(String message)
Set an errror message for this category which than may be shown in a
project customizer.
|
void |
setOkButtonListener(ActionListener okButtonListener)
Set the action listener that will get notified when the changes in the customizer
are to be applied.
|
void |
setStoreListener(ActionListener listener)
Set the action listener that will get notified when the changes in the customizer
are to be applied.
|
void |
setValid(boolean valid)
Set a validity of this category.
|
public static ProjectCustomizer.Category create(String name, String displayName, Image icon, ProjectCustomizer.Category... subcategories)
name
- Programmatic name of the categorydisplayName
- Name to be shown to the usericon
- 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.public String getName()
public String getDisplayName()
public Image getIcon()
public ProjectCustomizer.Category[] getSubcategories()
public String getErrorMessage()
public boolean isValid()
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.public void setValid(boolean valid)
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.valid
- set whether this category is valid or notpublic void setErrorMessage(String message)
message
- message for this category. To reset a
message usually null
or an empty string is
passed. (similar to behaviour of JTextComponent.setText(String)
)public void setOkButtonListener(ActionListener okButtonListener)
okButtonListener
- ActionListener to notifypublic ActionListener getOkButtonListener()
public void setStoreListener(ActionListener listener)
listener
- ActionListener to notifypublic ActionListener getStoreListener()
public void setCloseListener(ActionListener listener)
listener
- ActionListener to notifypublic ActionListener getCloseListener()