public class Container extends TextBased
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 |
|---|
Container()
Default constructor sets width and height to 100
|
Container(int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Control... items)
Add items to Container.
|
void |
clear()
Remove all items.
|
void |
fitContent()
Resize container once so it fits its content.
|
Control |
getItem(int index)
Get item in item list at given index.
|
Control[] |
getItems()
Retrieve all items as Control array.
|
int |
getNumItems()
Get number of items.
|
int |
indexOf(Control item)
Get list index of given item.
|
void |
insert(int position,
Control... items)
Insert items at given index position.
|
boolean |
remove(Control item)
Remove a specific item from item list.
|
Control |
remove(int index)
Remove item at position in item list.
|
void |
sortItems(java.util.Comparator<Control> comp)
Sort items providing a Comparator.
|
java.util.ArrayList<Control> |
traceAbsoluteCoordinates(int x,
int y)
Get a list of arbitrarly nested child elements that given coordinates go through, ordered by
layer on the screen.
|
java.util.ArrayList<Control> |
traceRelativeCoordinates(int x,
int y)
Get a list of arbitrarly nested child elements that given coordinates go through, ordered by
layer on the screen.
|
copyStyle, getFont, getFontSize, getLineHeight, getText, getTextAlign, getTextAlignY, getTextColor, isBold, isItalic, isStrikethrough, isUnderlined, setBold, setFont, setFontSize, setForegroundColor, setItalic, setLineHeight, setLineHeightPercent, setStrikethrough, setText, setText, setTextAlign, setTextAlignY, setTextColor, setUnderlinedaddAutoAnchors, animate, blur, copyStyle, doForAll, fillParent, fillParent, fillParent, fillParentHeight, fillParentHeight, fillParentWidth, fillParentWidth, focus, forceRepaint, getAnchorMode, getAnchorValue, getAvailableHeight, getAvailableWidth, 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, setPadding, setPadding, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPercentageAnchor, setPercentageAnchors, setPixelAnchor, setPixelAnchors, setPosition, setPressedColor, setResizeListener, setResizeListener, setResizeListener, setResizeListener, setSize, setVisibility, setVisible, setWidth, setWidth, setX, setY, setZ, stopPropagation, unfocuspublic Container()
public Container(int width,
int height)
public void add(Control... items)
VFlowContainer or VScrollContainer sort them by z-index!items - arbitrary number of items.public void insert(int position,
Control... items)
position - index to insert items into list.items - arbitrary number of items.public void clear()
public Control remove(int index)
index - positionpublic boolean remove(Control item)
item - item to remove.public int indexOf(Control item)
item - item to get index topublic Control[] getItems()
public Control getItem(int index)
index - index of requested itempublic int getNumItems()
public void sortItems(java.util.Comparator<Control> comp)
comp - Comparatorpublic void fitContent()
public java.util.ArrayList<Control> traceRelativeCoordinates(int x, int y)
x - x coordinate on this elementy - y coordinate on this elementpublic java.util.ArrayList<Control> traceAbsoluteCoordinates(int x, int y)
x - absolute x window coordinatey - absolute y window coordinateProcessing Library guiSET by Mc Zen. (c) 2021