|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTree
net.sourceforge.nite.gui.textviewer.NTree
public class NTree
A simple extension of JTree that allows a data element to be associated with each tree node so that time highlighting and query highlighting can be achieved.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTree |
---|
javax.swing.JTree.DynamicUtilTreeNode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
---|---|
static int |
ADD
|
static int |
REMOVE
|
Fields inherited from class javax.swing.JTree |
---|
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, LARGE_MODEL_PROPERTY, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, ROW_HEIGHT_PROPERTY, SCROLLS_ON_EXPAND_PROPERTY, SELECTION_MODEL_PROPERTY, SHOWS_ROOT_HANDLES_PROPERTY, TOGGLE_CLICK_COUNT_PROPERTY, TREE_MODEL_PROPERTY, VISIBLE_ROW_COUNT_PROPERTY |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NTree()
Constructor for NTree. |
|
NTree(NTreeNode nroot)
Constructor for NTree. |
Method Summary | |
---|---|
void |
acceptQueryResult(NOMElement result)
accept a query result as an individual element |
void |
acceptQueryResults(java.util.List results)
accept a query result as a list of NOMElements |
void |
acceptTimeChange(double systemTime)
Causes the display components which correspond to the specified time to be highlighted This uses the TimeIntervalInterator provided by TimeIntervalMapper to find all the display components for the specified time. |
void |
acceptTimeSpanChange(double start,
double end)
Causes the display components which are in time scope between the specified start and end times to be highlighted NOT YET IMPLEMENTED |
void |
clearHighlights()
|
Clock |
getClock()
Return the Clock that is currently syncronising this TimeHandler |
java.util.Set |
getDataNodes(ObjectModelElement el)
|
double |
getMaxTime()
get the largest end time of any NTreeNode so far added to this NTree. |
java.util.Set |
getSelectedElements()
Method getSelectedElements. |
java.util.List |
getSelectedElementsOrdered()
Method getSelectedElementsOrdered. |
java.util.Set |
getSelectedTreeNodes()
|
java.util.Set |
getSelectedTreeNodesOrdered()
|
void |
insertDisplayElement(ObjectModelElement newElement,
ObjectModelElement parent,
int position)
Find the tree nodes which represent the specified parent. |
void |
redisplayElement(ObjectModelElement e)
Find the tree nodes which display this object model element and redraw them given the data in the specified element |
void |
reIndex()
Clears up the nodes/data indices and remakes them |
void |
removeDisplayComponent(ObjectModelElement e)
Find the nodes which represent this element and delete them (and their children) from the tree. |
void |
setClock(Clock c)
Set the Clock to which this TimeHandler is registered |
void |
setHighlighted(ObjectModelElement el,
java.awt.Color c)
allow the user to add a highlight to an element |
void |
setQueryHighlightColor(java.awt.Color color)
set the colour of the highlighting for queries |
void |
setRoot(NTreeNode nroot)
|
void |
setSelected(ObjectModelElement el)
allow the user to set the selected element |
void |
setTime(double time)
Broadcast a new time. |
void |
setTimeHighlightColor(java.awt.Color color)
Change the Color used for all registered TimeHandlers to highlight times |
void |
setTimeSpan(double start,
double end)
Broadcast a new span to all registered TimeHandlers. |
void |
setUpDataElements()
|
void |
setUpDataElements(NTreeNode root)
|
void |
setUpTimeMapper()
|
void |
setUpTimeMapper(NTreeNode root)
Initialises the TimeIntervalMapper data structure which maintains a mapping between display components and times. |
Methods inherited from class javax.swing.JTree |
---|
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, collapsePath, collapseRow, convertValueToText, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDragEnabled, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setEditable, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, hide, 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, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ADD
public static final int REMOVE
Constructor Detail |
---|
public NTree()
public NTree(NTreeNode nroot)
root
- Method Detail |
---|
public void setRoot(NTreeNode nroot)
public void setUpTimeMapper(NTreeNode root)
public void setUpTimeMapper()
public void setUpDataElements(NTreeNode root)
public void setUpDataElements()
public void acceptTimeChange(double systemTime)
acceptTimeChange
in interface TimeHandler
TimeHandler.acceptTimeChange(double)
public void setTimeHighlightColor(java.awt.Color color)
TimeHandler
setTimeHighlightColor
in interface TimeHandler
public void setTime(double time)
TimeHandler
setTime
in interface TimeHandler
TimeHandler.setTime(double)
public void acceptTimeSpanChange(double start, double end)
acceptTimeSpanChange
in interface TimeHandler
public void setTimeSpan(double start, double end)
TimeHandler
setTimeSpan
in interface TimeHandler
TimeHandler.setTimeSpan(double, double)
public void setClock(Clock c)
TimeHandler
setClock
in interface TimeHandler
public Clock getClock()
TimeHandler
getClock
in interface TimeHandler
TimeHandler.getClock()
public void setSelected(ObjectModelElement el)
public void clearHighlights()
public java.util.Set getDataNodes(ObjectModelElement el)
public void setHighlighted(ObjectModelElement el, java.awt.Color c)
public java.util.Set getSelectedElements()
public java.util.List getSelectedElementsOrdered()
public java.util.Set getSelectedTreeNodes()
public java.util.Set getSelectedTreeNodesOrdered()
public void redisplayElement(ObjectModelElement e)
public void removeDisplayComponent(ObjectModelElement e)
public void insertDisplayElement(ObjectModelElement newElement, ObjectModelElement parent, int position)
public void acceptQueryResults(java.util.List results)
acceptQueryResults
in interface QueryResultHandler
public void acceptQueryResult(NOMElement result)
acceptQueryResult
in interface QueryResultHandler
public void setQueryHighlightColor(java.awt.Color color)
setQueryHighlightColor
in interface QueryResultHandler
public void reIndex()
public double getMaxTime()
getMaxTime
in interface TimeHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |