| Modifier and Type | Class and Description |
|---|---|
class |
Control.Constants |
static class |
Control.ImageMode
Fill modes for background images.
|
static interface |
Control.Predicate
Functional interface for a lambda expression with no parameters.
|
static interface |
Control.Predicate1<T>
Functional interface for a lambda expression with one parameter.
|
static interface |
Control.Predicate2<T,U>
Functional interface for a lambda expression with two parameters.
|
static class |
Control.RenderingMethod
guiSET provides two rendering methods and for each element, the method can be chosen.
|
static class |
Control.Setter<T> |
| Modifier and Type | Field and Description |
|---|---|
static long |
ALL |
static int |
ANCHOR_INACTIVE
The value of an inactive anchor is set to
ANCHOR_INACTIVE. |
static int |
AUTOSIZE_BOTH |
static int |
AUTOSIZE_HEIGHT |
static int |
AUTOSIZE_NONE |
static int |
AUTOSIZE_WIDTH |
static long |
BACKGROUND_COLOR |
static long |
BACKGROUND_COLORS |
static long |
BORDER |
static long |
BORDER_COLOR |
static long |
BORDER_RADIUS |
static long |
BORDER_WIDTH |
static Control.RenderingMethod |
BUFFERED_RENDERING
Elements graphics are drawn on a buffer image.
|
static long |
COLORS |
static Control.RenderingMethod |
defaultRenderingMethod
Specify rendering type for any new element instances.
|
static Control.ImageMode |
FILL
Image mode: fill element with given image and if necessary, distort the image
|
static Control.ImageMode |
FIT
Image mode: enlarge image so it fills out entire object centered, parts of the image might be
hidden; fits the larger side
|
static Control.ImageMode |
FIT_INSIDE
Image mode: place image centered in the object without cropping it, so it fits the smaller side
|
static long |
FONT_SIZE |
static long |
FOREGROUND_COLOR |
static long |
HOVER_COLOR |
static long |
LINE_HEIGHT |
static long |
MARGIN |
static long |
MARGIN_BOTTOM |
static long |
MARGIN_LEFT |
static long |
MARGIN_RIGHT |
static long |
MARGIN_TOP |
java.lang.String |
name
Name for the element can be specified manually, useful for distinguishing.
|
static long |
OPACITY |
static long |
PADDING |
static long |
PADDING_BOTTOM |
static long |
PADDING_LEFT |
static long |
PADDING_RIGHT |
static long |
PADDING_TOP |
static boolean |
PERCENTAGE_MODE
Anchor mode for percentage of parents size.
|
static boolean |
PIXEL_MODE
Anchor mode for absolute pixel values.
|
static long |
PRESSED_COLOR |
static long |
SPACING |
static long |
TEXT_ALIGN |
static long |
TEXT_ALIGN_Y |
static long |
TEXT_COLOR |
static long |
TEXT_PROPERTIES |
static Control.RenderingMethod |
UNBUFFERED_RENDERING
Elements graphics are drawn on parent buffer.
|
| Constructor and Description |
|---|
Control() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAutoAnchors(int... anchor)
Add an anchor (types are TOP, RIGHT, BOTTOM, LEFT).
|
void |
animate(java.lang.String attribute,
float aimedValue,
double milliseconds)
Create a transition animation for a property of this Component.
|
void |
blur()
Request the Frame component to blur this object (set focus to false).
|
void |
copyStyle(Control source)
Enable user of the library to adopt a set of visual properties from another element.
|
void |
copyStyle(Control source,
long attribs)
Enable user of the library to adopt a set of visual style properties from another element.
|
static <T> void |
doForAll(Control.Setter<T> setter,
T... elements)
(A bit more advanced!)
|
void |
fillParent()
Fill parent width and height.
|
void |
fillParent(int percent)
Fill x percent of parents width and height.
|
void |
fillParent(int widthPercent,
int heightPercent)
Fill widthPercent of parent width and heightPercent of parent height.
|
void |
fillParentHeight()
Fill parent height.
|
void |
fillParentHeight(int percent)
Fill x percent of parent height and center this element vertically.
|
void |
fillParentWidth()
Fill parent width.
|
void |
fillParentWidth(int percent)
Fill x percent of parent width and center this element horizontally.
|
void |
focus()
Request the Frame component to focus this object.
|
void |
forceRepaint()
Force a re-render of this Component.
|
boolean |
getAnchorMode(int anchor)
Get anchor mode for given anchor direction.
|
int |
getAnchorValue(int anchor)
Get the value of an anchor, returns
ANCHOR_INACTIVE if the anchor is inactive. |
int |
getAvailableHeight()
Get available content height subtracting paddings.
|
int |
getAvailableWidth()
Get available content width subtracting paddings.
|
int |
getBackgroundColor() |
int |
getBorderColor() |
int |
getBorderRadius() |
int |
getBorderWidth() |
int |
getCursor() |
int |
getForegroundColor() |
int |
getHeight() |
int |
getHoverColor() |
PImage |
getImage() |
int |
getMarginBottom() |
int |
getMarginLeft() |
int |
getMarginRight() |
int |
getMarginTop() |
int |
getMaxHeight() |
int |
getMaxWidth() |
int |
getMinHeight() |
int |
getMinWidth() |
int |
getOffsetXToParent()
Get x coordinate of left side relative to parent.
|
int |
getOffsetXToWindow()
Get x coordinate of left side relative to window.
|
int |
getOffsetYToParent()
Get y coordinate of left side relative to parent.
|
int |
getOffsetYToWindow()
Get x coordinate of left side relative to window.
|
float |
getOpacity() |
int |
getPaddingBottom() |
int |
getPaddingLeft() |
int |
getPaddingRight() |
int |
getPaddingTop() |
Control |
getParent() |
int |
getPressedColor() |
static java.lang.String |
getVersionString()
Get guiSET version.
|
int |
getWidth() |
int |
getX() |
int |
getY() |
int |
getZ() |
boolean |
isEnabled() |
boolean |
isFocusable() |
boolean |
isFocused() |
static boolean |
isPropagationStopped()
Check if the mouse event propagation has been stopped.
|
boolean |
isVisible() |
void |
noAutosize()
Disable autosizing.
|
boolean |
relativeCoordsAreWithin(int x,
int y)
Check if given coordinates (need to be relative to parent) are within this element (without
constraining to parents bounds).
|
void |
removeAnchor(int anchor)
Remove a set anchor.
|
void |
removeBoxShadow() |
void |
removeFocusListener() |
void |
removeMouseListener(java.lang.String type)
Remove a mouse listener for given type if one has already been set up.
|
void |
removeResizeListener() |
void |
setAnchor(int anchor,
int value)
Set an anchor of type TOP BOTTOM, LEFT or RIGHT to a certain value.
|
void |
setAnchors(int... anchors_and_values)
Set any number of anchors by passing first a direction and then the value (more than four - one
for each direction - don't make sense though).
|
void |
setAutosizing(boolean autosizing)
Enable/disable autosizing.
|
void |
setBackgroundColor(int clr)
Set the plain background color of the element.
|
void |
setBorder(int borderWidth,
int borderColor)
Shorthand property for setting border width and color.
|
void |
setBorder(int borderWidth,
int borderColor,
int borderRadius)
Shorthand property for setting all border properties.
|
void |
setBorderColor(int clr)
Color of elements border.
|
void |
setBorderRadius(int borderRadius)
Rounds the corners of the element.
|
void |
setBorderWidth(int borderWidth)
Stroke width of the elements border.
|
void |
setBoxShadow(int size,
int offsetX,
int offsetY,
int color,
float opacity)
Add rectangular box shadow to element.
|
void |
setCursor(int cursor)
Set the cursor displayed when mouse is over this element.
|
void |
setEnabled(boolean enabled)
Set the enabled state of this element.
|
void |
setFixedSize(int width,
int height)
Set size of element and disable autosizing.
|
void |
setFocusListener(Control.Predicate lambda)
Set a lambda focus listener that fires when the element gets focus (through mouse click,
programmatically).
|
void |
setFocusListener(Control.Predicate1<Control> lambda)
Set a lambda focus listener with a
Control as parameter that fires when the element gets
focus (through mouse click, programmatically). |
void |
setFocusListener(java.lang.String methodName) |
void |
setFocusListener(java.lang.String methodName,
java.lang.Object target)
Set a focus listener that fires when the element gets focus (through mouse click or
programmatically).
|
void |
setForegroundColor(int clr)
Set the foreground color (not really used anymore, except in slider and knob).
|
void |
setGradient(int topColor,
int bottomColor)
Set background to a vertical gradient between the two given colors.
|
void |
setHeight(float height)
Convenience version that casts to int!
|
void |
setHeight(int height)
Set height of element.
|
void |
setHoverColor(int clr)
Background color when mouse hovers over this component.
|
void |
setImage(PImage image)
Set the (background) image of the element.
|
void |
setImageMode(Control.ImageMode imageMode)
Set the background image filling mode.
|
void |
setMargin(int all)
Apply margins to all sides of the element.
|
void |
setMargin(int top_bottom,
int left_right)
Apply same margins to both top/bottom and left/right.
|
void |
setMargin(int top,
int right,
int bottom,
int left)
Set individual top, right, bottom and left margins.
|
void |
setMarginBottom(int bottom) |
void |
setMarginLeft(int left) |
void |
setMarginRight(int right) |
void |
setMarginTop(int top) |
void |
setMaxHeight(int maxHeight)
Set maximum height of element in pixel.
|
void |
setMaxWidth(int maxWidth)
Set maximum width of element in pixel.
|
void |
setMinHeight(int minHeight)
Set minimum height of element in pixel.
|
void |
setMinWidth(int minWidth)
Set minimum width of element in pixel.
|
void |
setMouseListener(java.lang.String type,
Control.Predicate lambda)
Set a mouse listener in form of a lambda expression.
|
void |
setMouseListener(java.lang.String type,
Control.Predicate1<MouseEvent> lambda)
Set a mouse listener in form of a lambda expression with a
MouseEvent as argument. |
boolean |
setMouseListener(java.lang.String type,
java.lang.String methodName)
Set a mouse listener.
|
boolean |
setMouseListener(java.lang.String type,
java.lang.String methodName,
java.lang.Object target)
Allows to pass a target object where the given method is declared.
|
void |
setOpacity(double opacity)
Set opacity (opposite of transparency), casts to float.
|
void |
setOpacity(float opacity)
Set opacity (opposite of transparency).
|
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 |
setPaddingBottom(int bottom) |
void |
setPaddingLeft(int left) |
void |
setPaddingRight(int right) |
void |
setPaddingTop(int top) |
void |
setPercentageAnchor(int anchor,
int value)
Set an anchor like in
PERCENTAGE_MODE. |
void |
setPercentageAnchors(int... anchors_and_values)
Combination of
setAnchors(int...) and setPercentageAnchor(int, int). |
void |
setPixelAnchor(int anchor,
int value)
Set an anchor like with
setAnchor(int, int) but definitely use the PIXEL_MODE. |
void |
setPixelAnchors(int... anchors_and_values)
Combination of
setAnchors(int...) and setPixelAnchor(int, int). |
void |
setPosition(int x,
int y)
Set position relative to parent.
|
void |
setPressedColor(int clr)
Background color when mouse is pressed down on this component.
|
void |
setResizeListener(Control.Predicate lambda)
Set a lambda focus listener that fires each time the element is resized by anchor resizing.
|
void |
setResizeListener(Control.Predicate1<Control> lambda)
Set a lambda focus listener with a
Control as parameter that fires each time the element
is resized by anchor resizing. |
void |
setResizeListener(java.lang.String methodName) |
void |
setResizeListener(java.lang.String methodName,
java.lang.Object target)
Set a resize listener that fires each time the element is resized by anchor resizing.
|
void |
setSize(int width,
int height)
Set width and height of element.
|
void |
setVisibility(boolean visible)
Just in case someone expects a "setVisibility" method instead of "setVisible".
|
void |
setVisible(boolean visible)
Set the visibility.
|
void |
setWidth(float width)
Convenience version that casts to int!
|
void |
setWidth(int width)
Set width of element.
|
void |
setX(int x)
Set x-coordinate of element relative to parent.
|
void |
setY(int y)
Set y-coordinate of element relative to parent.
|
void |
setZ(int z)
Set z-coordinate of element.
|
static void |
stopPropagation()
Stop mouse event propagation.
|
void |
unfocus()
Request the Frame component to blur this object (set focus to false), duplicate of
blur(). |
public java.lang.String name
public static final Control.ImageMode FILL
public static final Control.ImageMode FIT
public static final Control.ImageMode FIT_INSIDE
public static final Control.RenderingMethod BUFFERED_RENDERING
public static final Control.RenderingMethod UNBUFFERED_RENDERING
BUFFERED_RENDERING and a sibling of the parent has changed, then the element that is
buffered by the parent needs no redrawing.public static Control.RenderingMethod defaultRenderingMethod
public static final int ANCHOR_INACTIVE
ANCHOR_INACTIVE.public static final boolean PERCENTAGE_MODE
public static final boolean PIXEL_MODE
public static int AUTOSIZE_NONE
public static int AUTOSIZE_WIDTH
public static int AUTOSIZE_HEIGHT
public static int AUTOSIZE_BOTH
public static final long PADDING_LEFT
public static final long PADDING_RIGHT
public static final long PADDING_TOP
public static final long PADDING_BOTTOM
public static final long PADDING
public static final long MARGIN_LEFT
public static final long MARGIN_RIGHT
public static final long MARGIN_TOP
public static final long MARGIN_BOTTOM
public static final long MARGIN
public static final long BACKGROUND_COLOR
public static final long HOVER_COLOR
public static final long PRESSED_COLOR
public static final long BACKGROUND_COLORS
public static final long FOREGROUND_COLOR
public static final long BORDER_WIDTH
public static final long BORDER_COLOR
public static final long BORDER_RADIUS
public static final long BORDER
public static final long OPACITY
public static final long TEXT_COLOR
public static final long FONT_SIZE
public static final long TEXT_ALIGN
public static final long TEXT_ALIGN_Y
public static final long LINE_HEIGHT
public static final long TEXT_PROPERTIES
public static final long COLORS
public static final long SPACING
public static final long ALL
public void focus()
Frame.focusedElementpublic void blur()
Frame.focusedElementpublic void unfocus()
blur().Frame.focusedElementpublic void setBoxShadow(int size,
int offsetX,
int offsetY,
int color,
float opacity)
size - shadow sizeoffsetX - x offsetoffsetY - y offsetcolor - shadow coloropacity - shadow opacity (0 is transparent, 1 is opaque)public void removeBoxShadow()
public void forceRepaint()
public void setAnchor(int anchor,
int value)
setPercentageAnchor(int, int) and setPixelAnchor(int, int).anchor - anchor directionvalue - valuepublic void setAnchors(int... anchors_and_values)
PIXEL_MODE or
PERCENTAGE_MODE is not changed. Example:
setAnchors(LEFT, 34, RIGHT, 50);
setAnchors(BOTTOM, 0, LEFT, 1, RIGHT, 20, TOP, 50);anchors_and_values - anchors and valuespublic void setPixelAnchor(int anchor,
int value)
setAnchor(int, int) but definitely use the PIXEL_MODE.
The anchor will be set to [value] pixels.anchor - LEFT, RIGHT, TOP or BOTTOMvalue - valuepublic void setPixelAnchors(int... anchors_and_values)
setAnchors(int...) and setPixelAnchor(int, int).anchors_and_values - anchors and valuespublic void setPercentageAnchor(int anchor,
int value)
PERCENTAGE_MODE. This will place or resize the element in percent
relative to the size of the parent (give i.e. 100 for 100%).anchor - anchorvalue - valuepublic void setPercentageAnchors(int... anchors_and_values)
setAnchors(int...) and setPercentageAnchor(int, int).anchors_and_values - anchors and valuespublic boolean getAnchorMode(int anchor)
PIXEL_MODE (false) or
PERCENTAGE_MODE (true).anchor - anchor directionpublic int getAnchorValue(int anchor)
ANCHOR_INACTIVE if the anchor is inactive.anchor - anchor directionpublic void addAutoAnchors(int... anchor)
PIXEL_MODE and not with PERCENTAGE_MODE
(mode will be set to the PIXEL_MODE if the latter is currently selected).
It is not possible to use this method if this element has not been added to a parent.anchor - accepts TOP, RIGHT, LEFT or BOTTOM. Pass up to four anchor types (order doesn't
matter)public void removeAnchor(int anchor)
anchor - accepts TOP, RIGHT, LEFT or BOTTOMpublic void fillParentWidth(int percent)
percent - percent 100 for 100%public void fillParentWidth()
public void fillParentHeight(int percent)
percent - percent 100 for 100%public void fillParentHeight()
public void fillParent()
public void fillParent(int percent)
percent - percentpublic void fillParent(int widthPercent,
int heightPercent)
widthPercent - width percentageheightPercent - height percentagepublic void setAutosizing(boolean autosizing)
autosizing - autosizingpublic void noAutosize()
public void setX(int x)
x - x-coordinate in pixelpublic void setY(int y)
y - y-coordinate in pixelpublic void setZ(int z)
z - z-indexpublic void setPosition(int x,
int y)
x - x-coordinate in pixely - y-coordinate in pixelpublic void setWidth(int width)
width - width in pixelpublic void setHeight(int height)
height - height in pixelpublic void setWidth(float width)
width - width in pixelpublic void setHeight(float height)
height - in pixelpublic void setSize(int width,
int height)
width - width in pixelheight - height in pixelpublic void setFixedSize(int width,
int height)
width - widthheight - heightpublic void setMinWidth(int minWidth)
minWidth - minimum width in pixelpublic void setMaxWidth(int maxWidth)
maxWidth - maximum width in pixelpublic void setMinHeight(int minHeight)
minHeight - minimum height in pixelpublic void setMaxHeight(int maxHeight)
maxHeight - maximum height in pixelpublic void setBackgroundColor(int clr)
clr - integer rgb colorpublic void setForegroundColor(int clr)
clr - integer rgb colorpublic void setHoverColor(int clr)
clr - integer rgb colorpublic void setPressedColor(int clr)
clr - integer rgb colorpublic void setBorderColor(int clr)
clr - integer rgb colorpublic void setBorderWidth(int borderWidth)
borderWidth - border with in pixelpublic void setBorderRadius(int borderRadius)
borderRadius - border radiuspublic void setBorder(int borderWidth,
int borderColor,
int borderRadius)
borderWidth - border widthborderColor - border colorborderRadius - border radiuspublic void setBorder(int borderWidth,
int borderColor)
borderWidth - border widthborderColor - border colorpublic void setCursor(int cursor)
cursor - Integer between 0 and 11. Can use constants like ARROW, CROSS, HAND, MOVE, TEXT, or
WAIT.public void setImage(PImage image)
image - PImage or PGraphics object.public void setImageMode(Control.ImageMode imageMode)
imageMode. - Use Control.FILL, Control.FIT or Control.FIT_INSIDEpublic void setGradient(int topColor,
int bottomColor)
topColor - top gradient colorbottomColor - bottom gradient colorpublic void setEnabled(boolean enabled)
enabled - enabled statepublic void setVisible(boolean visible)
visible - visibility statepublic void setVisibility(boolean visible)
visible - visibility statepublic void setOpacity(double opacity)
opacity - opacity from 0 (transparent) to 1 (opaque).public void setOpacity(float opacity)
setVisibility(false) or setEnabled(false) to
prevent the element from receiving mouse events.opacity - opacity from 0 (transparent) to 1 (opaque).public void setMargin(int all)
all - margin in pixelpublic void setMargin(int top_bottom,
int left_right)
top_bottom - top and bottom marginleft_right - left and right marginpublic void setMargin(int top,
int right,
int bottom,
int left)
top - top margin in pixelright - right margin in pixelbottom - bottom margin in pixelleft - left margin in pixelpublic void setMarginTop(int top)
public void setMarginRight(int right)
public void setMarginBottom(int bottom)
public void setMarginLeft(int left)
public void setPadding(int all)
all - padding in pixelpublic void setPadding(int top_bottom,
int left_right)
public void setPadding(int top,
int right,
int bottom,
int left)
top - top padding in pixelright - right padding in pixelbottom - bottom padding in pixelleft - left padding in pixelpublic void setPaddingTop(int top)
public void setPaddingRight(int right)
public void setPaddingBottom(int bottom)
public void setPaddingLeft(int left)
public Control getParent()
public int getX()
public int getY()
public int getZ()
public int getWidth()
public int getMinWidth()
public int getMaxWidth()
public int getHeight()
public int getMinHeight()
public int getMaxHeight()
public int getAvailableWidth()
public int getAvailableHeight()
public int getBackgroundColor()
public int getForegroundColor()
public int getHoverColor()
public int getPressedColor()
public int getBorderColor()
public int getBorderWidth()
public int getBorderRadius()
public int getCursor()
public PImage getImage()
public boolean isEnabled()
public boolean isVisible()
public float getOpacity()
public boolean isFocusable()
public boolean isFocused()
public int getMarginTop()
public int getMarginRight()
public int getMarginBottom()
public int getMarginLeft()
public int getPaddingTop()
public int getPaddingRight()
public int getPaddingBottom()
public int getPaddingLeft()
public void copyStyle(Control source)
copyStyle(Control, long).source - element to adopt properties from.public void copyStyle(Control source, long attribs)
myElement.copyStyle(otherElement, PADDING_LEFT | MARGIN_BOTTOM, FOREGROUND_COLOR);
PADDING_LEFT, PADDING_RIGHT, PADDING_TOP,
PADDING_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP,
MARGIN_BOTTOM, BACKGROUND_COLOR, HOVER_COLOR, PRESSED_COLOR,
FOREGROUND_COLOR, BORDER_WIDTH, BORDER_RADIUS, BORDER_COLOR,
OPACITY,
TEXT_COLOR, TEXT_ALIGN,
TEXT_ALIGN_Y, FONT_SIZE, LINE_HEIGHT.
ALL, COLORS,
MARGIN (all margins), PADDING (all paddings), SPACING (all margins and
paddings), BACKGROUND_COLORS (background-, hover-, and pressedColor), BORDER
(border-width, -color and -radius), TEXT_PROPERTIES (all text properties).source - element to adopt properties from.attribs - bitwise OR added attributes@SafeVarargs public static <T> void doForAll(Control.Setter<T> setter, T... elements)
Control.Setter<>, override its run() method and then pass any
number of elements.
Control.doForAll(new Control.Setter<Control>() {
@Override
public void run(Control c) {
c.setBackgroundColor(color(0));
}
}, myButton, myLabel, myTextbox);
Control.doForAll(new Control.Setter<Container>() {
@Override
public void run(Container c) {
c.fitContent();
}
}, myContainer, myHScrollContainer, myScrollArea, myFlowContainer);
T - type of objectsetter - a setter (need to override the run() method and specify template type)elements - arbitrary number of elements that are of the given template typepublic void animate(java.lang.String attribute,
float aimedValue,
double milliseconds)
Frame will deal with
changing this property in appropriate steps to create the effect.
I.e. write:
myObject.animate("x", 50, 500);
to change the x-coordinate of myObject to 50 within half a second. Or
myObject.animate("opacity", 0, 100);
to create a fade-out transition.attribute - name of attribute to animateaimedValue - final value for the attributemilliseconds - time for animation in millisecondspublic boolean setMouseListener(java.lang.String type,
java.lang.String methodName)
MouseEvent as parameter. If it is defined in another class than in the
main PApplet scope use the overloaded method setMouseListener(String, String, Object)
that allows passing a target object.type - String for event typemethodName - Name of method to invokepublic boolean setMouseListener(java.lang.String type,
java.lang.String methodName,
java.lang.Object target)
type - String for event typemethodName - name of callback methodtarget - Object where the callback method is declared.setMouseListener(String, String)public void setMouseListener(java.lang.String type,
Control.Predicate lambda)
setMouseListener(String, String).
Event parameters: nonetype - see setMouseListener(String, String)lambda - lambda expressionpublic void setMouseListener(java.lang.String type,
Control.Predicate1<MouseEvent> lambda)
MouseEvent as argument. For
possible types see setMouseListener(String, String).
Event parameters: MouseEventtype - see setMouseListener(String, String)lambda - lambda expression with a MouseEvent as argument.public void removeMouseListener(java.lang.String type)
type - event type.public void setResizeListener(java.lang.String methodName,
java.lang.Object target)
Control that is resizedmethodName - name of callback methodtarget - Object where the callback method is declared.public void setResizeListener(java.lang.String methodName)
public void setResizeListener(Control.Predicate1<Control> lambda)
Control as parameter that fires each time the element
is resized by anchor resizing.
Event arguments: the Control that is resizedlambda - lambda expression with Control parameterpublic void setResizeListener(Control.Predicate lambda)
lambda - lambda expressionpublic void removeResizeListener()
public void setFocusListener(java.lang.String methodName,
java.lang.Object target)
Control that got focusmethodName - name of callback methodtarget - Object where the callback method is declared.public void setFocusListener(java.lang.String methodName)
public void setFocusListener(Control.Predicate1<Control> lambda)
Control as parameter that fires when the element gets
focus (through mouse click, programmatically).
Event arguments: The Control that got focuslambda - lambda expression with Control parameterpublic void setFocusListener(Control.Predicate lambda)
lambda - lambda expressionpublic void removeFocusListener()
public static void stopPropagation()
public static boolean isPropagationStopped()
public boolean relativeCoordsAreWithin(int x,
int y)
x - x coordinate relative to parent originy - y coordinate relative to parent originpublic int getOffsetXToParent()
public int getOffsetYToParent()
public int getOffsetXToWindow()
public int getOffsetYToWindow()
public static java.lang.String getVersionString()
Processing Library guiSET by Mc Zen. (c) 2021