Extension SDK

oracle.ide.palette
Interface PaletteManager

All Superinterfaces:
Addin

public interface PaletteManager
extends Addin

Registers the palette as an addin


Method Summary
 void activateItem(PaletteItem item, boolean stickyMode)
          Activate Item in the component palette.
 void activateItem(java.lang.String itemName, java.lang.String pageName, boolean stickyMode)
          Activate the PaletteItem based on it's name and page location.
 PalettePage addPage(java.lang.String pageName, java.lang.String showForTypes, java.lang.String type, boolean canRemove, boolean listView, boolean isPersistent)
          Adds a page to the palette
 boolean addPaletteConfigFile(java.net.URL palette_url, boolean persist)
          Add palette pages using a palette.xml files.
 PaletteItem getItemFromPage(java.lang.String itemName, java.lang.String pageName)
          Retrieve PaletteItem from the specified PalettePage
 PalettePage getPage(java.lang.String pageName)
          Returns the palette page by name.
 Palette getPalette()
          Retrieve the current palette model.
 PaletteWindow getPaletteWindow()
          Retrieves the current Palette View
 java.util.Iterator getTypes()
          Return all registered palette types.
 void registerPaletteWizard(java.lang.String type, Invokable wizard)
          Register Invokable wizard.
 boolean removePage(java.lang.String pageName)
          Remove page from palette
 void resetPalette()
          Reset the palette.
 void setPageAsDefault(java.lang.String documentSuffix, java.lang.String palettePage)
          Set page as default for editor type
 void setPageCanShow(java.lang.String pageName, boolean canShow)
          Set the page to be visible or not.
 boolean showPalettePage(java.lang.String pageName)
          Show palette page.
 
Methods inherited from interface oracle.ide.addin.Addin
canShutdown, ideVersion, initialize, shutdown, version
 

Method Detail

getPaletteWindow

public PaletteWindow getPaletteWindow()
Retrieves the current Palette View


getPalette

public Palette getPalette()
Retrieve the current palette model.


registerPaletteWizard

public void registerPaletteWizard(java.lang.String type,
                                  Invokable wizard)
Register Invokable wizard.

Parameters:
type - - examples would be jsp, java, html, js, xml. All document suffixes.
wizard - - the wizard which implements Invokable.
See Also:
oracle.ide.Invokable

getTypes

public java.util.Iterator getTypes()
Return all registered palette types.


getPage

public PalettePage getPage(java.lang.String pageName)
Returns the palette page by name.

Returns:
PalettePage / null if no page found.

addPage

public PalettePage addPage(java.lang.String pageName,
                           java.lang.String showForTypes,
                           java.lang.String type,
                           boolean canRemove,
                           boolean listView,
                           boolean isPersistent)
Adds a page to the palette

Parameters:
pageName - - name of page
showForTypes - - a semicolon delimited string which specified which "type" of documents this page can be shown with. ex( jsp;html;java;xml;uix )
type - - the type of component this page allows( ex. jsp, java, xml )
canRemove - - true if this page can be removed by the end user
listView - - true if you want the page show in list view, icon view otherwise.
isPersistent - - true if you want the page to be saved when jdev shutsdown.

removePage

public boolean removePage(java.lang.String pageName)
Remove page from palette

Parameters:
pageName - - name of page to remove from palette

showPalettePage

public boolean showPalettePage(java.lang.String pageName)
Show palette page.

Parameters:
pageName - - name of page to show while IDE is running.

addPaletteConfigFile

public boolean addPaletteConfigFile(java.net.URL palette_url,
                                    boolean persist)
Add palette pages using a palette.xml files.

Parameters:
palette_url - - the url of your own palette.xml file to add to the IDE palette.xml file.
persist - - true if you want your information to be saved at IDE shutdown.

setPageAsDefault

public void setPageAsDefault(java.lang.String documentSuffix,
                             java.lang.String palettePage)
Set page as default for editor type

Parameters:
documentSuffix - - the document type or suffix to be default for. ex. ( jsp )
palettePage - - the name of the palette page to show when document is opened.

setPageCanShow

public void setPageCanShow(java.lang.String pageName,
                           boolean canShow)
Set the page to be visible or not. Only in certain situations would a user need certain pages although the page itself belongs to a certain context.

Parameters:
pageName - - the name of the page
canShow - - true if the page can show itself.

resetPalette

public void resetPalette()
Reset the palette. If stickyMode has been set, it will be removed.


activateItem

public void activateItem(PaletteItem item,
                         boolean stickyMode)
Activate Item in the component palette.

Parameters:
item - - the palette item to activate.
stickyMode - - set if stickyMode should turned on.

getItemFromPage

public PaletteItem getItemFromPage(java.lang.String itemName,
                                   java.lang.String pageName)
Retrieve PaletteItem from the specified PalettePage

Parameters:
itemName - - the shortLabel of the PaletteItem
pageName - - the shortLabel of the PalettePage
Returns:
PaletteItem

activateItem

public void activateItem(java.lang.String itemName,
                         java.lang.String pageName,
                         boolean stickyMode)
Activate the PaletteItem based on it's name and page location.

Parameters:
itemName - - the shortLabel of the PaletteItem to activate.
pageName - - the shortLabel of the PalettePage that contains the item.
stickyMode - - set if stickyMode should be turned on.

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.