|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--javax.swing.JApplet | +--com.submersion.jspshop.adminbrowse.AdminBrowse
Java applet for browsing of trees (be it object or class)
NetConnect
, Serialized FormInner Class Summary | |
private class |
AdminBrowse.PopupHandler
|
private class |
AdminBrowse.TreeHandler
|
Inner classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
private java.lang.String |
addMode
The AddMode parameter, passed from the html page. |
private java.lang.String |
clickParam
The ClickParam parameter, passed from the html page. |
private java.lang.String |
clickURL
The ClickURL parameter, passed from the html page. |
private java.lang.String |
context
The Context parameter, passed from the html page. |
private java.lang.String |
deleteMode
The DeleteMode parameter, passed from the html page. |
private java.util.HashMap |
indices
Contains a hashCode, ID lookup for JTree Nodes |
private java.lang.String |
modeParam
The ModeParam parameter, passed from the html page. |
private java.lang.String |
path
The Path parameter, passed from the html page. |
private java.lang.String |
rootName
The RootName parameter, passed from the html page. |
private javax.swing.JTree |
tree
JTree object |
private javax.swing.tree.DefaultTreeModel |
treeModel
A DefaultTreeModel for underlying data structure |
private java.lang.String |
url
The URL parameter, passed from the html page. |
private java.lang.String |
urlParam
The URLParam parameter, passed from the html page. |
Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.applet.Applet |
serialVersionUID, stub |
Fields inherited from class java.awt.Panel |
base, nameCounter |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AdminBrowse()
|
Method Summary | |
private void |
createLayer(javax.swing.tree.DefaultMutableTreeNode node,
java.lang.String context)
Using the netConnect and the URL parameter, creates a Layer under specified node, using context as a starting ID. |
private javax.swing.tree.DefaultMutableTreeNode |
createRootNode()
Creates the root Node depending on what sort of data setup there is. |
private java.lang.String |
createURL(java.lang.String context)
Concatenates a new String containing the URL that is used to get data from. |
private void |
expandPath(java.lang.String path)
Expands the JTree to the path specified. |
private javax.swing.tree.DefaultMutableTreeNode |
findNode(javax.swing.tree.DefaultMutableTreeNode node,
int key)
Finds a node by it's hashCode |
private javax.swing.tree.DefaultMutableTreeNode |
findNodeByID(java.lang.String id)
Uses the indices field to find a node by it's ID (from the context passed, or from the data provided by the corresponding JSP page) |
void |
init()
Initialisation sequence starts here. |
private void |
initialiseProperties()
Read the properties from the Applet tags, validate them, and store them in local variables |
private void |
openMode(javax.swing.tree.DefaultMutableTreeNode treeNode,
java.lang.String mode,
javax.swing.tree.TreePath treePath)
Creates A URL using the ClickURL and Mode parameters, then goes to that URL. |
private void |
openNode(javax.swing.tree.DefaultMutableTreeNode treeNode,
javax.swing.tree.TreePath treePath)
Creates A URL using the ClickURL and ClickParam parameters, then goes to that URL. |
private java.lang.String[] |
split(java.lang.String str,
java.lang.String delim)
Helper function that splits apart a String by it's delimiter and returns an Array of that string. |
Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, createRootPaneException, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.applet.Applet |
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
|
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, transferFocus, validate, validateTree, writeObject |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
private java.util.HashMap indices
private javax.swing.tree.DefaultTreeModel treeModel
private javax.swing.JTree tree
private java.lang.String path
private java.lang.String clickURL
private java.lang.String clickParam
private java.lang.String modeParam
private java.lang.String deleteMode
private java.lang.String addMode
private java.lang.String context
private java.lang.String rootName
private java.lang.String url
private java.lang.String urlParam
Constructor Detail |
public AdminBrowse()
Method Detail |
public void init()
init
in class java.applet.Applet
private void expandPath(java.lang.String path)
path
- A comma seperated path containing the Objects to expand.
For example, Object,User,Anonymous would expand first the Object
node, then the User node, then select the Anonymous nodeprivate javax.swing.tree.DefaultMutableTreeNode findNodeByID(java.lang.String id)
id
- The ID to look for.private javax.swing.tree.DefaultMutableTreeNode findNode(javax.swing.tree.DefaultMutableTreeNode node, int key)
node
- The node to start searching at.key
- The hashcode for the node to look for.private java.lang.String[] split(java.lang.String str, java.lang.String delim)
str
- String to split.delim
- Delimiter to split by.private void createLayer(javax.swing.tree.DefaultMutableTreeNode node, java.lang.String context)
node
- The node of which to create the layer undercontext
- The ID of the object to look for children for.private javax.swing.tree.DefaultMutableTreeNode createRootNode()
private java.lang.String createURL(java.lang.String context)
context
- The ID of the object that the URL is getting created
for.private void initialiseProperties()
private void openNode(javax.swing.tree.DefaultMutableTreeNode treeNode, javax.swing.tree.TreePath treePath)
treeNode
- The node selected.treePath
- The TreePath to the node selected.private void openMode(javax.swing.tree.DefaultMutableTreeNode treeNode, java.lang.String mode, javax.swing.tree.TreePath treePath)
treeNode
- The TreeNode selected.mode
- The Mode to use, for example add,delete.treePath
- The path to the TreeNode selected.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |