public class TreeListCaptionItem extends AbstractWidget<GuiOutputManager>
| Modifier and Type | Field and Description |
|---|---|
private static ArrowsWidget |
arrowsWidget
Widget with two arrows to show the column target position when column header is dragged
|
private static boolean |
atResizeEdge
Mouse cursor is at caption item resize edge
|
(package private) TreeListGuiImpl.ColumnCache |
column
The column this caption item wraps up
|
private boolean |
columnSelectedForMove
Column is selected with mouse button press for possible dragging.
|
private static int |
columnWidthAtMouseDown
The column width when the caption drag begins
|
private OverlayWindow |
dragWindow
Ghost window with the dragged caption item widget copy.
|
private GuiColorResolver |
gc
Color resolver
|
private GuiDriver<?,?> |
gd
GUI driver
|
private static TreeListCaptionItem |
ghostCaptionItem
Caption item being dragged during column move
|
private WidgetId |
id
Widget id
|
private static int |
lastMouseDownX
The last mouse down event X coordinate
|
private static int |
lastMouseDownY
The last mouse down event Y coordinate
|
private static int |
MIN_WIDTH
Min widget width
|
private static int |
RESIZE_EDGE_WIDTH
Column resize edge size
|
private ClassicTheme |
theme
UI theme
|
private TreeListGuiImpl |
tree
Owning tree
|
insets, listeners, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
TreeListCaptionItem(TreeListGuiImpl tree,
TreeListGuiImpl.ColumnCache column)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private static int |
centerX(Widget w)
Get X coordinate of widget center.
|
Dimension |
dimension()
Get widget dimension.
|
private void |
dragRelease()
Destroy dragging widgets and windows and clear dragging artifacts
|
void |
draw()
Draw widget.
|
private Widget |
findTargetCaptionItem(int xDistance)
Find the caption item widget at the given X position.
|
WidgetId |
getId()
Widget ID.
|
double |
height()
Get widget height.
|
private boolean |
isAtResizeEdge(java.awt.event.MouseEvent e)
Checks whether the mouse event location is at the item resize edge.
|
Dimension |
minimumSize()
Get widget minimum size.
|
protected int[] |
mouseActions()
Sub-classes will override this to return a list of mouse actions on which the widget
responds.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Notification of a mouse dragged event occurred for this widget.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Notification of a mouse exited event occurred for this widget.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Notification of a mouse moved event occurred for this widget.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Notification of a mouse pressed event occurred for this widget.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Notification of a mouse released event occurred for this widget.
|
double |
width()
Get widget 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, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseClicked, mouseEntered, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChanged, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalDimensionInt, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, triggerLocationChanged, unrealize, unregisterWidgetListener, updateSizeWorker, updateSystemParent, widgetRealized, widgetStateChanged, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptsEscAsAnyKey, acceptTrigger, canMovetoTop, completeTrigger, defaultMousePtr, enforceDefaultMousePtr, getIdForTrigger, getLegacyWidget, getTriggerWidget, getTriggerWidget, hasFocus, ignoreEnable, isCurrent, isDirectManipulable, isDroppable, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, maySwitchFocus, parent, refreshWidget, requestFocus, requestFocus, startTrigger, systemFocusGrabbed, validateDisplayValuefinal TreeListGuiImpl.ColumnCache column
private boolean columnSelectedForMove
private OverlayWindow dragWindow
private final GuiColorResolver gc
private final GuiDriver<?,?> gd
private WidgetId id
private final ClassicTheme theme
private final TreeListGuiImpl tree
private static ArrowsWidget arrowsWidget
private static boolean atResizeEdge
private static int columnWidthAtMouseDown
private static TreeListCaptionItem ghostCaptionItem
private static int lastMouseDownX
private static int lastMouseDownY
private static final int MIN_WIDTH
private static final int RESIZE_EDGE_WIDTH
public TreeListCaptionItem(TreeListGuiImpl tree, TreeListGuiImpl.ColumnCache column)
tree - The owning tree widget.column - Cached column info.private static final int centerX(Widget w)
w - the widgetpublic Dimension dimension()
dimension in interface Widget<GuiOutputManager>dimension in class AbstractWidget<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class AbstractWidget<GuiOutputManager>public WidgetId getId()
getId in interface Widget<GuiOutputManager>getId in class AbstractWidget<GuiOutputManager>public double height()
height in interface Widget<GuiOutputManager>height in class AbstractWidget<GuiOutputManager>public Dimension minimumSize()
minimumSize in interface Widget<GuiOutputManager>minimumSize in class AbstractWidget<GuiOutputManager>public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractWidget<GuiOutputManager>e - The mouse event.public double width()
width in interface Widget<GuiOutputManager>width in class AbstractWidget<GuiOutputManager>protected final int[] mouseActions()
MouseEvent codes and P2J specific
MouseEvt actions.mouseActions in class AbstractWidget<GuiOutputManager>private final void dragRelease()
private final Widget findTargetCaptionItem(int xDistance)
xDistance - the distance the mouse was dragged horizontally since it was pressedprivate boolean isAtResizeEdge(java.awt.event.MouseEvent e)
e - Mouse event.true when at resize edge.