|
|||||||
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 | +--javax.swing.JComponent | +--adavid.swing.LTreeNode
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static int |
OFFSET
graphical information to draw the node (not the cell) |
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 |
Constructor Summary | |
LTreeNode(LTreeContent object)
constructor: takes the content of the node ; the node will be displayed with a cell |
Method Summary | |
java.awt.Component |
add(java.awt.Component c)
add a component or a node ; this is general and makes this tree structure powerful and flexible |
void |
addLTreeListener(LTreeListener listener)
add a listener for this node |
java.awt.Component |
addSilent(java.awt.Component c)
same as above but without expand |
void |
collapse()
collapse this node and hide its sub nodes |
void |
delete()
the node deletes itself if it is not the root |
void |
expand()
expands this node and shows its sub nodes |
LTreeNode |
getParentNode()
returns the parent node |
java.awt.Dimension |
getPreferredSize()
returns the preferred size of this node, which has been computed with the sub nodes if the node is expanded |
void |
hasChanged()
important function ; has to be called whenever a node is changed and needs to be updated/displayed |
boolean |
isExpanded()
returns true if this node is expanded |
void |
mouseClicked(java.awt.event.MouseEvent e)
useless methods of MouseListener |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
collapse or expands if one clicks on the triangle |
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paintComponent(java.awt.Graphics g)
paint this component (node) ; basically paints a triangle if necessary (if there is a content ; the cell is painted by the container function paintComponents(..) |
void |
removeAllNodes()
removes all sub nodes attached to this node |
void |
removeNode(LTreeNode node)
remove a sub node attached to this node |
void |
restoreViewport()
restore the saved view port position |
void |
saveViewport()
save the view port of the (maybe) parent viewport this is useful because JScrollPane looses track of the position of the view port |
void |
setPopup(javax.swing.JPopupMenu popup)
set the popup of this node |
void |
unselect()
unselect his node |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getAccessibleContext,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getUIClassID,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintImmediately,
paintImmediately,
paramString,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int OFFSET
Constructor Detail |
public LTreeNode(LTreeContent object)
Method Detail |
public void delete()
public LTreeNode getParentNode()
public boolean isExpanded()
public java.awt.Component add(java.awt.Component c)
public java.awt.Component addSilent(java.awt.Component c)
public java.awt.Dimension getPreferredSize()
public void removeNode(LTreeNode node)
public void removeAllNodes()
public void expand()
public void collapse()
public void saveViewport()
public void restoreViewport()
public void hasChanged()
public void paintComponent(java.awt.Graphics g)
public void setPopup(javax.swing.JPopupMenu popup)
public void addLTreeListener(LTreeListener listener)
public void unselect()
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseClicked(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |