Package com.ardor3d.extension.ui
Class UITextField
- All Implemented Interfaces:
UIKeyHandler
,Textable
,Hintable
,Savable
- Direct Known Subclasses:
UIPasswordField
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.extension.ui.AbstractUITextEntryComponent
AbstractUITextEntryComponent.DefaultTextEntryState
-
Field Summary
Fields inherited from class com.ardor3d.extension.ui.AbstractUITextEntryComponent
_alignment, _caret, _caretPosition, _copyable, _defaultState, _disabledState, _editable, _selection, _styled, _uiText, _writingState
Fields inherited from class com.ardor3d.extension.ui.UIComponent
_tooltipPopTime, _tooltipText, DEFAULT_FOREGROUND_COLOR
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionListener
(ActionListener listener) Add the specified listener to this button's list of listeners notified when pressed.void
Delete any currently selected text.protected void
Draw this component's contents using the given renderer.void
Notifies all of this field's registered listenersprotected UIKeyHandler
boolean
removeActionListener
(ActionListener listener) Remove the given listener from the notification list.void
Removes all of this field's listeners from notification list.int
setCaretPosition
(int index) Set the position of the text caret as an index to the current set text string.void
setKeyHandler
(UIKeyHandler handler) void
updateGeometricState
(double time, boolean initiator) updateGeometricState
updates all the geometry information for the node.Methods inherited from class com.ardor3d.extension.ui.AbstractUITextEntryComponent
clearSelection, fireStyleChanged, getAlignment, getCaret, getCaretPosition, getDefaultState, getDisabledState, getSelection, getSelectionLength, getStates, getText, getWritingState, isCopyable, isEditable, isStyledText, setAlignment, setCopyable, setEditable, setStyledText, setText, updateMinimumSizeFromContents
Methods inherited from class com.ardor3d.extension.ui.StateBasedUIComponent
gainedFocus, getCurrentState, keyHeld, keyPressed, keyReleased, lostFocus, mouseDeparted, mouseEntered, mouseMoved, mousePressed, mouseReleased, mouseWheel, refreshState, setEnabled, setForegroundColor, switchState
Methods inherited from class com.ardor3d.extension.ui.UIComponent
addFontStyle, applySkin, attachedToHud, cancelTooltipTimer, centerOn, centerOn, clearFontStyle, clearMaximumContentSize, clearMinimumContentSize, compact, detachedFromHud, draw, fireComponentDirty, fitComponentIn, getBackdrop, getBorder, getCombinedOpacity, getContentHeight, getContentWidth, getCurrentOpacity, getDefaultFontFamily, getDefaultFontSize, getDefaultFontStyles, getFontStyles, getForegroundColor, getHud, getHudX, getHudY, getKeyFocusTarget, getLayoutData, getLocalComponentHeight, getLocalComponentWidth, getLocalFontStyles, getLocalForegroundColor, getLocalOpacity, getLocalX, getLocalY, getMargin, getMaximumContentHeight, getMaximumContentWidth, getMaximumLocalComponentHeight, getMaximumLocalComponentWidth, getMinimumContentHeight, getMinimumContentWidth, getMinimumLocalComponentHeight, getMinimumLocalComponentWidth, getPadding, getRelativeComponentBounds, getRelativeMaxComponentBounds, getRelativeMinComponentBounds, getTooltipPopTime, getTooltipText, getTopLevelComponent, getTotalBottom, getTotalLeft, getTotalRight, getTotalTop, getUIComponent, hasVirginContentArea, insideMargin, isAttachedToHUD, isConsumeKeyEvents, isConsumeMouseEvents, isEnabled, isUseTransparency, isVisible, layout, mouseClicked, pack, postdrawComponent, predrawComponent, requestFocus, setBackdrop, setBorder, setConsumeKeyEvents, setConsumeMouseEvents, setContentHeight, setContentSize, setContentWidth, setDefaultFontFamily, setDefaultFontSize, setDefaultFontStyles, setFontStyles, setForegroundColor, setHudX, setHudXY, setHudY, setKeyFocusTarget, setLayoutData, setLayoutMinimumContentSize, setLocalComponentHeight, setLocalComponentSize, setLocalComponentWidth, setLocalX, setLocalXY, setLocalY, setMargin, setMaximumContentHeight, setMaximumContentSize, setMaximumContentWidth, setMinimumContentHeight, setMinimumContentSize, setMinimumContentWidth, setOpacity, setPadding, setTooltipPopTime, setTooltipText, setUseTransparency, setVirginContentArea, setVisible, updateWorldTransform, updateWorldTransform, validateContentSize
Methods inherited from class com.ardor3d.scenegraph.Node
acceptVisitor, attachChild, attachChildAt, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getClassTag, getNumberOfChildren, hasChild, makeCopy, makeInstanced, propagateDirtyDown, read, sortLights, swapChildren, updateChildren, updateWorldBound, updateWorldRenderStates, write
Methods inherited from class com.ardor3d.scenegraph.Spatial
addController, addTranslation, addTranslation, applyWorldRenderStates, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateControllers, updateGeometricState, updateWorldRenderStates, worldToLocal
-
Field Details
-
_caretLoc
-
-
Constructor Details
-
UITextField
public UITextField()
-
-
Method Details
-
setCaretPosition
public int setCaretPosition(int index) Description copied from class:AbstractUITextEntryComponent
Set the position of the text caret as an index to the current set text string. If the specified position is after the last possible index, it is set to the last possible index.- Overrides:
setCaretPosition
in classAbstractUITextEntryComponent
- Parameters:
index
- the new position- Returns:
- the new caret position
-
deleteSelectedText
public void deleteSelectedText()Delete any currently selected text. -
getKeyHandler
- Specified by:
getKeyHandler
in classAbstractUITextEntryComponent
-
setKeyHandler
-
addActionListener
Add the specified listener to this button's list of listeners notified when pressed.- Parameters:
listener
- the listener
-
removeActionListener
Remove the given listener from the notification list.- Parameters:
listener
- the listener- Returns:
true
if the listener has been effectively removed
-
removeAllListeners
public void removeAllListeners()Removes all of this field's listeners from notification list. -
fireActionEvent
public void fireActionEvent()Notifies all of this field's registered listeners -
updateGeometricState
public void updateGeometricState(double time, boolean initiator) Description copied from class:Spatial
updateGeometricState
updates all the geometry information for the node.- Overrides:
updateGeometricState
in classSpatial
- Parameters:
time
- The time in seconds between the last two consecutive frames (time per frame). SeeReadOnlyTimer.getTimePerFrame()
initiator
- true if this node started the update process.
-
drawComponent
Description copied from class:UIComponent
Draw this component's contents using the given renderer.- Overrides:
drawComponent
in classUIComponent
- Parameters:
r
- the renderer
-