public class TextEntryComponent extends AbstractGuiComponent implements FocusTarget, ColoredComponent
| Modifier and Type | Field and Description |
|---|---|
static KeyActionListener |
BACKSPACE |
static KeyActionListener |
DELETE |
static KeyActionListener |
DOC_END |
static KeyActionListener |
DOC_HOME |
static KeyActionListener |
FOCUS_DOWN |
static KeyActionListener |
FOCUS_NEXT |
static KeyActionListener |
FOCUS_PREVIOUS |
static KeyActionListener |
FOCUS_UP |
static KeyActionListener |
LEFT |
static KeyActionListener |
LINE_END |
static KeyActionListener |
LINE_HOME |
static KeyActionListener |
NEW_LINE |
static KeyActionListener |
NEXT_LINE |
static KeyActionListener |
NO_OP |
static KeyActionListener |
PREV_LINE |
static KeyActionListener |
RIGHT |
| Constructor and Description |
|---|
TextEntryComponent(com.jme3.font.BitmapFont font) |
TextEntryComponent(DocumentModel model,
com.jme3.font.BitmapFont font) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(GuiControl parent) |
void |
calculatePreferredSize(com.jme3.math.Vector3f size) |
TextEntryComponent |
clone() |
void |
detach(GuiControl parent) |
void |
focusGained()
Notifies this focus target that is has gained focus.
|
void |
focusLost()
Notifies this focus target that is has lost focus.
|
java.util.Map<KeyAction,KeyActionListener> |
getActionMap() |
float |
getAlpha()
Returns the current alpha multiplier that is applied
to the color when set to the actual visuals.
|
com.jme3.math.ColorRGBA |
getColor()
Returns the current color of this component.
|
float |
getCursorWidth() |
DocumentModel |
getDocumentModel() |
com.jme3.font.BitmapFont |
getFont() |
float |
getFontSize() |
HAlignment |
getHAlignment() |
java.lang.Float |
getPreferredCursorWidth() |
float |
getPreferredLineCount() |
com.jme3.math.Vector3f |
getPreferredSize() |
float |
getPreferredWidth() |
java.lang.String |
getText() |
VAlignment |
getVAlignment() |
protected float |
getVisibleWidth(java.lang.String text) |
boolean |
isFocusable()
Returns true if this target can currently accept
focus through a normal transition.
|
boolean |
isFocused()
Returns true if this focus target currently has the focus.
|
boolean |
isSingleLine() |
protected void |
resetAlignment() |
protected void |
resetCursorColor() |
protected void |
resetCursorPosition() |
protected void |
resetCursorState() |
protected void |
resetText() |
void |
reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size) |
protected void |
resizeCursor() |
void |
setAlpha(float f)
Sets an alpha multiplier that will be applied to the
color when set to the actual visuals.
|
void |
setColor(com.jme3.math.ColorRGBA color)
Sets the color for this component.
|
void |
setFont(com.jme3.font.BitmapFont font) |
void |
setFontSize(float f) |
void |
setHAlignment(HAlignment a) |
void |
setPreferredCursorWidth(java.lang.Float f) |
void |
setPreferredLineCount(int i) |
void |
setPreferredSize(com.jme3.math.Vector3f v) |
void |
setPreferredWidth(float f) |
void |
setSingleLine(boolean f) |
void |
setText(java.lang.String text) |
void |
setVAlignment(VAlignment a) |
getGuiControl, getNode, invalidate, isAttachedpublic static final KeyActionListener DOC_HOME
public static final KeyActionListener DOC_END
public static final KeyActionListener LINE_HOME
public static final KeyActionListener LINE_END
public static final KeyActionListener PREV_LINE
public static final KeyActionListener NEXT_LINE
public static final KeyActionListener LEFT
public static final KeyActionListener RIGHT
public static final KeyActionListener NO_OP
public static final KeyActionListener BACKSPACE
public static final KeyActionListener NEW_LINE
public static final KeyActionListener DELETE
public static final KeyActionListener FOCUS_NEXT
public static final KeyActionListener FOCUS_PREVIOUS
public static final KeyActionListener FOCUS_DOWN
public static final KeyActionListener FOCUS_UP
public TextEntryComponent(com.jme3.font.BitmapFont font)
public TextEntryComponent(DocumentModel model, com.jme3.font.BitmapFont font)
public TextEntryComponent clone()
clone in interface GuiComponentclone in class AbstractGuiComponentpublic void attach(GuiControl parent)
attach in interface GuiComponentattach in class AbstractGuiComponentpublic void detach(GuiControl parent)
detach in interface GuiComponentdetach in class AbstractGuiComponentpublic boolean isFocused()
FocusTargetisFocused in interface FocusTargetpublic boolean isFocusable()
FocusTargetisFocusable in interface FocusTargetpublic void focusGained()
FocusTargetfocusGained in interface FocusTargetpublic void focusLost()
FocusTargetfocusLost in interface FocusTargetpublic java.util.Map<KeyAction,KeyActionListener> getActionMap()
public DocumentModel getDocumentModel()
public void setSingleLine(boolean f)
public boolean isSingleLine()
public void setFont(com.jme3.font.BitmapFont font)
public com.jme3.font.BitmapFont getFont()
public void setFontSize(float f)
public float getFontSize()
protected void resetCursorColor()
public void setColor(com.jme3.math.ColorRGBA color)
ColoredComponentsetColor in interface ColoredComponentpublic com.jme3.math.ColorRGBA getColor()
ColoredComponentgetColor in interface ColoredComponentpublic void setAlpha(float f)
ColoredComponentsetAlpha in interface ColoredComponentpublic float getAlpha()
ColoredComponentgetAlpha in interface ColoredComponentprotected void resetText()
protected float getVisibleWidth(java.lang.String text)
public void setPreferredCursorWidth(java.lang.Float f)
public java.lang.Float getPreferredCursorWidth()
public float getCursorWidth()
protected void resizeCursor()
protected void resetCursorState()
protected void resetCursorPosition()
public void setText(java.lang.String text)
public java.lang.String getText()
public void setHAlignment(HAlignment a)
public HAlignment getHAlignment()
public void setVAlignment(VAlignment a)
public VAlignment getVAlignment()
public void setPreferredSize(com.jme3.math.Vector3f v)
public com.jme3.math.Vector3f getPreferredSize()
public void setPreferredWidth(float f)
public float getPreferredWidth()
public void setPreferredLineCount(int i)
public float getPreferredLineCount()
public void reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size)
reshape in interface GuiComponentpublic void calculatePreferredSize(com.jme3.math.Vector3f size)
calculatePreferredSize in interface GuiComponentprotected void resetAlignment()