This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 61635
Collapse All | Expand All

(-)arch-core-palette.xml (-2 / +38 lines)
Lines 47-52 Link Here
47
    The module will autoload.
47
    The module will autoload.
48
<api name="Palette" group="java" type="export" category="devel" url="http://www.netbeans.org/download/dev/javadoc/org-netbeans-spi-palette"/>   
48
<api name="Palette" group="java" type="export" category="devel" url="http://www.netbeans.org/download/dev/javadoc/org-netbeans-spi-palette"/>   
49
  </p>
49
  </p>
50
  <p>
51
      The API includes support for the clients writing palette content insertable into the text editor.<br/>
52
      This support covers the DTD definition of the palette item definition file format and the content
53
      of the Lookup holding object(s) representing the selected item.
54
<api name="editor-palette-item-1_0.dtd" group="dtd" type="export" category="devel" url="http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd" />
55
  </p>
50
 </answer>
56
 </answer>
51
57
52
58
Lines 150-155 Link Here
150
           FileObject.getAttribute().</p>
156
           FileObject.getAttribute().</p>
151
    </usecase>
157
    </usecase>
152
  </p>
158
  </p>
159
  <p>
160
    <usecase id="items" name="Writing Item" >
161
        <p>The following steps must be taken when writing the item using the support provided by this module:</p>
162
            <ol>
163
                <li>
164
                    Create XML file with item definition according to 
165
                    the <a href="#dtd-editor-palette-item-1_0.dtd">editor-palette-item-1_0.dtd</a>.
166
                </li>
167
                <li>
168
                    Register it in the editor's layer file (see Basic usage).
169
                </li>
170
                <li>
171
                    Provide custom item implementation of the ActiveEditorDrop interface if needed. I must be
172
                    referenced from the definition file.
173
                </li>
174
            </ol>
175
    </usecase>
176
  </p>
153
 </answer>
177
 </answer>
154
178
155
179
Lines 275-281 Link Here
275
  <p>
299
  <p>
276
    <api group="java" name="OpenAPIs" type="import" category="official">
300
    <api group="java" name="OpenAPIs" type="import" category="official">
277
     <p>
301
     <p>
278
      For acces to Nodes, winsys TopComponent, lookups, resource bundles etc.
302
      For acces to Nodes, winsys TopComponent, ActiveEditorDrop, lookups, resource bundles etc.
279
     </p>
303
     </p>
280
    </api>
304
    </api>
281
  </p>
305
  </p>
Lines 741-747 Link Here
741
-->
765
-->
742
 <answer id="lookup-register">
766
 <answer id="lookup-register">
743
  <p>
767
  <p>
744
   No
768
    <api name="node_represention" group="lookup" type="export" category="devel">
769
        The palette item implementor can either directly provide the item body 
770
        or her own item class implementing <code>org.openide.text.ActiveEditorDrop</code> interface.
771
        <br/>
772
        Lookup that holds object(s) representing the selected item then associates 
773
        custom item class instance with the <code>org.openide.text.ActiveEditorDrop.class</code> key and 
774
        the body with <code>java.lang.String</code> key.
775
        <br/>
776
        Editor side implementor can use the Lookup content whenever the Lookup is given, 
777
        namely in the editor-provided implementations of the <code>PaletteActions</code>,
778
        <code>DragAndDropHandler</code> and <code>PropertyChangeListener</code> (registered 
779
        on the <code>PaletteController</code>) interfaces.
780
    </api>
745
  </p>
781
  </p>
746
 </answer>
782
 </answer>
747
783

Return to bug 61635