Index: arch-core-palette.xml =================================================================== RCS file: /cvs/core/arch/arch-core-palette.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- arch-core-palette.xml 21 Jul 2005 09:41:28 -0000 1.3 +++ arch-core-palette.xml 10 Aug 2005 11:31:13 -0000 1.4 @@ -47,6 +47,12 @@ The module will autoload.

+

+ The API includes support for the clients writing palette content insertable into the text editor.
+ This support covers the DTD definition of the palette item definition file format and the content + of the Lookup holding object(s) representing the selected item. + +

@@ -150,6 +156,24 @@ FileObject.getAttribute().

+

+ +

The following steps must be taken when writing the item using the support provided by this module:

+
    +
  1. + Create XML file with item definition according to + the editor-palette-item-1_0.dtd. +
  2. +
  3. + Register it in the editor's layer file (see Basic usage). +
  4. +
  5. + Provide custom item implementation of the ActiveEditorDrop interface if needed. I must be + referenced from the definition file. +
  6. +
+ +

@@ -275,7 +299,7 @@

- For acces to Nodes, winsys TopComponent, lookups, resource bundles etc. + For acces to Nodes, winsys TopComponent, ActiveEditorDrop, lookups, resource bundles etc.

@@ -741,7 +765,19 @@ -->

- No + + The palette item implementor can either directly provide the item body + or her own item class implementing org.openide.text.ActiveEditorDrop interface. +
+ Lookup that holds object(s) representing the selected item then associates + custom item class instance with the org.openide.text.ActiveEditorDrop.class key and + the body with java.lang.String key. +
+ Editor side implementor can use the Lookup content whenever the Lookup is given, + namely in the editor-provided implementations of the PaletteActions, + DragAndDropHandler and PropertyChangeListener (registered + on the PaletteController) interfaces. +