|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
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
leon.view.win.swing.component.LyJTreeComponent
public class LyJTreeComponent
This class implements a graphical component that display the data in a tree view.
LySwingTree
,
JTree
,
Serialized FormNested Class Summary | |
---|---|
class |
LyJTreeComponent._LyJTreeCellRenderer
This class implements the way each node is displayed switching its node description. |
Nested classes/interfaces inherited from class javax.swing.JTree |
---|
javax.swing.JTree.DropLocation, javax.swing.JTree.DynamicUtilTreeNode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.awt.Cursor |
LY_OVER_CURSOR
Cursor for mouse over sensitive node. |
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 | |
---|---|
LyJTreeComponent(LyJTreeElement root)
Creates a new tree component. |
|
LyJTreeComponent(LyJTreeElement root,
boolean dragNDrop)
Creates a new tree component. |
|
LyJTreeComponent(LyJTreeElement root,
boolean dragNDrop,
boolean forceOpen)
Creates a tree component. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
centerOnElement(javax.swing.tree.TreePath path)
Centers the tree vertically on the specified element. |
void |
drawInSplitter(java.awt.Graphics gc,
int xOffset,
int yOffset)
(non-Javadoc). |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
int |
getHeight()
(non-Javadoc). |
float |
getHeightFactor()
Gets the height factor. |
int |
getLeftHeaderWidth()
(non-Javadoc). |
java.awt.Dimension |
getPreferredScrollableViewportSize()
(non-Javadoc). |
java.awt.Dimension |
getScrollableSize()
(non-Javadoc). |
javax.swing.tree.TreePath[] |
getSelectionPaths()
Gets all selected valuesi without the nodes that have children when the leaves only select mode is set. |
LySelectionTransmitter |
getSelectionTransmitter()
(non-Javadoc). |
int |
getTopHeaderHeight()
(non-Javadoc). |
int |
getWidth()
(non-Javadoc). |
boolean |
isIdle()
(non-Javadoc). |
boolean |
isNotifySelections()
Indicates if selection events are notified. |
void |
keyPressed(java.awt.event.KeyEvent evt)
(non-Javadoc). |
void |
keyReleased(java.awt.event.KeyEvent evt)
Nothing is done. |
void |
keyTyped(java.awt.event.KeyEvent evt)
Nothing is done. |
void |
mouseClicked(java.awt.event.MouseEvent e)
(non-Javadoc). |
void |
mouseDragged(java.awt.event.MouseEvent e)
Nothing is done. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Nothing is done. |
void |
mouseExited(java.awt.event.MouseEvent e)
Nothing is done. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Underlines the text under the mouse cursor and changes the cursor to a hand. |
void |
mousePressed(java.awt.event.MouseEvent e)
Nothing is done. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Nothing is done. |
void |
paintComponent(java.awt.Graphics g)
Paints the component with the highlighted row. |
void |
selectionPerformed(LySelectionEvent selectionEvent)
(non-Javadoc). |
void |
setCanvasSplitter(LyAbstractCanvasSplitterManager splitter)
(non-Javadoc). |
void |
setCheckboxMode(boolean checkboxMode)
Sets the checkbox mode. |
void |
setDisplayDefaultIcons(boolean displayDefaultIcons)
Sets the display default icons mode. |
void |
setFixedWidth(int fixedWidth)
Changes the fixed width of the tree. |
void |
setFont(java.awt.Font font)
Sets the font of this component and gets the font metrics when it changes. |
void |
setForceOpen(boolean forceOpen)
Sets the force open mode. |
void |
setHeightFactor(float factor)
Sets the height factor of this tree. |
void |
setIdle(boolean status)
(non-Javadoc). |
void |
setMinWidth(int minWidth)
Sets the minimum width of this tree component. |
void |
setNotifySelections(boolean notify)
Sets the notify selections mode. |
void |
setNRows(int nRows)
Changes the method for computing height of the tree. |
void |
setPopupMenu(javax.swing.JPopupMenu popupMenu)
Registers the popup menu displayed on the tree component. |
void |
setPopupMode(boolean popup)
Sets the popup mode. |
void |
setSelectLeavesOnly(boolean selectLeavesOnly)
Sets the select leaves only mode. |
void |
setSensitive(boolean sensitive)
Sets the sensitive mode. |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent event)
(non-Javadoc). |
void |
treeExpanded(javax.swing.event.TreeExpansionEvent event)
(non-Javadoc). |
void |
updateTree(LyJTreeElement node)
Sets the state of all the nodes. |
void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
Called when the selection on the tree has changed. |
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, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBounds, getPathForLocation, getPathForRow, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, 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, setDropMode, 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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, 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 |
Methods inherited from interface leon.view.win.swing.component.LySplittableCanvas |
---|
getKeyListeners, getMouseListeners, getMouseMotionListeners |
Field Detail |
---|
public static final java.lang.String __VERSION
public static java.awt.Cursor LY_OVER_CURSOR
Constructor Detail |
---|
public LyJTreeComponent(LyJTreeElement root)
root
- the data this tree displayspublic LyJTreeComponent(LyJTreeElement root, boolean dragNDrop)
root
- the data this tree displaysdragNDrop
- Indicates that drag and drop is allowed on this component.public LyJTreeComponent(LyJTreeElement root, boolean dragNDrop, boolean forceOpen)
root
- the data this tree displaysdragNDrop
- Indicates that drag and drop is allowed on this component.forceOpen
- Indicates that the nodes must be opened.Method Detail |
---|
public void setCheckboxMode(boolean checkboxMode)
checkboxMode
- the checkbox modepublic void setSensitive(boolean sensitive)
sensitive
- Indicates that the tree is sensitive.public void setPopupMode(boolean popup)
popup
- Indicates that the tree is in a popup.public void setForceOpen(boolean forceOpen)
forceOpen
- Indicates that all the nodes of this tree must be opened.public void setMinWidth(int minWidth)
minWidth
- the new minimum widthpublic void setNRows(int nRows)
nRows
- the number of row to display. Use -1 for standard behavior.public void setHeightFactor(float factor)
factor
- the factor to use to compute the height of the rows.getHeightFactor()
public float getHeightFactor()
setHeightFactor(float)
public void centerOnElement(javax.swing.tree.TreePath path)
path
- the node to center the elementpublic void setFixedWidth(int fixedWidth)
fixedWidth
- the new fixed width of the treepublic java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface javax.swing.Scrollable
getPreferredScrollableViewportSize
in class javax.swing.JTree
Scrollable.getPreferredScrollableViewportSize()
public void updateTree(LyJTreeElement node)
node
- the root of the sub-tree that is updatedpublic void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
Component.setFont(java.awt.Font)
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
JComponent.paintComponent(java.awt.Graphics)
public void setSelectLeavesOnly(boolean selectLeavesOnly)
selectLeavesOnly
- Indicates that the select leaves only mode must be set or unset.public boolean isNotifySelections()
public void setNotifySelections(boolean notify)
notify
- Indicates whether that selection events are notify or not.public void setDisplayDefaultIcons(boolean displayDefaultIcons)
displayDefaultIcons
- Indicates that the default display icons mode must be set or
unset.public void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
in interface javax.swing.event.TreeSelectionListener
TreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)
public javax.swing.tree.TreePath[] getSelectionPaths()
getSelectionPaths
in class javax.swing.JTree
JTree.getSelectionPaths()
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
public void setPopupMenu(javax.swing.JPopupMenu popupMenu)
popupMenu
- the popup menu instance displayed on the tree component.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
MouseListener.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
MouseListener.mouseExited(java.awt.event.MouseEvent)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
MouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
treeCollapsed
in interface javax.swing.event.TreeExpansionListener
TreeExpansionListener.treeCollapsed(javax.swing.event.TreeExpansionEvent)
public void treeExpanded(javax.swing.event.TreeExpansionEvent event)
treeExpanded
in interface javax.swing.event.TreeExpansionListener
TreeExpansionListener.treeExpanded(javax.swing.event.TreeExpansionEvent)
public void actionPerformed(LyActionEvent actionEvent)
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)
public void selectionPerformed(LySelectionEvent selectionEvent)
selectionPerformed
in interface LySelectionListener
selectionEvent
- description of the selection which has occuredLySelectionListener.selectionPerformed(leon.view.event.LySelectionEvent)
public LyActionTransmitter getActionTransmitter()
getActionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
getSelectionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getSelectionTransmitter()
public void setIdle(boolean status)
setIdle
in interface LySetIdleInterface
status
- new idle status (LySetIdleInterface interface)LySetIdleInterface.setIdle(boolean)
public boolean isIdle()
isIdle
in interface LyIsIdleInterface
LyIsIdleInterface.isIdle()
public void drawInSplitter(java.awt.Graphics gc, int xOffset, int yOffset)
drawInSplitter
in interface LySplittableCanvas
gc
- the graphical contextxOffset
- the horizontal offset for the splitter drawingyOffset
- the vertical offset for the splitter drawingLySplittableCanvas.drawInSplitter(java.awt.Graphics, int,
int)
public int getWidth()
getWidth
in class javax.swing.JComponent
Component.getWidth()
public int getHeight()
getHeight
in class javax.swing.JComponent
Component.getHeight()
public void setCanvasSplitter(LyAbstractCanvasSplitterManager splitter)
setCanvasSplitter
in interface LySplittableCanvas
splitter
- the splitterLySplittableCanvas.setCanvasSplitter(leon.view.win.swing.component.LyAbstractCanvasSplitterManager)
public java.awt.Dimension getScrollableSize()
getScrollableSize
in interface LySplittableCanvas
LySplittableCanvas.getScrollableSize()
public int getTopHeaderHeight()
getTopHeaderHeight
in interface LySplittableCanvas
LySplittableCanvas.getTopHeaderHeight()
public int getLeftHeaderWidth()
getLeftHeaderWidth
in interface LySplittableCanvas
LySplittableCanvas.getLeftHeaderWidth()
public void keyTyped(java.awt.event.KeyEvent evt)
keyTyped
in interface java.awt.event.KeyListener
KeyListener.keyTyped(java.awt.event.KeyEvent)
public void keyReleased(java.awt.event.KeyEvent evt)
keyReleased
in interface java.awt.event.KeyListener
KeyListener.keyReleased(java.awt.event.KeyEvent)
public void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
KeyListener.keyPressed(java.awt.event.KeyEvent)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |