public class TreeViewBodyGuiImpl extends TreeBodyGuiImpl
disabledFore, gc, gd, gf, selectionBack, selectionFore, theme, tree
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
TreeViewBodyGuiImpl(TreeGuiImpl treeView)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int |
calcMaxNodesWidth(java.util.List<TreeGuiImpl.TreeNode> nodes,
int maxWidth,
int level)
Calculates the max width recursively.
|
private int |
calcNodeWidth(TreeGuiImpl.TreeNode node,
int level)
Calculates width of a single node.
|
void |
draw()
Draws this component.
|
private void |
fireMouseEvent(java.awt.event.MouseEvent e,
int evCode)
Set mouse-related info in config and trigger mouse event.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Notification of a mouse entered event occurred for this widget.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Notification of a mouse pressed event occurred for this widget.
|
boolean |
updateHScrollModel()
Update the horizontal scrolling model based on this object geometry and contents.
|
dimension, getId, getNodeHeight, getNodeInView, height, hitTest, minimumSize, modelChanged, mouseActions, mouseClicked, mouseDragged, mouseExited, mouseReleased, mouseWheelMoved, nodesInView, oleDoDrop, oleDragging, oleStartDragging, processKeyEvent, setViewportHeight, setViewportWidth, updateColors, updateHScrollModel, updateVScrollModel, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseEntered, moveToBottom, moveToTop, name, navigable, oleDrag, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChange, refresh, registerWidgetStateListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, unregisterWidgetStateListener, updateSizeWorker, widgetStateChanged, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setViewportDimensions
canMovetoTop, defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, getTriggerWidget, getTriggerWidget, hasFocus, ignoreEnable, isDirectManipulable, isDroppable, isInitialValueLayout, isLegacyFocus, maySwitchFocus, parent, refreshWidget, requestFocus, requestFocus, systemFocusGrabbed, validateDisplayValue
public TreeViewBodyGuiImpl(TreeGuiImpl treeView)
treeView
- The owning tree view.public void draw()
draw
in interface Widget<GuiOutputManager>
draw
in class TreeBodyGuiImpl
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class TreeBodyGuiImpl
e
- The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class TreeBodyGuiImpl
e
- The mouse event.private final void fireMouseEvent(java.awt.event.MouseEvent e, int evCode)
e
- the input mouse eventevCode
- the event code to sendpublic boolean updateHScrollModel()
true
if model was changed as the result of the call.private int calcMaxNodesWidth(java.util.List<TreeGuiImpl.TreeNode> nodes, int maxWidth, int level)
nodes
- Nodes to include in the calculation, must not be null
maxWidth
- Current max width.level
- Current level.private int calcNodeWidth(TreeGuiImpl.TreeNode node, int level)
node
- The node to calculate.level
- Node tree level.