protected static class TreeGuiImpl.TreeEditor extends BorderedPanelGuiImpl
Modifier and Type | Field and Description |
---|---|
private boolean |
activated
The editor is enabled and visible
|
private CoordinatesConversion |
cc
Coordinate converter
|
private TreeGuiImpl.TreeNode |
editedNode
The related node
|
private FillInGuiImpl |
editor
The node editor
|
private int |
heightInPixels |
private java.lang.Runnable |
onHideCallback
The callback executed when hide() is executed
|
private TreeGuiImpl |
owner
The parent container
|
private java.util.function.Consumer<java.lang.String> |
valueConsumer
The consumer of the edited value
|
private int |
widthInPixels |
border
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
TreeEditor(GuiDriver<?,?> gd,
GuiOutputManager screen,
CoordinatesConversion cc,
TreeGuiImpl owner,
java.util.function.Consumer<java.lang.String> valueConsumer,
java.lang.Runnable onHideCallback,
GuiColorResolver colorResolver,
GuiFontResolver fontResolver)
Creates the tree node editor.
|
Modifier and Type | Method and Description |
---|---|
private void |
activateEditor(int x,
int y,
int width,
int height,
java.lang.String value)
Activates the tree node editor.
|
Widget<GuiOutputManager> |
currentFocus()
Returns the widget that has the current focus.
|
void |
deactivateEditor()
Deactivates the tree node editor.
|
Widget<GuiOutputManager> |
defaultFocus()
Returns the widget that has the current focus by default.
|
Dimension |
dimension()
Calculates the size of this widget in character units.
|
void |
drawEditor()
Draws the tree node editor.
|
Widget<GuiOutputManager> |
getLegacyWidget()
Returns the editor's fill-in.
|
double |
height()
Returns the height of this widget.
|
void |
hide()
Hide this widget and remove it.
|
boolean |
isEditorActivated()
Tests if the tree editor is activated.
|
void |
processKeyEvent(KeyInput event)
Intercepts the key event for the editor fillin widget.
|
void |
show()
Shows this widget.
|
double |
width()
Returns the width of this widget.
|
draw, drawPanel, getId, is3DBorder, isRMBEntrySupported, set3DBorder, setColorResolver, setCustomDraw, setId, setOptionalDraw
border, insets, isTransparent, setBorder, setTransparent
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, deregisterSelectedWidget, destroy, detach, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, 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, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, 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, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, 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, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unregisterWidgetStateListener, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
widgetsAsList
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, config, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hidden, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isDirectManipulable, isDirectManipulationActive, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isRealized, isRepaintDisabled, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetStateListener, validateDisplayValue, window
private boolean activated
private final CoordinatesConversion cc
private TreeGuiImpl.TreeNode editedNode
private FillInGuiImpl editor
private int heightInPixels
private final java.lang.Runnable onHideCallback
private final TreeGuiImpl owner
private final java.util.function.Consumer<java.lang.String> valueConsumer
private int widthInPixels
public TreeEditor(GuiDriver<?,?> gd, GuiOutputManager screen, CoordinatesConversion cc, TreeGuiImpl owner, java.util.function.Consumer<java.lang.String> valueConsumer, java.lang.Runnable onHideCallback, GuiColorResolver colorResolver, GuiFontResolver fontResolver)
gd
- The GUI driver instancescreen
- The GUI output managercc
- The coordinates conversionowner
- The tree ownervalueConsumer
- The value connsumeronHideCallback
- The hide callback methodcolorResolver
- The color resolverfontResolver
- The font resolverprivate final void activateEditor(int x, int y, int width, int height, java.lang.String value)
x
- The relative horizontal position of the editor in pixels.y
- The relative vertical position of the editor in pixels.width
- The editor's width given in pixelsheight
- The editor's height given in pixelsvalue
- The editor's initial value.public Widget<GuiOutputManager> currentFocus()
currentFocus
in interface Container<GuiOutputManager>
currentFocus
in class AbstractContainer<GuiOutputManager>
public void deactivateEditor()
public Widget<GuiOutputManager> defaultFocus()
defaultFocus
in interface Container<GuiOutputManager>
defaultFocus
in class AbstractContainer<GuiOutputManager>
public Dimension dimension()
dimension
in interface Widget<GuiOutputManager>
dimension
in class AbstractContainer<GuiOutputManager>
public void drawEditor()
public Widget<GuiOutputManager> getLegacyWidget()
null
if none found.public double height()
height
in interface Widget<GuiOutputManager>
height
in class AbstractContainer<GuiOutputManager>
public void hide()
hide
in interface Widget<GuiOutputManager>
hide
in class AbstractWidget<GuiOutputManager>
public final boolean isEditorActivated()
public void processKeyEvent(KeyInput event)
processKeyEvent
in interface Widget<GuiOutputManager>
processKeyEvent
in class AbstractContainer<GuiOutputManager>
event
- The key input eventpublic void show()
show
in interface Widget<GuiOutputManager>
show
in class AbstractWidget<GuiOutputManager>
public double width()
width
in interface Widget<GuiOutputManager>
width
in class AbstractContainer<GuiOutputManager>