|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JTabbedPane
|
+--com.ca.directory.jxplorer.viewer.AttributeDisplay
AttributeDisplay holds a variety of display and editing classes, as well as a simple toolbar to allow switching between these. The main one is an HTML template displaying class, but there are (will be) also attribute editing and template editing classes...
Note that this class is *not* thread safe.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JTabbedPane |
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected java.util.Vector |
activeEditors
a list containing the currently displayed editors |
protected PluggableEditor |
currentEditor
The editor currently being displayed to the user. |
protected DataSource |
dataSource
the source of directory data for all editors |
static int |
EDITOR
The Table editor is always in position 2 (if present) |
protected java.util.Hashtable |
editors
A hashtable of all the editors that have ever been used to display an entry in the current JX session. |
protected DXEntry |
entry
the currently viewed entry (may be null) |
static int |
HTMLRENDERER
The HTML editor is always in position 1 (if present) |
protected boolean |
ignoreChangeEvents
Every time a tab is added or deleted, or a new tab is selected, a change event is triggered. |
protected java.lang.ClassLoader |
myLoader
A local copy of the special class loader used to load the plugable editors. |
protected java.util.Properties |
myProperties
A convenience link to the global JX properties list. |
protected static java.lang.String |
NONE
A utility constant - this is used in the editor hashtable to indicate that no pluggable editor has been found, and that there is no need to use the resource loader to look again. |
protected java.lang.String |
oldOCSig
|
protected javax.swing.JFrame |
owner
the parent frame displaying this object |
static java.lang.String |
PACKAGEPREFIX
All Plugins must have this package prefix. |
protected CBResourceLoader |
resourceLoader
A local copy of the special resource loader used to load the plugable editors and their associated resource files. |
protected TableAttributeEditor |
tableDisplay
The default table editor, that is usually available, and displays entry data as a grid of strings. |
protected HTMLTemplateDisplay |
templateDisplay
The default html editor, that is usually available, and which displays html template files |
protected javax.swing.JPanel |
view
The main view panel. |
protected javax.swing.JScrollPane |
viewHolder
The scroll pane that holds the main view object |
| Fields inherited from class javax.swing.JTabbedPane |
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
AttributeDisplay(java.util.Properties props,
javax.swing.JFrame owner,
CBResourceLoader resourceLoader)
The constructor for AttributeDisplay requires information about default file directories and urls. |
|
| Method Summary | |
void |
add(PluggableEditor ed)
|
void |
add(PluggableEditor ed,
int index)
|
boolean |
canCreateEntry()
Indicates whether the editor can create a new entry, given a unique name. |
void |
displayEntry(DXEntry dxentry,
DataSource ds)
Displays data that can be modified by the user. |
void |
displaySpecialEntry(DXEntry entry,
DataSource ds,
java.lang.String editorName)
This is a 'get out of jail free' method that allows an external class to force the display of a particular editor. |
protected PluggableEditor |
getCurrentEditor()
Returns the current editor. |
static java.lang.String |
getPackagePrefix()
|
java.awt.Component |
getPrintComponent()
Return the thingumy that should be printed. |
PluggableEditor |
getUniqueEditor(javax.naming.directory.Attribute oc)
This looks through a list of object classes in an attribute until it finds a unique editor corresponding to a particular value. |
protected void |
initHTMLEditor()
delay initialising the html editor until we need it, or it is loaded by a background thread. |
protected void |
initTableEditor()
delay initialising the table editor until we need it, or it is loaded by a background thread. |
void |
openDocumentURL(java.lang.String docURL)
Used to force Attribute Display to show a particular web page, rather than an attribute display. |
void |
print()
Starts the print operation. |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
The method @print@ must be implemented for @Printable@ interface. |
void |
refreshEditors()
Refreshes the currently visible editor with new info. |
void |
refreshEditors(DXEntry entry,
DataSource ds)
Refreshes the currently visible editor with new info. |
void |
registerClassLoader(java.lang.ClassLoader loader)
This specifies the class loader used to load plugin editors. |
void |
registerComponents(javax.swing.JMenuBar menu,
javax.swing.JToolBar buttons,
javax.swing.JTree tree,
javax.swing.JPopupMenu treeMenu,
javax.swing.JFrame jxplorer)
This can be used to register Swing components that may be used by sub editors to affect the outside environment. |
void |
remove(int index)
|
void |
removeAll()
|
protected void |
setCurrentEditor(PluggableEditor makeCurrent)
Sets the current editor to the specified editor, loads the current entry, and makes sure that it is visible to the user. |
protected void |
setEditors(DXEntry entry,
DataSource ds,
java.util.Vector ocs)
Clear out all the old editors, and get new editors corresponding to the new object classes. |
static void |
setPackagePrefix(java.lang.String prefix)
|
boolean |
suggestHTMLEditor()
|
boolean |
suggestPluggableEditor()
If a purpose written pluggable editor is available, switch to that, |
boolean |
suggestTableEditor()
|
| Methods inherited from class javax.swing.JTabbedPane |
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, paramString, remove, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HTMLRENDERER
public static final int EDITOR
protected javax.swing.JScrollPane viewHolder
protected javax.swing.JPanel view
protected DataSource dataSource
protected DXEntry entry
protected PluggableEditor currentEditor
protected HTMLTemplateDisplay templateDisplay
protected TableAttributeEditor tableDisplay
protected java.util.Properties myProperties
protected java.util.Hashtable editors
protected java.util.Vector activeEditors
protected javax.swing.JFrame owner
protected java.lang.String oldOCSig
protected java.lang.ClassLoader myLoader
protected CBResourceLoader resourceLoader
public static java.lang.String PACKAGEPREFIX
protected static final java.lang.String NONE
protected boolean ignoreChangeEvents
| Constructor Detail |
public AttributeDisplay(java.util.Properties props,
javax.swing.JFrame owner,
CBResourceLoader resourceLoader)
props - list of defaults for file and url locations.owner - the parent frame, used for gui sanity and L&F propogationresourceLoader - the resource loader used to load HTML templates from zip/jar files| Method Detail |
public static void setPackagePrefix(java.lang.String prefix)
public static java.lang.String getPackagePrefix()
public void registerClassLoader(java.lang.ClassLoader loader)
protected void initHTMLEditor()
protected void initTableEditor()
public int print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterExceptionpublic void print()
public void openDocumentURL(java.lang.String docURL)
public void displaySpecialEntry(DXEntry entry,
DataSource ds,
java.lang.String editorName)
entry - the entry to display (may be null)ds - the data source to use for directory info.editorName - the name to display in the editor tab.
public void displayEntry(DXEntry dxentry,
DataSource ds)
Displays data that can be modified by the user.
This method also organises which editors are used to display the current entry, searching for pluggable editors and so on.
displayEntry in interface DataSinkds - the datasource the editors may use for more infodxentry - the directory entry to display. If null, indicates that a
blank or 'empty' entry should be displayed.public boolean suggestPluggableEditor()
public boolean suggestTableEditor()
public boolean suggestHTMLEditor()
protected void setCurrentEditor(PluggableEditor makeCurrent)
makeCurrent - the editor to select.protected PluggableEditor getCurrentEditor()
protected void setEditors(DXEntry entry,
DataSource ds,
java.util.Vector ocs)
entry - the entry to be displayed by all the editorsds - the datasource the editors may use for more infoocs - the object classes (in order) to find editors for.public PluggableEditor getUniqueEditor(javax.naming.directory.Attribute oc)
oc - the objectClass attribute; a list of object classes
public void registerComponents(javax.swing.JMenuBar menu,
javax.swing.JToolBar buttons,
javax.swing.JTree tree,
javax.swing.JPopupMenu treeMenu,
javax.swing.JFrame jxplorer)
public void refreshEditors()
public void refreshEditors(DXEntry entry,
DataSource ds)
public java.awt.Component getPrintComponent()
public boolean canCreateEntry()
DataSink
canCreateEntry in interface DataSinkpublic void add(PluggableEditor ed)
public void add(PluggableEditor ed,
int index)
public void remove(int index)
remove in class javax.swing.JTabbedPanepublic void removeAll()
removeAll in class javax.swing.JTabbedPane
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||