org.netbeans.spi.palette/1 1.26.1

org.netbeans.spi.palette
Class PaletteActions

java.lang.Object
  extended by org.netbeans.spi.palette.PaletteActions

public abstract class PaletteActions
extends Object

An interface implemented by palette clients to provide custom actions for popup menus and actions for import of new items.


Constructor Summary
PaletteActions()
           
 
Method Summary
abstract  Action[] getCustomCategoryActions(Lookup category)
           
abstract  Action[] getCustomItemActions(Lookup item)
           
abstract  Action[] getCustomPaletteActions()
           
abstract  Action[] getImportActions()
           
abstract  Action getPreferredAction(Lookup item)
           
 Action getRefreshAction()
          An action that will be invoked as part of the palette refresh logic, for example when user chooses "Refresh" in palette's popup menu.
 Action getResetAction()
          An action that resets the palette content to its default state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteActions

public PaletteActions()
Method Detail

getImportActions

public abstract Action[] getImportActions()
Returns:
An array of action that will be used to construct buttons for import of new palette item in palette manager window.

getCustomPaletteActions

public abstract Action[] getCustomPaletteActions()
Returns:
Custom actions to be added to the top of palette's default popup menu.

getCustomCategoryActions

public abstract Action[] getCustomCategoryActions(Lookup category)
Parameters:
category - Lookup representing palette's category.
Returns:
Custom actions to be added to the top of default popup menu for the given category.

getCustomItemActions

public abstract Action[] getCustomItemActions(Lookup item)
Parameters:
item - Lookup representing palette's item.
Returns:
Custom actions to be added to the top of the default popup menu for the given palette item.

getPreferredAction

public abstract Action getPreferredAction(Lookup item)
Parameters:
item - Lookup representing palette's item.
Returns:
An action to be invoked when user double-clicks the item in the palette (e.g. insert item at editor's default location). Return null to disable preferred action for this item.

getRefreshAction

public Action getRefreshAction()
An action that will be invoked as part of the palette refresh logic, for example when user chooses "Refresh" in palette's popup menu. Can be null. The action properties (label, icon) are not displayed to the user, the Palette module will provide its own.

Returns:
Custom refresh action or null.
Since:
1.9

getResetAction

public Action getResetAction()
An action that resets the palette content to its default state. The action can be invoked by the user from palette's popup menu for from the Palette Manager window. The action properties (label, icon) are not displayed to the user, the Palette module provides its own.

Returns:
Custom reset action or null to use the default one that removes all user's modifications to the XML layer files.
Since:
1.11

org.netbeans.spi.palette/1 1.26.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.