public class CatalogTree extends JPanel implements QueryResultDisplay, QueryResultHandler
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
CatalogTree(CatalogDirectory catDir)
Create a CatalogTree and display the given catalog directory hierarchy
|
Modifier and Type | Method and Description |
---|---|
void |
addQueryResult(QueryResult queryResult)
Add the given query result to the tree at the currently selected node.
|
void |
copy()
Copy the selected catalog to the clipboard.
|
void |
cut()
Cut the selected catalog to the clipboard.
|
AbstractAction |
getCopyAction() |
AbstractAction |
getCutAction() |
AbstractAction |
getMoveDownAction() |
AbstractAction |
getMoveUpAction() |
AbstractAction |
getPasteAction() |
QueryResult |
getQueryResult()
Return a reference to the QueryResult being displayed (in this case,
it should be a CatalogDirectory object of some kind).
|
QueryResult |
getQueryResult(URL url)
This method is called in a background thread to get the contents of the
given URL and return a QueryResult object representing it.
|
QueryResultDisplay |
getQueryResultDisplay()
Return the object used to display leaf items, such as tables, etc.
|
Catalog |
getSelectedNode()
Return the currently selected tree node
|
AbstractAction |
getToBottomAction() |
AbstractAction |
getToTopAction() |
JTree |
getTree()
Return the internal JTree
|
static void |
main(String[] args)
test main
|
JMenuItem |
makeReloadMenuItem()
Return a menu item to reload the catalog config file and rebuild the
tree with the new data.
|
void |
moveNode(boolean up)
Move the the selected catalog up or down in the tree.
|
void |
moveNodeToEnd(boolean up)
Move the the selected catalog all the way up or down in the tree, as far as possible.
|
void |
paste()
Paste the selected catalog from the clipboard.
|
void |
reload()
If there is a URL corresponding to the root node, read it again and
rebuild the tree (in case the file changed...).
|
void |
selectNode(Catalog node)
Select the given tree node
|
void |
setHTMLQueryResultHandler(HTMLQueryResultHandler handler)
Optional handler, used to report HTML format errors from servers
|
void |
setQueryResult(QueryResult queryResult)
Display the tree structure of the given query result, which may be
either a CatalogDirectory or a URLQueryResult, where an HTTP get
of the URL returns a CatalogDirectory.
|
void |
setQueryResultDisplay(QueryResultDisplay q)
Set the object used to display leaf items, such as tables, etc.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public CatalogTree(CatalogDirectory catDir)
public void setHTMLQueryResultHandler(HTMLQueryResultHandler handler)
public void setQueryResultDisplay(QueryResultDisplay q)
public QueryResultDisplay getQueryResultDisplay()
public JTree getTree()
public void setQueryResult(QueryResult queryResult)
setQueryResult
in interface QueryResultDisplay
public QueryResult getQueryResult()
public void selectNode(Catalog node)
public Catalog getSelectedNode()
public void addQueryResult(QueryResult queryResult)
public JMenuItem makeReloadMenuItem()
public void reload()
public QueryResult getQueryResult(URL url) throws IOException
getQueryResult
in interface QueryResultHandler
IOException
public void cut()
public void copy()
public void paste()
public void moveNode(boolean up)
public void moveNodeToEnd(boolean up)
public AbstractAction getCutAction()
public AbstractAction getCopyAction()
public AbstractAction getPasteAction()
public AbstractAction getMoveUpAction()
public AbstractAction getMoveDownAction()
public AbstractAction getToTopAction()
public AbstractAction getToBottomAction()
public static void main(String[] args)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.