|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
PluggableEditor defines the interface used by 'pluggable' objects that display data to the user in JXPlorer. Objects that implement this interface, are placed in the package com.ca.directory.jxplorer.viewer, and are given the class name of a particular schema object class will be dynamically loaded when the JXPlorer user attempts to view that object class.
For example, a class implementing this interface, called 'person.class', and placed in the com/cai/od/jxplorer/viewer directory, would be automatically loaded whenever the user accessed a 'person' entry, or a 'person' derived entry, in the directory.
Note that the class should be given the completely lower case name of the object class being modelled, and be aware that this breaks the java class naming convention. (E.g. use 'organizationalunit.java' rather than either 'OrganizatonalUnit.java' or 'organizationalUnit.java').
| Method Summary | |
DataSink |
getDataSink()
Returns the data sink that will be used to slurp data. |
javax.swing.JComponent |
getDisplayComponent()
This returns the swing component being used to display the data, so that another component can set its visibility. |
javax.swing.ImageIcon |
getIcon()
Returns the icon of the editor. |
java.lang.String |
getName()
Returns the title of the editor. |
javax.swing.JPopupMenu |
getPopupMenu(java.lang.String rdn)
If a UNIQUE pluggable editor exists for an entry, the display tree will call this method to see if a special pull down menu ('right click menu') is desired. |
java.awt.Component |
getPrintComponent()
This returns the component that should be used to print the data (e.g. a full table of data that spans several pages). |
java.lang.String |
getToolTip()
Returns the Tool Tip of the editor. |
javax.swing.ImageIcon |
getTreeIcon(java.lang.String rdn)
If a UNIQUE pluggable editor exists for an entry, the display tree will call this method to see if a special icon is desired. |
boolean |
hideSubEntries(java.lang.String rdn)
If a UNIQUE pluggable editor exists for an entry, the display tree will call this method to see if it should hide the subtree below this entry because the pluggable editor is directly handling this data. |
boolean |
isUnique()
This sets whether the component expects to be the only editor used for its object class, or whether it will co-exist with any other applicable editors, and the default (html/table) editor. |
void |
registerComponents(javax.swing.JMenuBar menu,
javax.swing.JToolBar buttons,
javax.swing.JTree tree,
javax.swing.JPopupMenu treeMenu,
javax.swing.JFrame jxplorer)
Registers Swing components that the pluggable editor may manipulate. |
void |
unload()
This method is called when the editor is being unloaded by the browser, and allows for any required clean up activity. |
| Method Detail |
public javax.swing.JComponent getDisplayComponent()
In many cases this may be the editor itself.
public java.awt.Component getPrintComponent()
A minimal implementation can simply return getDisplayComponent().
public DataSink getDataSink()
In many cases this may be the editor itself.
public boolean isUnique()
public java.lang.String getName()
public javax.swing.ImageIcon getIcon()
public java.lang.String getToolTip()
public void registerComponents(javax.swing.JMenuBar menu,
javax.swing.JToolBar buttons,
javax.swing.JTree tree,
javax.swing.JPopupMenu treeMenu,
javax.swing.JFrame jxplorer)
Any changes made by the editor should be removed when the editor is unloaded.
menu - the main menu that appears on the top of JXplorerbuttons - the JXplorer button bartree - the JXplorer treetreeMenu - the popup menu that JXplorer uses for tree itemsjxplorer - the root JXplorer object, from which the entire GUI tree descends. (You need this for
look & feel updates, and possibly for paintology)public void unload()
public javax.swing.ImageIcon getTreeIcon(java.lang.String rdn)
Most pluggable editors will not bother implementing this class and will just return null. Only pluggable editors with very special needs should consider implementing this: otherwise the normal naming attribute or object class based icons should be sufficient.
rdn - the name of the tree node being displayed (i.e. the rdn of the entry)
public javax.swing.JPopupMenu getPopupMenu(java.lang.String rdn)
rdn - the name of the tree node being displayed (i.e. the rdn of the entry)
public boolean hideSubEntries(java.lang.String rdn)
Most pluggable editors will use the default behaviour and return 'false' to allow user browsing of sub entries.
rdn - the name of the tree node being displayed (i.e. the rdn of the entry)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||