public class IFTextField extends Object
Constructor and Description |
---|
IFTextField(String newLabel,
int newX,
int newY)
creates an empty IFTextField with the specified label, with specified position, and a default width of 100 pixels.
|
IFTextField(String argLabel,
int argX,
int argY,
int argWidth)
creates an empty IFTextField with the specified label and with specified position and width.
|
IFTextField(String argLabel,
int argX,
int argY,
int argWidth,
String newValue)
creates an IFTextField with the specified label, with specified position and width, and with specified contents.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(GUIEvent e) |
void |
addActionListener(Object newListener) |
boolean |
canReceiveFocus() |
void |
draw()
draws the text field, contents, selection, and cursor
to the screen.
|
void |
fireEventNotification(interfascia.GUIComponent argComponent,
String argMessage) |
int |
getAbsoluteX() |
int |
getAbsoluteY() |
GUIController |
getController() |
int |
getCursorPosition() |
int |
getEndSelect() |
int |
getHeight() |
int |
getIndex() |
String |
getLabel() |
IFLookAndFeel |
getLookAndFeel() |
int |
getStartSelect() |
String |
getValue()
returns the string that is displayed in the text area.
|
int |
getVisiblePortionEnd() |
int |
getVisiblePortionStart() |
int |
getWidth() |
int |
getX() |
int |
getY() |
void |
initWithParent() |
boolean |
isMouseOver(int mouseX,
int mouseY) |
void |
keyEvent(processing.event.KeyEvent e)
receives KeyEvents forwarded to it by the GUIController
if the current instance is currently in focus.
|
void |
mouseEvent(processing.event.MouseEvent e)
implemented to conform to Processing's mouse event handler
requirements.
|
void |
setController(GUIController c) |
void |
setCursorPosition(int CursorPos) |
void |
setEndSelect(int EndSelect) |
void |
setHeight(int newHeight) |
void |
setIndex(int i) |
void |
setLabel(String argLabel) |
void |
setLookAndFeel(IFLookAndFeel lf) |
void |
setPosition(int newX,
int newY) |
void |
setSize(int newWidth,
int newHeight) |
void |
setStartSelect(int StartSelect) |
void |
setValue(String newValue)
sets the contents of the text box and displays the
specified string in the text box widget.
|
void |
setVisiblePortionEnd(int VisiblePortionEnd) |
void |
setVisiblePortionStart(int VisiblePortionStart) |
void |
setWidth(int newWidth) |
void |
setX(int newX) |
void |
setY(int newY) |
void |
update(int argX,
int argY) |
static boolean |
validUnicode(char b) |
public IFTextField(String newLabel, int newX, int newY)
argLabel
- the text field's labelargX
- the text field's X location on the screen, relative to the PApplet.argY
- the text filed's Y location on the screen, relative
to the PApplet.public IFTextField(String argLabel, int argX, int argY, int argWidth)
argLabel
- the text field's labelargX
- the text field's X location on the screen, relative to the PApplet.argY
- the text filed's Y location on the screen, relative to the PApplet.argWidth
- the text field's widthpublic IFTextField(String argLabel, int argX, int argY, int argWidth, String newValue)
argLabel
- the text field's labelargX
- the text field's X location on the screen, relative to the PApplet.argY
- the text filed's Y location on the screen, relative to the PApplet.argWidth
- the text field's widthargContents
- the default contents of the text fieldpublic static boolean validUnicode(char b)
public void initWithParent()
public int getVisiblePortionStart()
public void setVisiblePortionStart(int VisiblePortionStart)
public int getVisiblePortionEnd()
public void setVisiblePortionEnd(int VisiblePortionEnd)
public int getStartSelect()
public void setStartSelect(int StartSelect)
public int getEndSelect()
public void setEndSelect(int EndSelect)
public int getCursorPosition()
public void setCursorPosition(int CursorPos)
public void setValue(String newValue)
val
- the string to become the text field's contentspublic String getValue()
public void mouseEvent(processing.event.MouseEvent e)
e
- the MouseEvent to handlepublic void keyEvent(processing.event.KeyEvent e)
e
- the KeyEvent to be handledpublic void draw()
public void actionPerformed(GUIEvent e)
public void setIndex(int i)
public int getIndex()
public void update(int argX, int argY)
public void setController(GUIController c)
public GUIController getController()
public void setLookAndFeel(IFLookAndFeel lf)
public IFLookAndFeel getLookAndFeel()
public String getLabel()
public void setLabel(String argLabel)
public boolean canReceiveFocus()
public int getWidth()
public void setWidth(int newWidth)
public int getHeight()
public void setHeight(int newHeight)
public void addActionListener(Object newListener)
public void setSize(int newWidth, int newHeight)
public void setPosition(int newX, int newY)
public void setX(int newX)
public int getX()
public int getAbsoluteX()
public void setY(int newY)
public int getY()
public int getAbsoluteY()
public void fireEventNotification(interfascia.GUIComponent argComponent, String argMessage)
public boolean isMouseOver(int mouseX, int mouseY)
Processing Library interfascia by Brendan Berg. (c) 2015