public class MultilineTextbox extends VScrollContainer
Control.Constants, Control.ImageMode, Control.Predicate, Control.Predicate1<T>, Control.Predicate2<T,U>, Control.RenderingMethod, Control.Setter<T>FONT_SIZE, LINE_HEIGHT, TEXT_ALIGN, TEXT_ALIGN_Y, TEXT_COLORALL, ANCHOR_INACTIVE, AUTOSIZE_BOTH, AUTOSIZE_HEIGHT, AUTOSIZE_NONE, AUTOSIZE_WIDTH, BACKGROUND_COLOR, BACKGROUND_COLORS, BORDER, BORDER_COLOR, BORDER_RADIUS, BORDER_WIDTH, BUFFERED_RENDERING, COLORS, defaultRenderingMethod, FILL, FIT, FIT_INSIDE, FOREGROUND_COLOR, HOVER_COLOR, MARGIN, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, name, OPACITY, PADDING, PADDING_BOTTOM, PADDING_LEFT, PADDING_RIGHT, PADDING_TOP, PERCENTAGE_MODE, PIXEL_MODE, PRESSED_COLOR, SPACING, TEXT_PROPERTIES, UNBUFFERED_RENDERING| Constructor and Description |
|---|
MultilineTextbox() |
MultilineTextbox(int width,
int height) |
MultilineTextbox(int width,
int height,
int fontSize) |
MultilineTextbox(java.lang.String hint,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy()
Copy selection to clipboard
|
void |
cut()
Cut selection and copy to clipboard
|
void |
disableInput()
Prevent user from typing or pasting text while maintaining the ability of selecting and copying.
|
void |
enableInput()
Undo
disableInput() |
boolean |
getClickSetsCursor() |
int |
getCursorColor() |
int |
getCursorPosition() |
java.lang.String |
getHint() |
java.lang.String |
getSelection() |
int |
getSelectionColor() |
int |
getSelectionEnd() |
int |
getSelectionStart() |
void |
paste()
Paste from clipboard (and delete selection)
|
void |
removeKeyPressListener() |
void |
removeTextChangeListener() |
void |
setClickSetsCursor(boolean clickSetsCursor)
if false then clicking on the Textbox does not set the cursor to where the user clicked.
|
void |
setCursorColor(int cursorColor)
Set the color of the cursor.
|
void |
setCursorPosition(int cursorPosition)
Set the cursor to a specific index position in the text.
|
void |
setFontSize(float fontSize)
Set the font size for the displayed text.
|
void |
setHint(java.lang.String hint)
Set a hint for the textbox that is displayed when the textbox is empty.
|
void |
setKeyPressListener(Control.Predicate lambda)
Set a lambda key listener to the textbox.
|
void |
setKeyPressListener(Control.Predicate1<KeyEvent> lambda)
Set a lambda key listener to the textbox.
|
void |
setKeyPressListener(java.lang.String methodName) |
void |
setKeyPressListener(java.lang.String methodName,
java.lang.Object target)
Set a key listener to the textbox.
|
void |
setPadding(int all)
Apply same padding to all sides
|
void |
setPadding(int top_bottom,
int left_right) |
void |
setPadding(int top,
int right,
int bottom,
int left)
Apply individual padding to all sides of the element.
|
void |
setPaddingLeft(int left) |
void |
setPaddingRight(int right) |
void |
setSelection(int start,
int end)
Set selection.
|
void |
setSelectionColor(int selectionColor)
Set highlight color of selection
|
void |
setSelectionEnd(int selectionEnd)
Set the end for the text selection.
|
void |
setSelectionStart(int selectionStart)
Set the start for the text selection.
|
void |
setSize(int width,
int height)
Set width and height of element.
|
void |
setSlimScrollHandle(boolean slimScrollHandle)
Enable a slim (mobile phone like) scroll handle instead of the standard one.
|
void |
setText(java.lang.String text)
Set the text content.
|
void |
setTextChangeListener(Control.Predicate lambda)
Set a lambda listener that fires when the text has actually changed (not just the cursor or
selection).
|
void |
setTextChangeListener(java.lang.String methodName) |
void |
setTextChangeListener(java.lang.String methodName,
java.lang.Object target)
Set a listener that fires when the text has actually changed (not just the cursor or selection).
|
void |
setWidth(int width)
Set width of element.
|
getAvailableWidth, getFullScrollHeight, getScrollPosition, getScrollSpeed, isSlimScrollHandle, scrollToItem, scrollToItem, setScrollPosition, setScrollSpeedadd, clear, fitContent, getItem, getItems, getNumItems, indexOf, insert, remove, remove, sortItems, traceAbsoluteCoordinates, traceRelativeCoordinatescopyStyle, getFont, getFontSize, getLineHeight, getText, getTextAlign, getTextAlignY, getTextColor, isBold, isItalic, isStrikethrough, isUnderlined, setBold, setFont, setForegroundColor, setItalic, setLineHeight, setLineHeightPercent, setStrikethrough, setText, setTextAlign, setTextAlignY, setTextColor, setUnderlinedaddAutoAnchors, animate, blur, copyStyle, doForAll, fillParent, fillParent, fillParent, fillParentHeight, fillParentHeight, fillParentWidth, fillParentWidth, focus, forceRepaint, getAnchorMode, getAnchorValue, getAvailableHeight, getBackgroundColor, getBorderColor, getBorderRadius, getBorderWidth, getCursor, getForegroundColor, getHeight, getHoverColor, getImage, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOffsetXToParent, getOffsetXToWindow, getOffsetYToParent, getOffsetYToWindow, getOpacity, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPressedColor, getVersionString, getWidth, getX, getY, getZ, isEnabled, isFocusable, isFocused, isPropagationStopped, isVisible, noAutosize, relativeCoordsAreWithin, removeAnchor, removeBoxShadow, removeFocusListener, removeMouseListener, removeResizeListener, setAnchor, setAnchors, setAutosizing, setBackgroundColor, setBorder, setBorder, setBorderColor, setBorderRadius, setBorderWidth, setBoxShadow, setCursor, setEnabled, setFixedSize, setFocusListener, setFocusListener, setFocusListener, setFocusListener, setGradient, setHeight, setHeight, setHoverColor, setImage, setImageMode, setMargin, setMargin, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseListener, setMouseListener, setMouseListener, setMouseListener, setOpacity, setOpacity, setPaddingBottom, setPaddingTop, setPercentageAnchor, setPercentageAnchors, setPixelAnchor, setPixelAnchors, setPosition, setPressedColor, setResizeListener, setResizeListener, setResizeListener, setResizeListener, setVisibility, setVisible, setWidth, setX, setY, setZ, stopPropagation, unfocuspublic MultilineTextbox()
public MultilineTextbox(int width,
int height)
public MultilineTextbox(java.lang.String hint,
int width,
int height)
public MultilineTextbox(int width,
int height,
int fontSize)
public void setCursorColor(int cursorColor)
cursorColor - rgb integer colorpublic void setCursorPosition(int cursorPosition)
cursorPosition - cursor positonpublic void setSelectionStart(int selectionStart)
selectionStart - selection start positionpublic void setSelectionEnd(int selectionEnd)
selectionEnd - selection end positionpublic void setSelection(int start,
int end)
start - selection start positionend - selection end positionpublic void setSelectionColor(int selectionColor)
selectionColor - rgb integer colorpublic void setHint(java.lang.String hint)
hint - hintpublic void setClickSetsCursor(boolean clickSetsCursor)
clickSetsCursor - clickSetsCursorpublic void setSize(int width,
int height)
Controlpublic void setWidth(int width)
Controlpublic void setPadding(int all)
ControlsetPadding in class Controlall - padding in pixelpublic void setPadding(int top_bottom,
int left_right)
setPadding in class Controlpublic void setPadding(int top,
int right,
int bottom,
int left)
ControlsetPadding in class Controltop - top padding in pixelright - right padding in pixelbottom - bottom padding in pixelleft - left padding in pixelpublic void setPaddingRight(int right)
setPaddingRight in class Controlpublic void setPaddingLeft(int left)
setPaddingLeft in class Controlpublic void setSlimScrollHandle(boolean slimScrollHandle)
VScrollContainersetSlimScrollHandle in class VScrollContainerslimScrollHandle - slim scrollhandlepublic void setText(java.lang.String text)
TextBasedpublic void setFontSize(float fontSize)
TextBasedsetFontSize in class TextBasedfontSize - font sizepublic void disableInput()
public void enableInput()
disableInput()public int getCursorColor()
public int getCursorPosition()
public int getSelectionColor()
public java.lang.String getHint()
public int getSelectionStart()
public int getSelectionEnd()
public java.lang.String getSelection()
public boolean getClickSetsCursor()
public void setKeyPressListener(java.lang.String methodName,
java.lang.Object target)
KeyEventmethodName - name of callback methodtarget - object that declares callback method.public void setKeyPressListener(java.lang.String methodName)
public void setKeyPressListener(Control.Predicate lambda)
lambda - lambda expressionpublic void setKeyPressListener(Control.Predicate1<KeyEvent> lambda)
KeyEventlambda - lambda expression with KeyEvent as parameterpublic void removeKeyPressListener()
public void setTextChangeListener(java.lang.String methodName,
java.lang.Object target)
methodName - name of callback methodtarget - object that declares callback method.public void setTextChangeListener(java.lang.String methodName)
public void setTextChangeListener(Control.Predicate lambda)
lambda - lambda expressionpublic void removeTextChangeListener()
public void copy()
public void paste()
public void cut()
Processing Library guiSET by Mc Zen. (c) 2021