# Class Container

java.lang.Object
com.codename1.ui.Component
com.codename1.ui.Container

All Implemented Interfaces:
  `Animation, Editable, StyleListener, Iterable<Component>`

Direct Known Subclasses:
  `Accordion, Ads, AudioRecorderComponent, BaseSpinner, BrowserComponent, ButtonList, Calendar, ClearableTextField, ComponentGroup, ContainerList, EmbeddedContainer, FloatingHint, Form, HTMLComponent, InfiniteContainer, InputComponent, InteractionDialog, InterFormContainer, MapComponent, MediaPlayer, MenuBar, MultiButton, OnOffSwitch, Scene, Sheet, SignatureComponent, SpanButton, SpanLabel, SpanMultiButton, SplitPane, SwipeableContainer, Table, Tabs, TestRunnerComponent, Toolbar, Tree, WebBrowser`

public class Container extends Component implements Iterable<Component>

A composite pattern with `Component`, allows nesting and arranging multiple components using a pluggable layout manager architecture. Containers can be nested one within the other to form elaborate UI's. By default Containers use `com.codename1.ui.layouts.FlowLayout` which isn't ideal for most use cases.

Components within the Container MUST be arranged using a layout manager!

This allows the UI to adapt to different resolutions, DPI, orientation changes etc. seamlessly. Invoking any bounds setting method will produce unpredictable results. To learn about layout managers check out the relevant section in the developer guide.

A container doesn't implicitly reflow its elements and in that regard follows the direction of AWT/Swing. As a result the layout can be animated to create a flowing effect for UI changes. This also provides improved performance as a bonus. See this sample of `Container` animation:

    Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
    Button fall = new Button("Fall");
    fall.addActionListener((e) -> {
        for(int iter = 0 ; iter < 10 ; iter++) {
            Label b = new Label ("Label " + iter);
            b.setWidth(fall.getWidth());
            b.setHeight(fall.getHeight());
            b.setY(-fall.getHeight());
            hi.add(b);
        }
        hi.getContentPane().animateLayout(20000);
    });
    hi.add(fall);

Many components within Codename One (e.g. `com.codename1.ui.tree.Tree`, `com.codename1.ui.table.Table`, `com.codename1.components.MultiButton` etc.) derive from Container instead of Component. This allows such components to provide very rich functionality by building on top of the existing functionality. Container also provides the lead component functionality that allows treating an entire Container hierarchy as a single component. This is discussed in depth within the developer guide.

- ## Field Summary

  ### Fields inherited from class Component

  `BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, CROSSHAIR_CURSOR, DEFAULT_CURSOR, DRAG_REGION_IMMEDIATELY_DRAG_X, DRAG_REGION_IMMEDIATELY_DRAG_XY, DRAG_REGION_IMMEDIATELY_DRAG_Y, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, E_RESIZE_CURSOR, HAND_CURSOR, LEFT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, RIGHT, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, TOP, W_RESIZE_CURSOR, WAIT_CURSOR`
  Modifier and Type
  Field
  Description
  `static final int`
  `BASELINE`
  Alignment to the baseline constraint
  `static final int`
  `BOTTOM`
  Box-orientation constant used to specify the bottom of a box.
  `static final int`
  `BRB_CENTER_OFFSET`
  Baseline resize behavior constant used to properly align components.
  `static final int`
  `BRB_CONSTANT_ASCENT`
  Baseline resize behavior constant used to properly align components.
  `static final int`
  `BRB_CONSTANT_DESCENT`
  Baseline resize behavior constant used to properly align components.
  `static final int`
  `BRB_OTHER`
  Baseline resize behavior constant used to properly align components.
  `static final int`
  `CENTER`
  Indicates a Component center alignment
  `static final int`
  `CROSSHAIR_CURSOR`
  The crosshair cursor type.
  `static final int`
  `DEFAULT_CURSOR`
  The default cursor
  `static final int`
  `DRAG_REGION_IMMEDIATELY_DRAG_X`
  Used by getDragRegionStatus to indicate immediate dragability
  `static final int`
  `DRAG_REGION_IMMEDIATELY_DRAG_XY`
  Used by getDragRegionStatus to indicate immediate dragability
  `static final int`
  `DRAG_REGION_IMMEDIATELY_DRAG_Y`
  Used by getDragRegionStatus to indicate immediate dragability
  `static final int`
  `DRAG_REGION_LIKELY_DRAG_X`
  Used by getDragRegionStatus to indicate likely dragability
  `static final int`
  `DRAG_REGION_LIKELY_DRAG_XY`
  Used by getDragRegionStatus to indicate likely dragability
  `static final int`
  `DRAG_REGION_LIKELY_DRAG_Y`
  Used by getDragRegionStatus to indicate likely dragability
  `static final int`
  `DRAG_REGION_NOT_DRAGGABLE`
  Used by getDragRegionStatus to indicate no dragability
  `static final int`
  `DRAG_REGION_POSSIBLE_DRAG_X`
  Used by getDragRegionStatus to indicate limited dragability
  `static final int`
  `DRAG_REGION_POSSIBLE_DRAG_XY`
  Used by getDragRegionStatus to indicate limited dragability
  `static final int`
  `DRAG_REGION_POSSIBLE_DRAG_Y`
  Used by getDragRegionStatus to indicate limited dragability
  `static final int`
  `E_RESIZE_CURSOR`
  The east-resize cursor type.
  `static final int`
  `HAND_CURSOR`
  The hand cursor type.
  `static final int`
  `LEFT`
  Box-orientation constant used to specify the left side of a box.
  `static final int`
  `MOVE_CURSOR`
  The move cursor type.
  `static final int`
  `N_RESIZE_CURSOR`
  The north-resize cursor type.
  `static final int`
  `NE_RESIZE_CURSOR`
  The north-east-resize cursor type.
  `static final int`
  `NW_RESIZE_CURSOR`
  The north-west-resize cursor type.
  `static final int`
  `RIGHT`
  Box-orientation constant used to specify the right side of a box.
  `static final int`
  `S_RESIZE_CURSOR`
  The south-resize cursor type.
  `static final int`
  `SE_RESIZE_CURSOR`
  The south-east-resize cursor type.
  `static final int`
  `SW_RESIZE_CURSOR`
  The south-west-resize cursor type.
  `static final int`
  `TEXT_CURSOR`
  The text cursor type.
  `static final int`
  `TOP`
  Box-orientation constant used to specify the top of a box.
  `static final int`
  `W_RESIZE_CURSOR`
  The west-resize cursor type.
  `static final int`
  `WAIT_CURSOR`
  The wait cursor type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Container()`
  Constructs a new Container, with a `FlowLayout`.
  `Container(Layout layout)`
  Constructs a new Container with a new layout manager.
  `Container(Layout layout, String uiid)`
  Constructs a new Container with a new layout manager and UIID

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final Container`
  `add(Component cmp)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `add(Image img)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `add(Object constraint, Component cmp)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `add(Object constraint, Image img)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `add(Object constraint, String label)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `add(String label)`
  Simpler version of addComponent that allows chaining the calls for shorter syntax
  `Container`
  `addAll(Component... cmps)`
  Identical to add(x).add(y) only with a shorter syntax
  `void`
  `addComponent(int index, Component cmp)`
  This method adds the Component at a specific index location in the Container Components array.
  `void`
  `addComponent(int index, Object constraints, Component cmp)`
  Adds a Component to the Container
  `void`
  `addComponent(Component cmp)`
  Adds a Component to the Container
  `void`
  `addComponent(Object constraints, Component cmp)`
  Adds a Component to the Container
  `void`
  `animateHierarchy(int duration)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation
  `void`
  `animateHierarchyAndWait(int duration)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.
  `void`
  `animateHierarchyFade(int duration, int startingOpacity)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation
  `void`
  `animateHierarchyFadeAndWait(int duration, int startingOpacity)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.
  `void`
  `animateLayout(int duration)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation
  `void`
  `animateLayoutAndWait(int duration)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation.
  `void`
  `animateLayoutFade(int duration, int startingOpacity)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation
  `void`
  `animateLayoutFadeAndWait(int duration, int startingOpacity)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation.
  `void`
  `animateUnlayout(int duration, int opacity, Runnable callback)`
  This method is the exact reverse of animateLayout, when completed it leaves the container in an invalid state.
  `void`
  `animateUnlayoutAndWait(int duration, int opacity)`
  This method is the exact reverse of animateLayoutAndWait, when completed it leaves the container in an invalid state.
  `void`
  `applyRTL(boolean rtl)`
  Invokes apply/setRTL recursively on all the children components of this container
  `protected Dimension`
  `calcPreferredSize()`
  Calculates the preferred size based on component content.
  `protected void`
  `cancelRepaints()`
  remove this component and it's children from the painting queue
  `void`
  `clearClientProperties()`
  Clears all client properties from this Component
  `protected boolean`
  `constrainHeightWhenScrollable()`
  Indicates that children's widths should be calculated as if this component weren't scrollable-X, even when the component is scrollable Y.
  `protected boolean`
  `constrainWidthWhenScrollable()`
  Indicates that children's widths should be calculated as if this component weren't scrollable-X, even when the component is scrollable X.
  `boolean`
  `contains(Component cmp)`
  Returns true if the given component is within the hierarchy of this container
  `ComponentAnimation`
  `createAnimateHierarchy(int duration)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.
  `ComponentAnimation`
  `createAnimateHierarchyFade(int duration, int startingOpacity)`
  Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.
  `ComponentAnimation`
  `createAnimateLayout(int duration)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation
  `ComponentAnimation`
  `createAnimateLayoutFade(int duration, int startingOpacity)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation
  `ComponentAnimation`
  `createAnimateLayoutFadeAndWait(int duration, int startingOpacity)`
  Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation.
  `protected Motion`
  `createAnimateMotion(int start, int destination, int duration)`
  Creates a motion object for animation, allows subclasses to replace the motion type used in animations (currently defaults to ease-in).
  `ComponentAnimation`
  `createAnimateUnlayout(int duration, int opacity, Runnable callback)`
  This method is the exact reverse of createAnimateLayout, when animation is completed it leaves the container in an invalid state.
  `ComponentAnimation`
  `createReplaceTransition(Component current, Component next, Transition t)`
  This method creates an animation component that replaces the current Component with the next Component.
  `protected void`
  `dragInitiated()`
  Invoked on the focus component to let it know that drag has started on the parent container for the case of a component that doesn't support scrolling
  `void`
  `drop(Component dragged, int x, int y)`
  Performs a drop operation of the component at the given X/Y location in coordinate space, this method should be overriden by subclasses to perform all of the logic related to moving a component, by default this method does nothing and so dragging a component and dropping it has no effect
  `static Container`
  `encloseIn(Layout l, Component... cmp)`
  Short-hand for enclosing multiple components in a container typically a box layout
  `static Container`
  `encloseIn(Layout l, Component cmp, Object cons)`
  Short-hand for enclosing a component within a Container
  `Component`
  `findDropTargetAt(int x, int y)`
  Recursively searches the container hierarchy for a drop target
  `Component`
  `findFirstFocusable()`
  Finds the first focusable Component on this Container
  `protected void`
  `fireClicked()`
  When working in 3 softbutton mode "fire" key (center softbutton) is sent to this method in order to allow 3 button devices to work properly.
  `void`
  `flushReplace()`
  Flushes ongoing replace operations to prevent two concurrent replace operations from colliding.
  `void`
  `forceRevalidate()`
  A more powerful form of revalidate that recursively lays out the full hierarchy
  `int`
  `getBottomGap()`
  Returns the gap to be left for the bottom scrollbar on the X axis.
  `List<Component>`
  `getChildrenAsList(boolean includeQueued)`
  Gets the child components of this Container as a List.
  `Component`
  `getClosestComponentTo(int x, int y)`
  Very useful for touch events or drop events that need approximation more than accuracy
  `Component`
  `getComponentAt(int index)`
  Returns the Component at a given index
  `Component`
  `getComponentAt(int x, int y)`
  Returns a Component at coordinate (x, y).
  `int`
  `getComponentCount()`
  Returns the number of components
  `int`
  `getComponentIndex(Component cmp)`
  Returns the Component index in the Container
  `protected int`
  `getGridPosX()`
  This method should be implemented correctly by subclasses to make snap to grid functionality work as expected.
  `protected int`
  `getGridPosY()`
  This method should be implemented correctly by subclasses to make snap to grid functionality work as expected.
  `Layout`
  `getLayout()`
  Returns the layout manager responsible for arranging this container.
  `int`
  `getLayoutHeight()`
  Returns the height for layout manager purposes, this takes scrolling into consideration unlike the getHeight method.
  `int`
  `getLayoutWidth()`
  Returns the width for layout manager purposes, this takes scrolling into consideration unlike the getWidth method.
  `Component`
  `getLeadComponent()`
  Returns the lead component for this hierarchy if such a component is defined
  `Container`
  `getLeadParent()`
  Returns the lead container thats handling the leading, this is useful for a container hierarchy where the parent container might not be the leader
  `Component`
  `getResponderAt(int x, int y)`
  Returns the top-most component that responds to pointer events at absolute coordinate (x, y).
  `Container`
  `getSafeAreaRoot()`
  Gets the Safe area "root" container for this container.
  `int`
  `getScrollIncrement()`
  Gets the Container scroll increment
  `int`
  `getSideGap()`
  Returns the gap to be left for the side scrollbar on the Y axis.
  `UIManager`
  `getUIManager()`
  This method should be used by the Component to retrieve the correct UIManager to work with
  `protected void`
  `initLaf(UIManager uim)`
  This method initializes the Component defaults constants
  `void`
  `invalidate()`
  Same as setShouldCalcPreferredSize(true) but made accessible for layout managers
  `boolean`
  `isEnabled()`
  Indicates whether component is enabled or disabled thus allowing us to prevent a component from receiving input events and indicate so visually
  `boolean`
  `isSafeArea()`
  Checks if this container is a "safe area".
  `boolean`
  `isSafeAreaRoot()`
  Checks if this container is a safe area root.
  `boolean`
  `isScrollableX()`
  Indicates whether the component should/could scroll on the X axis
  `boolean`
  `isScrollableY()`
  Indicates whether the component should/could scroll on the Y axis
  `protected boolean`
  `isSelectableInteraction()`
  This method allows a component to indicate that it is interested in an "implicit" select command to appear in the "fire" button when 3 softbuttons are defined in a device.
  `boolean`
  `isSurface()`
  Checks if this container acts as a Material Design surface.
  `Iterator<Component>`
  `iterator()`
  Part of the Iterable interface allowing us to do a for-each loop on Container
  `Iterator<Component>`
  `iterator(boolean includeQueued)`
  Obtains an iterator that iterates over the children of this container.
  `void`
  `keyPressed(int k)`
  If this Component is focused, the key pressed event will call this method
  `void`
  `keyReleased(int k)`
  If this Component is focused, the key released event will call this method
  `void`
  `layoutContainer()`
  Performs the layout of the container if a layout is necessary
  `void`
  `morph(Component source, Component destination, int duration, Runnable onCompletion)`
  Morph is similar to the replace functionality where a component might be replaced with a component that isn't within the container.
  `void`
  `morphAndWait(Component source, Component destination, int duration)`
  Morph is similar to the replace functionality where a component might be replaced with a component that isn't within the container.
  `void`
  `paint(Graphics g)`
  This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering.
  `void`
  `paintComponentBackground(Graphics g)`
  Paints this container background, skipping container background fill when fully obscured by children.
  `protected void`
  `paintGlass(Graphics g)`
  This method can be overriden by a component to draw on top of itself or its children after the component or the children finished drawing in a similar way to the glass pane but more refined per component
  `protected String`
  `paramString()`
  Returns a string representing the state of this component.
  `void`
  `pointerPressed(int x, int y)`
  If this Component is focused, the pointer pressed event will call this method
  `void`
  `refreshTheme(boolean merge)`
  Makes sure the component is up to date with the current theme, ONLY INVOKE THIS METHOD IF YOU CHANGED THE THEME!
  `void`
  `removeAll()`
  remove all Components from container, notice that removed component might still have a pending repaint in the queue that won't be removed.
  `void`
  `removeComponent(Component cmp)`
  removes a Component from the Container, notice that removed component might still have a pending repaint in the queue that won't be removed.
  `void`
  `replace(Component current, Component next, Transition t)`
  This method replaces the current Component with the next Component.
  `void`
  `replace(Component current, Component next, Transition t, Runnable onFinish, int growSpeed)`
  This method replaces the current Component with the next Component
  `void`
  `replaceAndWait(Component current, Component next, Transition t)`
  This method replaces the current Component with the next Component.
  `void`
  `replaceAndWait(Component current, Component next, Transition t, boolean dropEvents)`
  This method replaces the current Component with the next Component.
  `void`
  `replaceAndWait(Component current, Component next, Transition t, int layoutAnimationSpeed)`
  This method replaces the current Component with the next Component.
  `void`
  `revalidate()`
  Re-layout the container, this is useful when we modify the container hierarchy and need to redo the layout
  `void`
  `revalidateLater()`
  Revalidates the container before the next paint cycle.
  `void`
  `revalidateWithAnimationSafety()`
  Revalidates the container in a way that doesn't conflict with running animations.
  `void`
  `scrollComponentToVisible(Component c)`
  Makes sure the component is visible in the scroll if this container is scrollable
  `void`
  `setCellRenderer(boolean cellRenderer)`
  Used as an optimization to mark that this component is currently being used as a cell renderer
  `void`
  `setEnabled(boolean enabled)`
  This method will recursively set all the Container chidrens to be enabled/disabled.
  `void`
  `setLayout(Layout layout)`
  Sets the layout manager responsible for arranging this container
  `final void`
  `setLeadComponent(Component lead)`
  Sets the lead component for this container, a lead component takes over the entire component hierarchy and receives all the events for the container hierarchy.
  `void`
  `setSafeArea(boolean safeArea)`
  Marks this container as a "safe area", meaning that it will automatically supply sufficient padding as necessary for its children to be laid out inside the safe area of the screen.
  `void`
  `setSafeAreaRoot(boolean root)`
  Set whether this container is a safe area root.
  `void`
  `setScrollable(boolean scrollable)`
  The equivalent of calling both setScrollableY and setScrollableX
  `void`
  `setScrollableX(boolean scrollableX)`
  Sets whether the component should/could scroll on the X axis
  `void`
  `setScrollableY(boolean scrollableY)`
  Sets whether the component should/could scroll on the Y axis
  `void`
  `setScrollIncrement(int scrollIncrement)`
  Determines the scroll increment size of this Container.
  `void`
  `setShouldCalcPreferredSize(boolean shouldCalcPreferredSize)`
  Indicates the values within the component have changed and preferred size should be recalculated
  `protected void`
  `setShouldLayout(boolean layout)`
  Flags this container to preform layout
  `void`
  `setUIManager(UIManager uiManager)`
  Allows replacing the UIManager in a component hierarchy to update the look and feel only to a specific hierarchy
  `int`
  `updateTabIndices(int offset)`
  Updates the tab indices in this container recursively.

  ### Methods inherited from class Component

  `addDragFinishedListener, addDragOverListener, addDropListener, addFocusListener, addLongPressListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, addStateChangeListener, animate, announceForAccessibility, bindProperty, blocksSideSwipe, calcScrollSize, contains, containsOrOwns, createStyleAnimation, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getAccessibilityText, getAllStyles, getAnimationManager, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getCursor, getDefaultDragTransparency, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getDragTransparency, getEditingDelegate, getHeight, getInlineAllStyles, getInlineDisabledStyles, getInlinePressedStyles, getInlineSelectedStyles, getInlineStylesTheme, getInlineUnselectedStyles, getInnerHeight, getInnerPreferredH, getInnerPreferredW, getInnerWidth, getInnerX, getInnerY, getLabelForComponent, getName, getNativeOverlay, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getOuterHeight, getOuterPreferredH, getOuterPreferredW, getOuterWidth, getOuterX, getOuterY, getOwner, getParent, getPreferredH, getPreferredSize, getPreferredSizeStr, getPreferredTabIndex, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTabIndex, getTensileLength, getTextSelectionSupport, getTooltip, getUIID, getUnselectedStyle, getVisibleBounds, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFixedPreferredSize, hasFocus, hideNativeOverlay, initComponent, initCustomStyle, initDisabledStyle, initPressedStyle, initSelectedStyle, initUnselectedStyle, installDefaultPainter, isAlwaysTensile, isBlockLead, isCellRenderer, isChildOf, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isEditable, isEditing, isFlatten, isFocusable, isGrabsPointerEvents, isHidden, isHidden, isHideInLandscape, isHideInPortrait, isIgnorePointerEvents, isInClippingRegion, isInitialized, isOpaque, isOwnedBy, isPinchBlocksDragAndDrop, isRippleEffect, isRTL, isScrollable, isScrollVisible, isSetCursorSupported, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isTraversable, isVisible, keyRepeated, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, onSetFocusable, paintBackground, paintBackgrounds, paintBorder, paintBorderBackground, paintComponent, paintComponent, paintIntersectingComponentsAbove, paintLock, paintLockRelease, paintRippleOverlay, paintScrollbars, paintScrollbarX, paintScrollbarY, paintShadows, parsePreferredSize, pinch, pinch, pinchReleased, pointerDragged, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, refreshTheme, remove, removeDragFinishedListener, removeDragOverListener, removeDropListener, removeFocusListener, removeLongPressListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, removeStateChangeListener, repaint, repaint, requestFocus, resetFocusable, respondsToPointerEvents, scrollRectToVisible, scrollRectToVisible, setAccessibilityText, setAlwaysTensile, setBlockLead, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setCursor, setDefaultDragTransparency, setDirtyRegion, setDisabledStyle, setDraggable, setDragTransparency, setDropTarget, setEditingDelegate, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHidden, setHidden, setHideInLandscape, setHideInPortrait, setIgnorePointerEvents, setInitialized, setInlineAllStyles, setInlineDisabledStyles, setInlinePressedStyles, setInlineSelectedStyles, setInlineStylesTheme, setInlineUnselectedStyles, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setOpaque, setOwner, setPinchBlocksDragAndDrop, setPreferredH, setPreferredSize, setPreferredSizeStr, setPreferredTabIndex, setPreferredW, setPressedStyle, setPropertyValue, setRippleEffect, setRTL, setSameHeight, setSameSize, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSmoothScrolling, setSnapToGrid, setTabIndex, setTactileTouch, setTensileDragEnabled, setTensileLength, setTooltip, setTraversable, setUIID, setUIID, setUIIDFinal, setUnselectedStyle, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, shouldRenderComponentSelection, showNativeOverlay, startEditingAsync, stopEditing, stripMarginAndPadding, styleChanged, toImage, toString, unbindProperty, updateNativeOverlay, visibleBoundsContains`
  Modifier and Type
  Method
  Description
  `void`
  `addDragFinishedListener(ActionListener l)`
  Adds a listener to the dragFinished event
  `void`
  `addDragOverListener(ActionListener l)`
  Broadcasts an event when dragging over a component
  `void`
  `addDropListener(ActionListener l)`
  Binds an action listener to drop events which are invoked when this component is dropped on a target
  `void`
  `addFocusListener(FocusListener l)`
  Registers interest in receiving callbacks for focus gained events, a focus event is invoked when the component accepts the focus.
  `void`
  `addLongPressListener(ActionListener l)`
  Adds a listener to the pointer event
  `void`
  `addPointerDraggedListener(ActionListener l)`
  Adds a listener to the pointer event
  `void`
  `addPointerPressedListener(ActionListener l)`
  Adds a listener to the pointer event
  `void`
  `addPointerReleasedListener(ActionListener l)`
  Adds a listener to the pointer event
  `void`
  `addPullToRefresh(Runnable task)`
  This method adds a refresh task to the Component, the task will be executed if the user has pulled the scroll beyond a certain height.
  `void`
  `addScrollListener(ScrollListener l)`
  Registers interest in receiving callbacks for scroll gained events, a scroll event is invoked when the component is scrolled.
  `void`
  `addStateChangeListener(ActionListener<ComponentStateChangeEvent> l)`
  Adds a listener to be notified when the state of this component is changed to and from initialized.
  `boolean`
  `animate()`
  Allows the animation to reduce "repaint" calls when it returns false.
  `void`
  `announceForAccessibility(String text)`
  Manually announces text to native accessibility services, associating the announcement with this component when possible.
  `void`
  `bindProperty(String prop, BindTarget target)`
  Binds the given property name to the given bind target
  `final boolean`
  `blocksSideSwipe()`
  A component that might need side swipe such as the slider could block it from being used for some other purpose when on top of said component.
  `protected Dimension`
  `calcScrollSize()`
  Method that can be overriden to represent the actual size of the component when it differs from the desireable size for the viewport
  `boolean`
  `contains(int x, int y)`
  Returns true if the given absolute coordinate is contained in the Component
  `boolean`
  `containsOrOwns(int x, int y)`
  Checks to see if this component either contains the given point, or if it owns the component that contains the given point.
  `ComponentAnimation`
  `createStyleAnimation(String destUIID, int duration)`
  Creates an animation that will transform the current component to the styling of the destination UIID when completed.
  `protected void`
  `deinitialize()`
  Invoked to indicate that the component initialization is being reversed since the component was detached from the container hierarchy.
  `protected void`
  `deinitializeCustomStyle(Style s)`
  Allows components to create a style of their own, this method cleans up state for the given style
  `protected void`
  `dragEnter(Component dragged)`
  This callback method indicates that a component drag has just entered this component
  `protected void`
  `dragExit(Component dragged)`
  This callback method provides an indication for a drop target that a drag operation is exiting the bounds of this component and it should clear all relevant state if such state exists.
  `protected void`
  `dragFinished(int x, int y)`
  Callback indicating that the drag has finished either via drop or by releasing the component
  `protected boolean`
  `draggingOver(Component dragged, int x, int y)`
  This method allows a component to indicate if it is a drop target for the given component at the given x/y location (in component coordiate space).
  `protected void`
  `drawDraggedImage(Graphics g, Image img, int x, int y)`
  Draws the given image at x/y, this method can be overriden to draw additional information such as positive or negative drop indication
  `protected void`
  `focusGained()`
  Callback allowing a developer to track when the component gains focus
  `protected void`
  `focusLost()`
  Callback allowing a developer to track wheh the component loses focus
  `int`
  `getAbsoluteX()`
  Returns the absolute X location based on the component hierarchy, this method calculates a location on the screen for the component rather than a relative location as returned by getX()
  `int`
  `getAbsoluteY()`
  Returns the absolute Y location based on the component hierarchy, this method calculates a location on the screen for the component rather than a relative location as returned by getX()
  `String`
  `getAccessibilityText()`
  Returns the text that describes this component to assistive technologies.
  `final Style`
  `getAllStyles()`
  Returns a "meta style" that allows setting styles once to all the different Style objects, the getters for this style will be meaningless and will return 0 values.
  `AnimationManager`
  `getAnimationManager()`
  Returns the animation manager of the parent form or null if this component isn't currently associated with a form
  `int`
  `getBaseline(int width, int height)`
  The baseline for the component text according to which it should be aligned with other components for best visual look.
  `int`
  `getBaselineResizeBehavior()`
  Returns a constant indicating how the baseline varies with the size of the component.
  `String[]`
  `getBindablePropertyNames()`
  Returns the names of the properties within this component that can be bound for persistence, the order of these names mean that the first one will be the first bound
  `Class[]`
  `getBindablePropertyTypes()`
  Returns the types of the properties that are bindable within this component
  `protected Border`
  `getBorder()`
  Normally returns getStyle().getBorder() but some subclasses might use this to programmatically replace the border in runtime e.g.
  `Object`
  `getBoundPropertyValue(String prop)`
  Allows the binding code to extract the value of the property
  `protected Rectangle`
  `getBounds()`
  Returns the component bounds which is sometimes more convenient than invoking getX/Y/Width/Height.
  `Rectangle`
  `getBounds(Rectangle rect)`
  Returns the bounds of this component in the provided Rectangle.
  `Object`
  `getClientProperty(String key)`
  Client properties allow the association of meta-data with a component, this is useful for some applications that construct GUI's on the fly and need to track the connection between the UI and the data.
  `String`
  `getCloudBoundProperty()`
  Indicates the property within this component that should be bound to the cloud object
  `String`
  `getCloudDestinationProperty()`
  The destination property of the CloudObject
  `Form`
  `getComponentForm()`
  Returns the Component Form or null if this Component is not added yet to a form
  `Object`
  `getComponentState()`
  Some components may optionally generate a state which can then be restored using setCompnentState().
  `int`
  `getCursor()`
  Gets the custom cursor for this component.
  `static byte`
  `getDefaultDragTransparency()`
  Returns the default translucency used in the `#getDragImage()` method.
  `final Rectangle`
  `getDirtyRegion()`
  gets the Component dirty region, this method is for internal use only and SHOULD NOT be invoked by user code.
  `Style`
  `getDisabledStyle()`
  Returns the Component Style for the disabled state allowing us to manipulate the look of the component when its disabled
  `int`
  `getDraggedx()`
  Gets the current dragged x values when the Component is being dragged
  `int`
  `getDraggedy()`
  Gets the current dragged y values when the Component is being dragged
  `protected Image`
  `getDragImage()`
  This method returns an image representing the dragged component, it can be overriden by subclasses to customize the look of the image, the image will be overlaid on top of the form during a drag and drop operation
  `protected int`
  `getDragRegionStatus(int x, int y)`
  Indicates if the section within the X/Y area is a "drag region" where we expect people to drag or press in which case we can instantly start dragging making perceived performance faster.
  `protected float`
  `getDragSpeed(boolean vertical)`
  This method returns the dragging speed based on the latest dragged events
  `byte`
  `getDragTransparency()`
  Returns the translucency used in the `#getDragImage()` method.
  `Editable`
  `getEditingDelegate()`
  Gets the delegate that handles the editing of this component.
  `int`
  `getHeight()`
  Returns the component height
  `String`
  `getInlineAllStyles()`
  Gets inline styles that are to be applied to all states of this component.
  `String`
  `getInlineDisabledStyles()`
  Gets inline styles that are to be applied to the disabled state of this component.
  `String`
  `getInlinePressedStyles()`
  Gets inline styles that are to be applied to the pressed state of this component.
  `String`
  `getInlineSelectedStyles()`
  Gets inline styles that are to be applied to the selected state of this component.
  `Resources`
  `getInlineStylesTheme()`
  Gets the theme that is used by inline styles to reference images.
  `String`
  `getInlineUnselectedStyles()`
  Gets inline styles that are to be applied to the unselected state of this component.
  `int`
  `getInnerHeight()`
  Gets the inner height of this component.
  `int`
  `getInnerPreferredH()`
  Gets the preferred height removing vertical padding.
  `int`
  `getInnerPreferredW()`
  Gets the preferred width removing horizontal padding.
  `int`
  `getInnerWidth()`
  Gets the inner width of this component.
  `int`
  `getInnerX()`
  Gets x-coordinate of the inner bounds of this component.
  `int`
  `getInnerY()`
  Gets the inner y-coordinate of the inner bounds of this component.
  `Label`
  `getLabelForComponent()`
  Allows us to indicate the label associated with this component thus providing visual feedback related for this component e.g.
  `String`
  `getName()`
  A component name allows us to easily identify the component within a dynamic UI.
  `Object`
  `getNativeOverlay()`
  Gets the native overlay for this component.
  `Component`
  `getNextFocusDown()`
  Allows us to determine which component will receive focus next when traversing with the down key
  `Component`
  `getNextFocusLeft()`
  Allows us to determine which component will receive focus next when traversing with the left key.
  `Component`
  `getNextFocusRight()`
  Allows us to determine which component will receive focus next when traversing with the right key
  `Component`
  `getNextFocusUp()`
  Allows us to determine which component will receive focus next when traversing with the up key.
  `int`
  `getOuterHeight()`
  Gets the outer height of this component.
  `int`
  `getOuterPreferredH()`
  Gets the preferred height including the vertical margins.
  `int`
  `getOuterPreferredW()`
  Gets the preferred width including horizontal margins.
  `int`
  `getOuterWidth()`
  Gets the outer width of this component.
  `int`
  `getOuterX()`
  Gets the x-coordinate of the outer bounds of this component.
  `int`
  `getOuterY()`
  Gets the Y-coordinate of the outer bounds of this component.
  `Component`
  `getOwner()`
  Gets the "owner" of this component as set by `#setOwner(com.codename1.ui.Component)`.
  `Container`
  `getParent()`
  Returns the container in which this component is contained
  `int`
  `getPreferredH()`
  Helper method to retrieve the preferred height of the component.
  `Dimension`
  `getPreferredSize()`
  Returns the Component Preferred Size, there is no guarantee the Component will be sized at its Preferred Size.
  `String`
  `getPreferredSizeStr()`
  Returns the preferred size string that can be used to specify the preferred size of the component using pixels or millimetres.
  `int`
  `getPreferredTabIndex()`
  Gets the preferred tab index of this component.
  `int`
  `getPreferredW()`
  Helper method to retrieve the preferred width of the component.
  `Style`
  `getPressedStyle()`
  Returns the Component Style for the pressed state allowing us to manipulate the look of the component when it is pressed
  `String[]`
  `getPropertyNames()`
  A component may expose mutable property names for a UI designer to manipulate, this API is designed for usage internally by the GUI builder code
  `String[]`
  `getPropertyTypeNames()`
  This method is here to workaround an XMLVM array type bug where property types aren't identified properly, it returns the names of the types using the following type names: String,int,double,long,byte,short,char,String[],String[][],byte[],Image,Image[],Object[],ListModel,ListCellRenderer
  `Class[]`
  `getPropertyTypes()`
  Matches the property names method (see that method for further details).
  `Object`
  `getPropertyValue(String name)`
  Returns the current value of the property name, this method is used by the GUI builder
  `Component[]`
  `getSameHeight()`
  Returns the array of components that have an equal height
  `Component[]`
  `getSameWidth()`
  Returns the array of components that have an equal width
  `Component`
  `getScrollable()`
  Returns the scrollable parent of this component
  `int`
  `getScrollAnimationSpeed()`
  Scroll animation speed in milliseconds allowing a developer to slow down or accelerate the smooth animation mode
  `Dimension`
  `getScrollDimension()`
  Returns the Components dimension in scrolling, this is very similar to the preferred size aspect only it represents actual scrolling limits.
  `int`
  `getScrollOpacity()`
  This method is used internally by the look and feel to implement the fading scrollbar behavior.
  `int`
  `getScrollOpacityChangeSpeed()`
  Indicates the decrement units for the scroll opacity
  `int`
  `getScrollX()`
  Indicates the X position of the scrolling, this number is relative to the component position and so a position of 0 would indicate the x position of the component.
  `int`
  `getScrollY()`
  Indicates the Y position of the scrolling, this number is relative to the component position and so a position of 0 would indicate the y position of the component.
  `String`
  `getSelectCommandText()`
  Allows determining the text for the select command used in the 3rd softbutton mode.
  `Rectangle`
  `getSelectedRect()`
  Returns the component bounds with absolute screen coordinates, for components that include an internal selection behavior and are not containers (currently only List) this method allows returning the position of the selection itself which is useful for things such as the popup dialog and similar UI's that need to reference the position of the selection externally
  `Style`
  `getSelectedStyle()`
  Returns the Component Style for the selected state allowing us to manipulate the look of the component when it owns focus
  `Style`
  `getStyle()`
  Returns the current Component Style allowing code to draw the current component, you should normally use getUnselected/Pressed/DisabledStyle() and not this method since it will return different values based on component state.
  `int`
  `getTabIndex()`
  Gets the tab index of the component.
  `int`
  `getTensileLength()`
  Recommended length for the tensile, -1 for default
  `TextSelection.TextSelectionSupport`
  `getTextSelectionSupport()`
  Returns text selection support object for this component.
  `String`
  `getTooltip()`

  ###### Returns

  `final String`
  `getUIID()`
  Unique identifier for a component.
  `final Style`
  `getUnselectedStyle()`
  Returns the Component Style for the unselected mode allowing us to manipulate the look of the component
  `protected Rectangle`
  `getVisibleBounds()`
  Returns the component bounds for scrolling which might differ from the getBounds for large components e.g.
  `Rectangle`
  `getVisibleBounds(Rectangle rect)`
  Returns the component bounds for scrolling which might differ from the getBounds for large components into the provided rectangle.
  `int`
  `getWidth()`
  Returns the component width
  `int`
  `getX()`
  Returns the current component x location relatively to its parent container
  `int`
  `getY()`
  Returns the component y location relatively to its parent container
  `void`
  `growShrink(int duration)`
  Grows or shrinks this component to its new preferred size, this method essentially takes a component whose preferred size has changed and creates a "growing" effect that lasts for the duration.
  `boolean`
  `handlesInput()`
  Prevents key events from being grabbed for focus traversal.
  `boolean`
  `hasFixedPreferredSize()`
  Checks if this component has a fixed preferred size either via an explicit call to `#setPreferredH(int)` and `#setPreferredW(int)`, or via a preferred size style string.
  `boolean`
  `hasFocus()`
  Returns true if the component has focus
  `protected void`
  `hideNativeOverlay()`
  Hides the native overlay for this component.
  `protected void`
  `initComponent()`
  Allows subclasses to bind functionality that relies on fully initialized and "ready for action" component state
  `protected void`
  `initCustomStyle(Style s)`
  Allows components to create a style of their own, this method binds the listener to the style and installs a bg painter
  `protected void`
  `initDisabledStyle(Style disabledStyle)`
  Can be overridden by subclasses to perform initialization when the disabled style is set to a new value.
  `protected void`
  `initPressedStyle(Style pressedStyle)`
  Can be overridden by subclasses to perform initialization when the pressed style is set to a new value.
  `protected void`
  `initSelectedStyle(Style selectedStyle)`
  Can be overridden by subclasses to perform initialization when the selected style is set to a new value.
  `protected void`
  `initUnselectedStyle(Style unselectedStyle)`
  Can be overridden by subclasses to perform initialization when the unselected style is set to a new value.
  `protected void`
  `installDefaultPainter(Style s)`
  Allows subclasses to create their own custom style types and install the background painter into them
  `boolean`
  `isAlwaysTensile()`
  Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)
  `boolean`
  `isBlockLead()`
  Prevent a lead component hierarchy from this specific component, this allows a component within that hierarchy to still act as a standalone component
  `boolean`
  `isCellRenderer()`
  Used as an optimization to mark that this component is currently being used as a cell renderer
  `boolean`
  `isChildOf(Container cnt)`
  Searches the hierarchy of the component recursively to see if the given Container is one of the parents of this component
  `protected boolean`
  `isDragActivated()`
  Indicates whether we are in the middle of a drag operation, this method allows developers overriding the pointer released events to know when this is a drag operation.
  `protected boolean`
  `isDragAndDropOperation(int x, int y)`
  This method allows a developer to define only a specific portion of a component as draggable by default it returns true if the component is defined as "draggable"
  `boolean`
  `isDraggable()`
  Indicates whether this component can be dragged in a drag and drop operation rather than scroll the parent
  `protected boolean`
  `isDragRegion(int x, int y)`
  Indicates if the section within the X/Y area is a "drag region" where we expect people to drag and never actually "press" in which case we can instantly start dragging making perceived performance faster.
  `boolean`
  `isDropTarget()`
  Indicates whether this component can receive dropped components into it, notice that when dropping on a component or container the parents will be checked recursively to find a valid drop target
  `boolean`
  `isEditable()`
  Checks to see if the component is editable.
  `boolean`
  `isEditing()`
  Checks if the component is currently being edited.
  `boolean`
  `isFlatten()`
  Makes the component effectively opaque by blending the backgrounds into an image in memory so the layer of underlying components is only drawn once when this component is repainted.
  `boolean`
  `isFocusable()`
  Returns true if this component can receive focus and is enabled
  `boolean`
  `isGrabsPointerEvents()`
  This property is useful for blocking in z-order touch events, sometimes we might want to grab touch events in a specific component without making it focusable.
  `boolean`
  `isHidden()`
  Returns true if the component was explicitly hidden by the user.
  `boolean`
  `isHidden(boolean checkParent)`
  Checks if the component is hidden.
  `boolean`
  `isHideInLandscape()`
  Indicates that this component and all its children should be hidden when the device is switched to landscape mode
  `boolean`
  `isHideInPortrait()`
  Indicates that this component and all its children should be hidden when the device is switched to portrait mode
  `boolean`
  `isIgnorePointerEvents()`

  ###### Returns

  `protected boolean`
  `isInClippingRegion(Graphics g)`
  `protected boolean`
  `isInitialized()`
  Indicates if the component is in the initialized state, a component is initialized when its initComponent() method was invoked.
  `boolean`
  `isOpaque()`
  Checks whether the component's background should be painted.
  `boolean`
  `isOwnedBy(Component cmp)`
  Checks to see if this component is owned by the given other component.
  `boolean`
  `isPinchBlocksDragAndDrop()`
  returns true if pinch will block drag and drop
  `boolean`
  `isRippleEffect()`
  Indicates whether the component displays the material design ripple effect
  `final boolean`
  `isRTL()`
  Is the component a bidi RTL component
  `protected boolean`
  `isScrollable()`
  Indicates whether the component should/could scroll by default a component is not scrollable.
  `boolean`
  `isScrollVisible()`
  Indicate whether this component scroll is visible
  `static boolean`
  `isSetCursorSupported()`
  Checks to see if this platform supports cursors.
  `boolean`
  `isSmoothScrolling()`
  Indicates that scrolling through the component should work as an animation
  `boolean`
  `isSnapToGrid()`
  Indicates whether scrolling this component should jump to a specific location in a grid
  `protected boolean`
  `isStickyDrag()`
  Returns true if the component is interested in receiving drag/pointer release events even after the gesture exceeded its boundaries.
  `boolean`
  `isTactileTouch()`
  Indicates whether the component should "trigger" tactile touch when pressed by the user in a touch screen UI.
  `protected boolean`
  `isTactileTouch(int x, int y)`
  Elaborate components might not provide tactile feedback for all their areas (e.g. Lists) this method defaults to returning the value of isTactileTouch
  `boolean`
  `isTensileDragEnabled()`
  Indicates whether tensile drag (dragging beyond the boundry of the component and snapping back) is enabled for this component.
  `final boolean`
  `isTraversable()`
  Checks if this component should be traversable using the keyboard using tab, next, previous keys.
  `boolean`
  `isVisible()`
  Returns whether the component is visible or not
  `void`
  `keyRepeated(int keyCode)`
  If this Component is focused, the key repeat event will call this method.
  `protected void`
  `laidOut()`
  This is a callback method to inform the Component when it's been laidout on the parent Container
  `protected void`
  `longKeyPress(int keyCode)`
  If this Component is focused this method is invoked when the user presses and holds the key
  `void`
  `longPointerPress(int x, int y)`
  If this Component is focused this method is invoked when the user presses and holds the pointer on the Component
  `protected void`
  `onScrollX(int scrollX)`
  This method can be overriden to receive scroll events, unlike overriding setScrollX it will receive all calls for scrolling.
  `protected void`
  `onScrollY(int scrollY)`
  This method can be overriden to receive scroll events, unlike overriding setScrollY it will receive all calls for scrolling.
  `protected void`
  `onSetFocusable(boolean focusable)`
  Since setFocusable is final this callback is invoked when focusable changes.
  `protected void`
  `paintBackground(Graphics g)`
  This method paints the Component background, it should be overriden by subclasses to perform custom background drawing.
  `void`
  `paintBackgrounds(Graphics g)`
  This method paints all the parents Components Background.
  `protected void`
  `paintBorder(Graphics g)`
  Draws the component border if such a border exists.
  `protected void`
  `paintBorderBackground(Graphics g)`
  Draws the component border background if such a border exists.
  `final void`
  `paintComponent(Graphics g)`
  Paints this component as a root by going to all the parent components and setting the absolute translation based on coordinates and scroll status.
  `final void`
  `paintComponent(Graphics g, boolean background)`
  Paints this component as a root by going to all the parent components and setting the absolute translation based on coordinates and scroll status.
  `void`
  `paintIntersectingComponentsAbove(Graphics g)`
  Paints intersecting components that appear above this component.
  `Image`
  `paintLock(boolean hardLock)`
  This method locks the component so it will always paint the given image instead of running through its paint logic.
  `void`
  `paintLockRelease()`
  Releases the paint lock image to allow paint to work as usual, see paintLock(boolean) for details
  `void`
  `paintRippleOverlay(Graphics g, int x, int y, int position)`
  Invoked to draw the ripple effect overlay in Android where the finger of the user causes a growing circular overlay over time.
  `protected void`
  `paintScrollbars(Graphics g)`
  Paints the UI for the scrollbars on the component, this will be invoked only for scrollable components.
  `protected void`
  `paintScrollbarX(Graphics g)`
  Paints the UI for the scrollbar on the X axis, this method allows component subclasses to customize the look of a scrollbar
  `protected void`
  `paintScrollbarY(Graphics g)`
  Paints the UI for the scrollbar on the Y axis, this method allows component subclasses to customize the look of a scrollbar
  `void`
  `paintShadows(Graphics g, int relativeX, int relativeY)`
  Paints the drop-shadow projections for this component based on its elevation value.
  `static Dimension`
  `parsePreferredSize(String preferredSize, Dimension baseSize)`
  Parses the preferred size given as a string
  `protected boolean`
  `pinch(float scale)`
  Invoked by subclasses interested in handling pinch to zoom events, if true is returned other drag events will not be broadcast
  `protected boolean`
  `pinch(int[] x, int[] y)`
  Invoked by subclasses interested in handling pinch to do their own actions based on the position of the two fingers, if true is returned other drag events will not be broadcast
  `protected void`
  `pinchReleased(int x, int y)`
  To be implemented by subclasses interested in being notified when a pinch zoom has ended (i.e the user has removed one of their fingers, but is still dragging).
  `void`
  `pointerDragged(int[] x, int[] y)`
  If this Component is focused, the pointer dragged event will call this method
  `void`
  `pointerDragged(int x, int y)`
  If this Component is focused, the pointer dragged event will call this method
  `void`
  `pointerHover(int[] x, int[] y)`
  Invoked for devices where the pointer can hover without actually clicking the display.
  `void`
  `pointerHoverPressed(int[] x, int[] y)`
  Invoked for devices where the pointer can hover without actually clicking the display.
  `void`
  `pointerHoverReleased(int[] x, int[] y)`
  Invoked for devices where the pointer can hover without actually clicking the display.
  `void`
  `pointerPressed(int[] x, int[] y)`
  If this Component is focused, the pointer pressed event will call this method
  `void`
  `pointerReleased(int[] x, int[] y)`
  If this Component is focused, the pointer released event will call this method
  `void`
  `pointerReleased(int x, int y)`
  If this Component is focused, the pointer released event will call this method
  `void`
  `putClientProperty(String key, Object value)`
  Client properties allow the association of meta-data with a component, this is useful for some applications that construct GUI's on the fly and need to track the connection between the UI and the data.
  `void`
  `refreshTheme()`
  Makes sure the component is up to date with the current theme, ONLY INVOKE THIS METHOD IF YOU CHANGED THE THEME!
  `protected void`
  `refreshTheme(String id, boolean merge)`
  Makes sure the component is up to date with the given UIID
  `void`
  `remove()`
  This method will remove the Component from its parent.
  `void`
  `removeDragFinishedListener(ActionListener l)`
  Removes the listener from the drag finished event
  `void`
  `removeDragOverListener(ActionListener l)`
  Removes an action listener to drag over events
  `void`
  `removeDropListener(ActionListener l)`
  Removes an action listener to drop events which are invoked when this component is dropped on a target
  `void`
  `removeFocusListener(FocusListener l)`
  Deregisters interest in receiving callbacks for focus gained events
  `void`
  `removeLongPressListener(ActionListener l)`
  Removes the listener from the pointer event
  `void`
  `removePointerDraggedListener(ActionListener l)`
  Removes the listener from the pointer event
  `void`
  `removePointerPressedListener(ActionListener l)`
  Removes the listener from the pointer event
  `void`
  `removePointerReleasedListener(ActionListener l)`
  Removes the listener from the pointer event
  `void`
  `removeScrollListener(ScrollListener l)`
  Deregisters interest in receiving callbacks for scroll gained events
  `void`
  `removeStateChangeListener(ActionListener<ComponentStateChangeEvent> l)`
  Removes a listener from being notified when the state of this component is changed to and from initialized.
  `void`
  `repaint()`
  Repaint this Component, the repaint call causes a callback of the paint method on the event dispatch thread.
  `void`
  `repaint(int x, int y, int w, int h)`
  Repaints a specific region within the component
  `void`
  `requestFocus()`
  Changes the current component to the focused component, will work only for a component that belongs to a parent form.
  `protected void`
  `resetFocusable()`
  Restores the state of the focusable flag to its default state
  `boolean`
  `respondsToPointerEvents()`
  Checks if the component responds to pointer events.
  `void`
  `scrollRectToVisible(int x, int y, int width, int height, Component coordinateSpace)`
  Makes sure the component is visible in the scroll if this container is scrollable
  `protected void`
  `scrollRectToVisible(Rectangle rect, Component coordinateSpace)`
  Makes sure the component is visible in the scroll if this container is scrollable
  `void`
  `setAccessibilityText(String text)`
  Sets the text that describes this component to assistive technologies.
  `void`
  `setAlwaysTensile(boolean alwaysTensile)`
  Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)
  `void`
  `setBlockLead(boolean blockLead)`
  Prevent a lead component hierarchy from this specific component, this allows a component within that hierarchy to still act as a standalone component
  `void`
  `setBoundPropertyValue(String prop, Object value)`
  Sets the value of a bound property within this component, notice that this method MUST NOT fire the property change event when invoked to prevent recursion!
  `void`
  `setCloudBoundProperty(String cloudBoundProperty)`
  Indicates the property within this component that should be bound to the cloud object
  `void`
  `setCloudDestinationProperty(String cloudDestinationProperty)`
  The destination property of the CloudObject
  `void`
  `setComponentState(Object state)`
  If getComponentState returned a value the setter can update the value and restore the prior state.
  `void`
  `setCursor(int cursor)`
  Sets a custom mouse cursor for this component if the platform supports mouse cursors, notice that this isn't applicable for touch devices.
  `static void`
  `setDefaultDragTransparency(byte defaultDragTransparency)`
  Sets the default translucency of the `#getDragImage()` method.
  `final void`
  `setDirtyRegion(Rectangle dirty)`
  sets the Component dirty region, this method is for internal use only and SHOULD NOT be invoked by user code.
  `void`
  `setDisabledStyle(Style style)`
  Changes the Component disalbed Style by replacing the Component Style with the given Style
  `void`
  `setDraggable(boolean draggable)`
  Indicates whether this component can be dragged in a drag and drop operation rather than scroll the parent
  `void`
  `setDragTransparency(byte dragTransparency)`
  Sets the translucency of the `#getDragImage()` method.
  `void`
  `setDropTarget(boolean dropTarget)`
  Indicates whether this component can receive dropped components into it, notice that when dropping on a component or container the parents will be checked recursively to find a valid drop target
  `void`
  `setEditingDelegate(Editable editable)`
  Sets the editing delegate for this component.
  `void`
  `setFlatten(boolean flatten)`
  Makes the component effectively opaque by blending the backgrounds into an image in memory so the layer of underlying components is only drawn once when this component is repainted.
  `void`
  `setFocus(boolean focused)`
  This flag doesn't really give focus, its a state that determines what colors from the Style should be used when painting the component.
  `final void`
  `setFocusable(boolean focusable)`
  A simple setter to determine if this Component can get focused
  `void`
  `setGrabsPointerEvents(boolean grabsPointerEvents)`
  This property is useful for blocking in z-order touch events, sometimes we might want to grab touch events in a specific component without making it focusable.
  `void`
  `setHandlesInput(boolean handlesInput)`
  Prevents key events from being grabbed for focus traversal.
  `void`
  `setHeight(int height)`
  Sets the Component height, this method is exposed for the purpose of external layout managers and should not be invoked directly.
  `void`
  `setHidden(boolean b)`
  Makes the components preferred size equal 0 when hidden and restores it to the default size when not.
  `void`
  `setHidden(boolean b, boolean changeMargin)`
  Makes the components preferred size equal 0 when hidden and restores it to the default size when not.
  `void`
  `setHideInLandscape(boolean hideInLandscape)`
  Indicates that this component and all its children should be hidden when the device is switched to landscape mode
  `void`
  `setHideInPortrait(boolean hideInPortrait)`
  Indicates that this component and all its children should be hidden when the device is switched to portrait mode
  `void`
  `setIgnorePointerEvents(boolean ignorePointerEvents)`

  ###### Parameters

  `protected void`
  `setInitialized(boolean initialized)`
  Indicates if the component is in the initialized state, a component is initialized when its initComponent() method was invoked.
  `void`
  `setInlineAllStyles(String styles)`
  Registers inline styles that should be applied to all states of the component.
  `void`
  `setInlineDisabledStyles(String styles)`
  Registers inline styles that should be applied to the disabled state of the component.
  `void`
  `setInlinePressedStyles(String styles)`
  Registers inline styles that should be applied to the pressed state of the component.
  `void`
  `setInlineSelectedStyles(String styles)`
  Registers inline styles that should be applied to the selected state of the component.
  `void`
  `setInlineStylesTheme(Resources inlineStylesTheme)`
  Sets the theme that is used by inline styles to reference images.
  `void`
  `setInlineUnselectedStyles(String styles)`
  Registers inline styles that should be applied to the unselected state of the component.
  `void`
  `setIsScrollVisible(boolean isScrollVisible)`
  Set whether this component scroll is visible
  `void`
  `setLabelForComponent(Label componentLabel)`
  Allows us to indicate the label associated with this component thus providing visual feedback related for this component e.g.
  `void`
  `setName(String name)`
  A component name allows us to easily identify the component within a dynamic UI.
  `void`
  `setNextFocusDown(Component nextFocusDown)`
  Allows us to determine which component will receive focus next when traversing with the down key
  `void`
  `setNextFocusLeft(Component nextFocusLeft)`
  Allows us to determine which component will receive focus next when traversing with the left key, this method doesn't affect the general focus behavior.
  `void`
  `setNextFocusRight(Component nextFocusRight)`
  Allows us to determine which component will receive focus next when traversing with the right key
  `void`
  `setNextFocusUp(Component nextFocusUp)`
  Allows us to determine which component will receive focus next when traversing with the up key, this method doesn't affect the general focus behavior.
  `final void`
  `setOpaque(boolean opaque)`
  Sets whether or not to paint the component background.
  `void`
  `setOwner(Component owner)`
  Sets the owner of this component to the specified component.
  `void`
  `setPinchBlocksDragAndDrop(boolean block)`
  If a component supports pinch as well as drag and drop the two may conflict (if one finger is placed a bit before the other, the drag timer will be initiated and may trigger drag even if the second finger has been placed before).
  `void`
  `setPreferredH(int preferredH)`
  Helper method to set the preferred height of the component.
  `void`
  `setPreferredSize(Dimension d)`
  Sets the Component Preferred Size, there is no guarantee the Component will be sized at its Preferred Size.
  `void`
  `setPreferredSizeStr(String value)`

  ###### Parameters

  `void`
  `setPreferredTabIndex(int index)`
  Sets the preferred tab index of the component.
  `void`
  `setPreferredW(int preferredW)`
  Helper method to set the preferred width of the component.
  `void`
  `setPressedStyle(Style style)`
  Sets the Component Style for the pressed state allowing us to manipulate the look of the component when it is pressed
  `String`
  `setPropertyValue(String name, Object value)`
  Sets a new value to the given property, returns an error message if failed and null if successful.
  `void`
  `setRippleEffect(boolean rippleEffect)`
  Indicates whether the component displays the material design ripple effect
  `void`
  `setRTL(boolean rtl)`
  Is the component a bidi RTL component
  `static void`
  `setSameHeight(Component... c)`
  Places all of these components in the same height group, to remove a component from the group invoke this method with that component only.
  `static void`
  `setSameSize(Component... c)`
  This is identical to invoking `#sameWidth` followed by `#sameHeight`
  `static void`
  `setSameWidth(Component... c)`
  Places all of these components in the same width group, to remove a component from the group invoke this method with that component only.
  `void`
  `setScrollAnimationSpeed(int animationSpeed)`
  Scroll animation speed in milliseconds allowing a developer to slow down or accelerate the smooth animation mode
  `void`
  `setScrollOpacityChangeSpeed(int scrollOpacityChangeSpeed)`
  Indicates the decrement units for the scroll opacity
  `void`
  `setScrollSize(Dimension d)`
  Set the size for the scroll area
  `void`
  `setScrollVisible(boolean isScrollVisible)`
  Set whether this component scroll is visible
  `protected void`
  `setScrollX(int scrollX)`
  Indicates the X position of the scrolling, this number is relative to the component position and so a position of 0 would indicate the x position of the component.
  `protected void`
  `setScrollY(int scrollY)`
  Indicates the Y position of the scrolling, this number is relative to the component position and so a position of 0 would indicate the y position of the component.
  `void`
  `setSelectCommandText(String selectText)`
  Allows determining the text for the select command used in the 3rd softbutton mode.
  `void`
  `setSelectedStyle(Style style)`
  Changes the Component selected Style by replacing the Component Style with the given Style
  `void`
  `setSize(Dimension d)`
  Sets the Component size, this method is exposed for the purpose of external layout managers and should not be invoked directly.
  `void`
  `setSmoothScrolling(boolean smoothScrolling)`
  Indicates that scrolling through the component should work as an animation
  `void`
  `setSnapToGrid(boolean snapToGrid)`
  Indicates whether scrolling this component should jump to a specific location in a grid
  `void`
  `setTabIndex(int index)`
  Sets the tab index of the component.
  `void`
  `setTactileTouch(boolean tactileTouch)`
  Indicates whether the component should "trigger" tactile touch when pressed by the user in a touch screen UI.
  `void`
  `setTensileDragEnabled(boolean tensileDragEnabled)`
  Indicates whether tensile drag (dragging beyond the boundry of the component and snapping back) is enabled for this component.
  `void`
  `setTensileLength(int tensileLength)`
  Recommended length for the tensile, -1 for default
  `void`
  `setTooltip(String tooltip)`

  ###### Parameters

  `final void`
  `setTraversable(boolean traversable)`
  Sets whether this component is traversable using the keyboard using tab, next, previous keys.
  `void`
  `setUIID(String id)`
  This method sets the Component the Unique identifier.
  `void`
  `setUIID(String portraitUiid, String landscapeUiid)`
  This method sets the Component the Unique identifier.
  `protected final void`
  `setUIIDFinal(String id)`
  This method is the implementation of setUIID and is defined as final to allow invocation from constructors.
  `void`
  `setUnselectedStyle(Style style)`
  Changes the Component Style by replacing the Component Style with the given Style
  `void`
  `setVisible(boolean visible)`
  Toggles visibility of the component
  `void`
  `setWidth(int width)`
  Sets the Component width, this method is exposed for the purpose of external layout managers and should not be invoked directly.
  `void`
  `setX(int x)`
  Sets the Component x location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly.
  `void`
  `setY(int y)`
  Sets the Component y location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly.
  `protected boolean`
  `shouldBlockSideSwipe()`
  A component that might need side swipe such as the slider could block it from being used for some other purpose when on top of said component.
  `protected boolean`
  `shouldBlockSideSwipeLeft()`
  A component that might need side swipe such as the tabs could block it from being used for some other purpose when on top of said component.
  `protected boolean`
  `shouldBlockSideSwipeRight()`
  A component that might need side swipe such as the tabs could block it from being used for some other purpose when on top of said component.
  `protected boolean`
  `shouldRenderComponentSelection()`
  A component can indicate whether it is interested in rendering it's selection explicitly, this defaults to true in non-touch UI's and false in touch UI's except for the case where a user clicks the screen.
  `protected void`
  `showNativeOverlay()`
  Creates the native overlay for this component.
  `void`
  `startEditingAsync()`
  If the component `#isEditable()`, then this will start the editing process.
  `void`
  `stopEditing(Runnable onFinish)`
  Stops the editing process.
  `Component`
  `stripMarginAndPadding()`
  Convenience method that strips margin and padding from the component, and returns itself for chaining.
  `void`
  `styleChanged(String propertyName, Style source)`
  Invoked to indicate a change in a propertyName of a Style
  `Image`
  `toImage()`
  Returns the component as an image.
  `String`
  `toString()`
  Overriden to return a useful value for debugging purposes
  `void`
  `unbindProperty(String prop, BindTarget target)`
  Removes a bind target from the given property name
  `protected void`
  `updateNativeOverlay()`
  Updates the native overlay for this component.
  `boolean`
  `visibleBoundsContains(int x, int y)`
  Returns true if the given absolute coordinate is contained inside the visible bounds of the component.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### Container

    public Container(Layout layout, String uiid)

    Constructs a new Container with a new layout manager and UIID

    ###### Parameters

    - `layout`: the specified layout manager

    - `uiid`: the uiid of the container

  - ### Container

    public Container(Layout layout)

    Constructs a new Container with a new layout manager.

    ###### Parameters

    - `layout`: the specified layout manager

  - ### Container

    public Container()
    Constructs a new Container, with a `FlowLayout`.

- ## Method Details

  - ### encloseIn

    public static Container encloseIn(Layout l, Component cmp, Object cons)

    Short-hand for enclosing a component within a Container

    ###### Parameters

    - `l`: the layout

    - `cmp`: the component to enclose

    - `cons`: the constraint for the component

    ###### Returns

    a newly created container containing the given component

  - ### encloseIn

    public static Container encloseIn(Layout l, Component... cmp)

    Short-hand for enclosing multiple components in a container typically a box layout

    ###### Parameters

    - `l`: the layout

    - `cmp`: the components to enclose

    ###### Returns

    a newly created container containing the given components

  - ### initLaf

    protected void initLaf(UIManager uim)
    This method initializes the Component defaults constants
    Overrides:
      `initLaf` in class `Component`

  - ### getUIManager

    public UIManager getUIManager()

    This method should be used by the Component to retrieve the correct UIManager to work with

    ###### Returns

    a UIManager instance

    Overrides:
      `getUIManager` in class `Component`

  - ### setUIManager

    public void setUIManager(UIManager uiManager)

    Allows replacing the UIManager in a component hierarchy to update the look and feel only to a specific hierarchy

    ###### Parameters

    - `uiManager`: UIManager instance

  - ### isSurface

    public boolean isSurface()

    Checks if this container acts as a Material Design surface. "Surface" containers render drop-shadows for their elevated descendents.

    ###### Returns

    True if this container is a surface.

    ###### Since

    8.0

  - ### add

    public final Container add(Component cmp)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `cmp`: the component to add

    ###### Returns

    this for call chaining

  - ### addAll

    public Container addAll(Component... cmps)

    Identical to add(x).add(y) only with a shorter syntax

    ###### Parameters

    - `cmps`: the other components to add

    ###### Returns

    this for call chaining

  - ### add

    public Container add(Object constraint, Component cmp)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `constraint`: the layout constraint if applicable

    - `cmp`: the component to add

    ###### Returns

    this for call chaining

  - ### add

    public Container add(String label)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `label`: a string that will be wrapped as a label, this is equivalent to calling add(new Label(l))

    ###### Returns

    this for call chaining

  - ### add

    public Container add(Image img)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `img`: an image that will be wrapped as a label, this is equivalent to calling add(new Label(l))

    ###### Returns

    this for call chaining

  - ### add

    public Container add(Object constraint, String label)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `constraint`: the layout constraint if applicable

    - `label`: a component that will be wrapped as a label, this is equivalent to calling add(new Label(l))

    ###### Returns

    this for call chaining

  - ### add

    public Container add(Object constraint, Image img)

    Simpler version of addComponent that allows chaining the calls for shorter syntax

    ###### Parameters

    - `constraint`: the layout constraint if applicable

    - `img`: an image that will be wrapped as a label, this is equivalent to calling add(new Label(l))

    ###### Returns

    this for call chaining

  - ### getLeadComponent

    public Component getLeadComponent()

    Returns the lead component for this hierarchy if such a component is defined

    ###### Returns

    the lead component

  - ### setLeadComponent

    public final void setLeadComponent(Component lead)

    Sets the lead component for this container, a lead component takes over the entire component hierarchy and receives all the events for the container hierarchy.

    ###### Parameters

    - `lead`: component that takes over the hierarchy

  - ### getLeadParent

    public Container getLeadParent()

    Returns the lead container thats handling the leading, this is useful for a container hierarchy where the parent container might not be the leader

    ###### Returns

    the lead component

  - ### keyPressed

    public void keyPressed(int k)

    If this Component is focused, the key pressed event will call this method

    ###### Parameters

    - `keyCode`: the key code value to indicate a physical key.
    Overrides:
      `keyPressed` in class `Component`

  - ### keyReleased

    public void keyReleased(int k)

    If this Component is focused, the key released event will call this method

    ###### Parameters

    - `keyCode`: the key code value to indicate a physical key.
    Overrides:
      `keyReleased` in class `Component`

  - ### getLayout

    public Layout getLayout()

    Returns the layout manager responsible for arranging this container.

    ###### Returns

    the container layout manager

  - ### setLayout

    public void setLayout(Layout layout)

    Sets the layout manager responsible for arranging this container

    ###### Parameters

    - `layout`: the specified layout manager

  - ### invalidate

    public void invalidate()
    Same as setShouldCalcPreferredSize(true) but made accessible for layout managers

  - ### setShouldLayout

    protected void setShouldLayout(boolean layout)

    Flags this container to preform layout

    ###### Parameters

    - `layout`

  - ### setShouldCalcPreferredSize

    public void setShouldCalcPreferredSize(boolean shouldCalcPreferredSize)

    Indicates the values within the component have changed and preferred size should be recalculated

    ###### Parameters

    - `shouldCalcPreferredSize`: @param shouldCalcPreferredSize indicate whether this component need to recalculate his preferred size
    Overrides:
      `setShouldCalcPreferredSize` in class `Component`

  - ### getLayoutWidth

    public int getLayoutWidth()

    Returns the width for layout manager purposes, this takes scrolling into consideration unlike the getWidth method.

    ###### Returns

    the layout width

  - ### getLayoutHeight

    public int getLayoutHeight()

    Returns the height for layout manager purposes, this takes scrolling into consideration unlike the getHeight method.

    ###### Returns

    the layout height

  - ### applyRTL

    public void applyRTL(boolean rtl)

    Invokes apply/setRTL recursively on all the children components of this container

    ###### Parameters

    - `rtl`: right to left bidi indication

    ###### See also

    - Component#setRTL(boolean)

  - ### constrainWidthWhenScrollable

    protected boolean constrainWidthWhenScrollable()

    Indicates that children's widths should be calculated as if this component weren't scrollable-X, even when the component is scrollable X. Normally, when a component is figuring out its layout width, it will walk up the UI hierarchy to find the first scrollable container. If there is a scrollable container, then the component will try to grow as big as it wants. If there are no scrollable containers found, it will constrain itself to the space available. In some cases, we may want the children of a component to lay themselves out conservatively though because it wants to use its scrollability for other features.

    ###### Returns

    Returns:

      True if children should calculate their layout widgets as if the component weren't scrollable.

      ###### Since

      7.0

  - ### constrainHeightWhenScrollable

    protected boolean constrainHeightWhenScrollable()

    Indicates that children's widths should be calculated as if this component weren't scrollable-X, even when the component is scrollable Y. Normally, when a component is figuring out its layout width, it will walk up the UI hierarchy to find the first scrollable container. If there is a scrollable container, then the component will try to grow as big as it wants. If there are no scrollable containers found, it will constrain itself to the space available. In some cases, we may want the children of a component to lay themselves out conservatively though because it wants to use its scrollability for other features.

    ###### Returns

    Returns:

      True if children should calculate their layout widgets as if the component weren't scrollable.

      ###### Since

      7.0

  - ### addComponent

    public void addComponent(Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `cmp`: the component to be added

  - ### addComponent

    public void addComponent(Object constraints, Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `constraints`: @param constraints this method is useful when the Layout requires a constraint such as the BorderLayout. In this case you need to specify an additional data when you add a Component, such as "CENTER", "NORTH"...

    - `cmp`: component to add

  - ### addComponent

    public void addComponent(int index, Object constraints, Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `index`: location to insert the Component

    - `constraints`: @param constraints this method is useful when the Layout requires a constraint such as the BorderLayout. In this case you need to specify an additional data when you add a Component, such as "CENTER", "NORTH"...

    - `cmp`: component to add

  - ### addComponent

    public void addComponent(int index, Component cmp)

    This method adds the Component at a specific index location in the Container Components array.

    ###### Parameters

    - `index`: location to insert the Component

    - `cmp`: the Component to add

    ###### Throws

    - `ArrayIndexOutOfBoundsException`: if index is out of bounds

    - `IllegalArgumentException`: @throws IllegalArgumentException if Component is already contained or the cmp is a Form Component

  - ### replaceAndWait

    public void replaceAndWait(Component current, Component next, Transition t)

    This method replaces the current Component with the next Component. Current Component must be contained in this Container. This method returns when transition has finished.

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

  - ### replaceAndWait

    public void replaceAndWait(Component current, Component next, Transition t, int layoutAnimationSpeed)

    This method replaces the current Component with the next Component. Current Component must be contained in this Container. This method returns when transition has finished.

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

    - `layoutAnimationSpeed`: the speed of the layout animation after replace is completed

  - ### replace

    public void replace(Component current, Component next, Transition t, Runnable onFinish, int growSpeed)

    This method replaces the current Component with the next Component

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

    - `onFinish`: invoked when the replace operation is completed, may be null

    - `growSpeed`: @param growSpeed after replace is completed the component can gradually grow/shrink to fill up available room, set this to 0 for immediate growth or any larger number for gradual animation. -1 indicates a special case where no validation occurs

  - ### replaceAndWait

    public void replaceAndWait(Component current, Component next, Transition t, boolean dropEvents)

    This method replaces the current Component with the next Component. Current Component must be contained in this Container. This method returns when transition has finished.

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

    - `dropEvents`: @param dropEvents indicates if the display should drop all events while this Component replacing is happening

  - ### replace

    public void replace(Component current, Component next, Transition t)

    This method replaces the current Component with the next Component. Current Component must be contained in this Container. This method return immediately.

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

  - ### createReplaceTransition

    public ComponentAnimation createReplaceTransition(Component current, Component next, Transition t)

    This method creates an animation component that replaces the current Component with the next Component. Current Component must be contained in this Container. This method return immediately.

    ###### Parameters

    - `current`: a Component to remove from the Container

    - `next`: a Component that replaces the current Component

    - `t`: @param t a Transition between the add and removal of the Components a Transition can be null

    ###### Returns

    animation component that can be queued

  - ### isEnabled

    public boolean isEnabled()

    Indicates whether component is enabled or disabled thus allowing us to prevent a component from receiving input events and indicate so visually

    ###### Returns

    true if enabled

    Overrides:
      `isEnabled` in class `Component`

  - ### setEnabled

    public void setEnabled(boolean enabled)

    This method will recursively set all the Container chidrens to be enabled/disabled. If the Container is disabled and a child Component changed it's state to be enabled, the child Component will be treated as an enabled Component.

    ###### Parameters

    - `enabled`
    Overrides:
      `setEnabled` in class `Component`

  - ### removeComponent

    public void removeComponent(Component cmp)

    removes a Component from the Container, notice that removed component might still have a pending repaint in the queue that won't be removed. Calling form.repaint() will workaround such an issue.

    ###### Parameters

    - `cmp`: the removed component

  - ### cancelRepaints

    protected void cancelRepaints()
    remove this component and it's children from the painting queue
    Overrides:
      `cancelRepaints` in class `Component`

  - ### flushReplace

    public void flushReplace()

    Flushes ongoing replace operations to prevent two concurrent replace operations from colliding. If there is no ongoing replace nothing will occur

    ###### Deprecated

    this method is no longer used in the new animation framework

  - ### removeAll

    public void removeAll()
    remove all Components from container, notice that removed component might still have a pending repaint in the queue that won't be removed. Calling form.repaint() will workaround such an issue. Notice that this method doesn't recurse and only removes from the current container.

  - ### revalidateWithAnimationSafety

    public void revalidateWithAnimationSafety()

    Revalidates the container in a way that doesn't conflict with running animations. If you simply call `#revalidate()` on a container while an animation is in progress, it will produce paint artifacts as it will insert frames in the animation with the container at its final position. Using this method, it will wait until running animations are complete before it revalidates.

    ###### Since

    6.0

  - ### revalidate

    public void revalidate()
    Re-layout the container, this is useful when we modify the container hierarchy and need to redo the layout

  - ### revalidateLater

    public void revalidateLater()
    Revalidates the container before the next paint cycle. Prefer this method to `#revalidate()` and `#revalidateWithAnimationSafety()` if you don't need the revalidate (layout and repaint) to happen immediately, but you do want it to happen before the next paint. This is can be far more efficient as it will squash the revalidation calls into the minimal set of containers that require revalidation, so that the system doesn't end up revalidating the same container multiple times between paints.

  - ### forceRevalidate

    public void forceRevalidate()
    A more powerful form of revalidate that recursively lays out the full hierarchy

  - ### clearClientProperties

    public void clearClientProperties()
    Clears all client properties from this Component
    Overrides:
      `clearClientProperties` in class `Component`

  - ### paint

    public void paint(Graphics g)

    This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering.

    ###### Parameters

    - `g`: the component graphics
    Specified by:
      `paint` in interface `Animation`
    Overrides:
      `paint` in class `Component`

  - ### paintGlass

    protected void paintGlass(Graphics g)

    This method can be overriden by a component to draw on top of itself or its children after the component or the children finished drawing in a similar way to the glass pane but more refined per component

    ###### Parameters

    - `g`: the graphics context

  - ### layoutContainer

    public void layoutContainer()
    Performs the layout of the container if a layout is necessary

  - ### isSafeArea

    public boolean isSafeArea()

    Checks if this container is a "safe area". A "safe area" is a container whose contents will always be displayed inside the device's "safe display area".

    This feature was added primarily for the iPhone X which covers some parts of the screen and would cover or interfere with any content drawn in those regions. In particular, the notch, the rounded corners, and the task bar cover portions of the screen.

    A container that is a safe area will automatically add appropriate padding on layout so that its children will be rendered completely in the safe area of the screen. This only applies if the container has no scrollable parents. If a "safe" container has scrollable parents, then it is assumed that the user can just scroll it into a safe area.

    ###### Returns

    True if this container is a safe area.

    ###### Since

    7.0

    ###### See also

    - #setSafeArea(boolean)

    - Form#getSafeArea()

  - ### setSafeArea

    public void setSafeArea(boolean safeArea)

    Marks this container as a "safe area", meaning that it will automatically supply sufficient padding as necessary for its children to be laid out inside the safe area of the screen.

    This was primarily added for the iPhone X which covers portions of the screen and may interfere with components that are rendered there.

    The "safe" area is calculated against a "safe area root"'s bounds, which is the parent form by default. In some cases it may be helpful to make the root a sub-container, such as if you need to lay a component out off-screen. See `#setSafeAreaRoot(boolean)` for more details.

    ###### Parameters

    - `safeArea`: True to make this container a safe area.

    ###### Since

    7.0

    ###### See also

    - Form#getSafeArea()

    - #isSafeArea()

    - #setSafeAreaRoot(boolean)

  - ### isSafeAreaRoot

    public boolean isSafeAreaRoot()

    Checks if this container is a safe area root. A safe area root is a container against whose bounds, safe area margins are calculated for child components.

    Forms are safe area roots by default.

    ###### Since

    7.0

    ###### See also

    - #setSafeAreaRoot(boolean)

  - ### getSafeAreaRoot

    public Container getSafeAreaRoot()

    Gets the Safe area "root" container for this container. This method will walk up the component hierarchy until is finds a Container with `#isSafeAreaRoot()` true.

    Forms are safe area roots by default, but it is possible to mark other containers as safe area roots.

    A safe area root is a container from which safe area margins are applied when calculating the safe areas of child components. Setting a root can facilitate the layout of a container's children before it appears on the screen.

    ###### Since

    7.0

  - ### setSafeAreaRoot

    public void setSafeAreaRoot(boolean root)

    Set whether this container is a safe area root. A safe area root is a container against whose bounds, safe area margins are calculated for child components.

    Safe Area root vs Safe Area

    A Safe Area root is not actually a safe area. It will lay out its children normally, without any adjustments to padding to accommodate the display safe area. They are rather used by safe area child containers to calculate safe area margins, according to if the safe area root container spanned the entire screen

    In most cases you don't need to explicitly set a safe area root, since Forms are marked as roots by default. However, there are edge cases where components may be initially laid out off-screen (in which safe areas are not applied), but are transitioned in. Once on the screen, the safe margins would be applied which may cause an abrupt re-layout at the moment that the safe margins are applied. This edge case occurs in, for example, a side menu bar which is rendered off-screen. By making the side menu bar container a "root" itself, the safe areas will be applied to the layout, even when the menu is off-screen. Then there is no "jerk" when it transitions in.

    ###### Parameters

    - `root`: True to make this a root. False to make it "not" a root.

    ###### Since

    7.0

    ###### See also

    - #isSafeAreaRoot()

  - ### getComponentCount

    public int getComponentCount()

    Returns the number of components

    ###### Returns

    the Component count

  - ### getComponentAt

    public Component getComponentAt(int index)

    Returns the Component at a given index

    ###### Parameters

    - `index`: of the Component you wish to get

    ###### Returns

    a Component

    ###### Throws

    - `ArrayIndexOutOfBoundsException`: if an invalid index was given.

  - ### getComponentIndex

    public int getComponentIndex(Component cmp)

    Returns the Component index in the Container

    ###### Parameters

    - `cmp`: the component to search for

    ###### Returns

    the Component index in the Container or -1 if not found

  - ### contains

    public boolean contains(Component cmp)

    Returns true if the given component is within the hierarchy of this container

    ###### Parameters

    - `cmp`: a Component to check

    ###### Returns

    true if this Component contains in this Container

  - ### scrollComponentToVisible

    public void scrollComponentToVisible(Component c)

    Makes sure the component is visible in the scroll if this container is scrollable

    ###### Parameters

    - `c`: the component that will be scrolling for visibility

  - ### getClosestComponentTo

    public Component getClosestComponentTo(int x, int y)

    Very useful for touch events or drop events that need approximation more than accuracy

    ###### Parameters

    - `x`: location in container relative coordinates

    - `y`: location in container relative coordinates

    ###### Returns

    the closest component in the container or null if no component is in the container

  - ### getResponderAt

    public Component getResponderAt(int x, int y)

    Returns the top-most component that responds to pointer events at absolute coordinate (x, y). This may return null if there are no components at this coordinate that respond to pointer events.

    Note: This method is stricter than `int)` about which component is returned. Whereas `int)` will return this when there are no matches, as long as it contains (x, y), `int)` will return null in this case. `int)` may also return components that are not visible or are not enabled. In generaly, if you are trying to retrieve a component that responds to pointer events, you should use this method over `int)` unless you have a good reason and really know what you are doing.

    ###### Parameters

    - `x`: Absolute x-coordinate.

    - `y`: Absolute y-coordinate.

    ###### Returns

    Top-most component that responds to pointer events at given coordinate. May be null.

    ###### See also

    - Component#respondsToPointerEvents()

  - ### getComponentAt

    public Component getComponentAt(int x, int y)

    Returns a Component at coordinate (x, y).

    WARNING: This method may return components that are disabled, or invisible, or that do not respond to pointer events. If you are looking for the top-most component that responds to pointer events, you should use `int)` as it is guaranteed to return a component with `Component#respondsToPointerEvents()` true; or null if none is found at the coordinate.

    ###### Parameters

    - `x`: absolute screen location

    - `y`: absolute screen location

    ###### Returns

    a Component if found, null otherwise

    ###### See also

    - Component#contains

    - #getResponderAt(int, int)

  - ### findDropTargetAt

    public Component findDropTargetAt(int x, int y)

    Recursively searches the container hierarchy for a drop target

    ###### Parameters

    - `x`: position in which we are searching for a drop target

    - `y`: position in which we are searching for a drop target

    ###### Returns

    a drop target or null if no drop target could be found at the x/y position

  - ### pointerPressed

    public void pointerPressed(int x, int y)

    If this Component is focused, the pointer pressed event will call this method

    ###### Parameters

    - `x`: the pointer x coordinate

    - `y`: the pointer y coordinate

    Overrides:
      `pointerPressed` in class `Component`

  - ### calcPreferredSize

    protected Dimension calcPreferredSize()

    Calculates the preferred size based on component content. This method is invoked lazily by getPreferred size.

    ###### Returns

    the calculated preferred size based on component content

    Overrides:
      `calcPreferredSize` in class `Component`

  - ### paramString

    protected String paramString()

    Returns a string representing the state of this component. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be `null`.

    ###### Returns

    a string representation of this component's state

    Overrides:
      `paramString` in class `Component`

  - ### refreshTheme

    public void refreshTheme(boolean merge)

    Makes sure the component is up to date with the current theme, ONLY INVOKE THIS METHOD IF YOU CHANGED THE THEME!

    ###### Parameters

    - `merge`: indicates if the current styles should be merged with the new styles
    Overrides:
      `refreshTheme` in class `Component`

  - ### isScrollableX

    public boolean isScrollableX()

    Indicates whether the component should/could scroll on the X axis

    ###### Returns

    whether the component is scrollable on the X axis

    Overrides:
      `isScrollableX` in class `Component`

  - ### setScrollableX

    public void setScrollableX(boolean scrollableX)

    Sets whether the component should/could scroll on the X axis

    ###### Parameters

    - `scrollableX`: whether the component should/could scroll on the X axis

  - ### isScrollableY

    public boolean isScrollableY()

    Indicates whether the component should/could scroll on the Y axis

    ###### Returns

    whether the component is scrollable on the X axis

    Overrides:
      `isScrollableY` in class `Component`

  - ### setScrollableY

    public void setScrollableY(boolean scrollableY)

    Sets whether the component should/could scroll on the Y axis

    ###### Parameters

    - `scrollableY`: whether the component should/could scroll on the Y axis

  - ### getSideGap

    public int getSideGap()

    Returns the gap to be left for the side scrollbar on the Y axis. This method is used by layout managers to determine the room they should leave for the scrollbar. (note: side scrollbar rather than left scrollbar is used for a future version that would support bidi).

    ###### Returns

    the gap to be left for the side scrollbar on the Y axis

    Overrides:
      `getSideGap` in class `Component`

  - ### getBottomGap

    public int getBottomGap()

    Returns the gap to be left for the bottom scrollbar on the X axis. This method is used by layout managers to determine the room they should leave for the scrollbar

    ###### Returns

    the gap to be left for the bottom scrollbar on the X axis

    Overrides:
      `getBottomGap` in class `Component`

  - ### setScrollable

    public void setScrollable(boolean scrollable)

    The equivalent of calling both setScrollableY and setScrollableX

    ###### Parameters

    - `scrollable`: @param scrollable whether the component should/could scroll on the X and Y axis

    ###### Deprecated

    use setScrollableX and setScrollableY instead. This method is deprecated since it breeds confusion and is often misunderstood.

  - ### setCellRenderer

    public void setCellRenderer(boolean cellRenderer)

    Used as an optimization to mark that this component is currently being used as a cell renderer

    ###### Parameters

    - `cellRenderer`: @param cellRenderer indicate whether this component is currently being used as a cell renderer
    Overrides:
      `setCellRenderer` in class `Component`

  - ### getScrollIncrement

    public int getScrollIncrement()

    Gets the Container scroll increment

    ###### Returns

    the scroll increment in pixels.

  - ### setScrollIncrement

    public void setScrollIncrement(int scrollIncrement)

    Determines the scroll increment size of this Container. This value is in use when the current foucs element within this Container is larger than this Container size.

    ###### Parameters

    - `scrollIncrement`: the size in pixels.

  - ### findFirstFocusable

    public Component findFirstFocusable()

    Finds the first focusable Component on this Container

    ###### Returns

    a focusable Component or null if not exists;

  - ### dragInitiated

    protected void dragInitiated()
    Invoked on the focus component to let it know that drag has started on the parent container for the case of a component that doesn't support scrolling
    Overrides:
      `dragInitiated` in class `Component`

  - ### fireClicked

    protected void fireClicked()
    When working in 3 softbutton mode "fire" key (center softbutton) is sent to this method in order to allow 3 button devices to work properly. When overriding this method you should also override isSelectableInteraction to indicate that a command is placed appropriately on top of the fire key for 3 soft button phones.
    Overrides:
      `fireClicked` in class `Component`

  - ### isSelectableInteraction

    protected boolean isSelectableInteraction()

    This method allows a component to indicate that it is interested in an "implicit" select command to appear in the "fire" button when 3 softbuttons are defined in a device.

    ###### Returns

    true if this is a selectable interaction

    Overrides:
      `isSelectableInteraction` in class `Component`

  - ### getGridPosY

    protected int getGridPosY()

    This method should be implemented correctly by subclasses to make snap to grid functionality work as expected. Returns the ideal grid Y position closest to the current Y position.

    ###### Returns

    a valid Y position in the grid

    Overrides:
      `getGridPosY` in class `Component`

  - ### paintComponentBackground

    public void paintComponentBackground(Graphics g)

    Paints this container background, skipping container background fill when fully obscured by children.

    ###### Parameters

    - `g`: the graphics context.

  - ### getGridPosX

    protected int getGridPosX()

    This method should be implemented correctly by subclasses to make snap to grid functionality work as expected. Returns the ideal grid X position closest to the current X position.

    ###### Returns

    a valid Y position in the grid

    Overrides:
      `getGridPosX` in class `Component`

  - ### animateHierarchyAndWait

    public void animateHierarchyAndWait(int duration)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation. This method waits until the operation is completed before returning

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

  - ### createAnimateHierarchy

    public ComponentAnimation createAnimateHierarchy(int duration)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    ###### Returns

    the animation object that should be added to the animation manager

  - ### animateHierarchy

    public void animateHierarchy(int duration)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

  - ### animateHierarchyFadeAndWait

    public void animateHierarchyFadeAndWait(int duration, int startingOpacity)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation. This method waits until the operation is completed before returning

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

  - ### createAnimateHierarchyFade

    public ComponentAnimation createAnimateHierarchyFade(int duration, int startingOpacity)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation.

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

    ###### Returns

    the animation object that should be added to the animation manager

  - ### animateHierarchyFade

    public void animateHierarchyFade(int duration, int startingOpacity)

    Animates a pending hierarchy of components into place, this effectively replaces revalidate with a more visual form of animation

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

  - ### animateLayoutFadeAndWait

    public void animateLayoutFadeAndWait(int duration, int startingOpacity)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation. This method waits until the operation is completed before returning

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

  - ### createAnimateLayoutFadeAndWait

    public ComponentAnimation createAnimateLayoutFadeAndWait(int duration, int startingOpacity)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation. This method waits until the operation is completed before returning

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

    ###### Returns

    the animation object that should be added to the animation manager

    ###### Deprecated

    this was added by mistake!

  - ### animateLayoutFade

    public void animateLayoutFade(int duration, int startingOpacity)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

  - ### createAnimateLayoutFade

    public ComponentAnimation createAnimateLayoutFade(int duration, int startingOpacity)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    - `startingOpacity`: the initial opacity to give to the animated components

    ###### Returns

    the animation object that should be added to the animation manager

  - ### animateLayoutAndWait

    public void animateLayoutAndWait(int duration)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation. This method waits until the operation is completed before returning

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

  - ### animateLayout

    public void animateLayout(int duration)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation

    See:

        Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
        Button fall = new Button("Fall");
        fall.addActionListener((e) -> {
            for(int iter = 0 ; iter < 10 ; iter++) {
                Label b = new Label ("Label " + iter);
                b.setWidth(fall.getWidth());
                b.setHeight(fall.getHeight());
                b.setY(-fall.getHeight());
                hi.add(b);
            }
            hi.getContentPane().animateLayout(20000);
        });
        hi.add(fall);

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

  - ### updateTabIndices

    public int updateTabIndices(int offset)

    Updates the tab indices in this container recursively. This method is used internally by layout managers when calculating the traversal order of components in a form.

    ###### Parameters

    - `offset`: The starting tab index.

    ###### Returns

    The ending tab index (+1)

    ###### Deprecated

    For internal use only.

  - ### createAnimateLayout

    public ComponentAnimation createAnimateLayout(int duration)

    Animates a pending layout into place, this effectively replaces revalidate with a more visual form of animation

    See:

        Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
        Button fall = new Button("Fall");
        fall.addActionListener((e) -> {
            for(int iter = 0 ; iter < 10 ; iter++) {
                Label b = new Label ("Label " + iter);
                b.setWidth(fall.getWidth());
                b.setHeight(fall.getHeight());
                b.setY(-fall.getHeight());
                hi.add(b);
            }
            hi.getContentPane().animateLayout(20000);
        });
        hi.add(fall);

    ###### Parameters

    - `duration`: the duration in milliseconds for the animation

    ###### Returns

    the animation object that should be added to the animation manager

  - ### drop

    public void drop(Component dragged, int x, int y)

    Performs a drop operation of the component at the given X/Y location in coordinate space, this method should be overriden by subclasses to perform all of the logic related to moving a component, by default this method does nothing and so dragging a component and dropping it has no effect

    ###### Parameters

    - `dragged`: the component being dropped

    - `x`: the x coordinate of the drop

    - `y`: the y coordinate of the drop

    Overrides:
      `drop` in class `Component`

  - ### createAnimateMotion

    protected Motion createAnimateMotion(int start, int destination, int duration)

    Creates a motion object for animation, allows subclasses to replace the motion type used in animations (currently defaults to ease-in).

    ###### Parameters

    - `start`: start value

    - `destination`: destination value

    - `duration`: duration of animation

    ###### Returns

    motion object

  - ### morph

    public void morph(Component source, Component destination, int duration, Runnable onCompletion)

    Morph is similar to the replace functionality where a component might be replaced with a component that isn't within the container. However, unlike the replace functionality which uses a transition and assumes the position of the component (and is hence quite flexible) morph can move and resize the component. E.g. after entering text into a text field and pressing submit it can "morph" into a chat bubble located in a different part of the screen.

    It is the responsibility of the caller to remove the source component (if desired) and revalidate the container when the animation completes.

    ###### Parameters

    - `source`: source component assumed to be within this container or one of its children

    - `destination`: the destination component

    - `duration`: the time the morph operation should take

    - `onCompletion`: invoked when the morphing completes

  - ### morphAndWait

    public void morphAndWait(Component source, Component destination, int duration)

    Morph is similar to the replace functionality where a component might be replaced with a component that isn't within the container. However, unlike the replace functionality which uses a transition and assumes the position of the component (and is hence quite flexible) morph can move and resize the component. E.g. after entering text into a text field and pressing submit it can "morph" into a chat bubble located in a different part of the screen.

    It is the responsibility of the caller to remove the source component (if desired) and revalidate the container when the animation completes.

    ###### Parameters

    - `source`: source component assumed to be within this container or one of its children

    - `destination`: the destination component

    - `duration`: the time the morph operation should take

  - ### animateUnlayout

    public void animateUnlayout(int duration, int opacity, Runnable callback)

    This method is the exact reverse of animateLayout, when completed it leaves the container in an invalid state. It is useful to invoke this in order to remove a component, transition to a different form or provide some other interaction. E.g.:

        Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
        Button fall = new Button("Fall");
        fall.addActionListener((e) -> {
            if(hi.getContentPane().getComponentCount() == 1) {
                fall.setText("Rise");
                for(int iter = 0 ; iter  {
                    hi.removeAll();
                    hi.add(fall);
                    hi.revalidate();
                });*/

            }
        });
        hi.add(fall);

    ###### Parameters

    - `duration`: the duration of the animation

    - `opacity`: the opacity to which the layout will reach, allows fading out the components

    - `callback`: if not null will be invoked when unlayouting is complete

  - ### animateUnlayoutAndWait

    public void animateUnlayoutAndWait(int duration, int opacity)

    This method is the exact reverse of animateLayoutAndWait, when completed it leaves the container in an invalid state. It is useful to invoke this in order to remove a component, transition to a different form or provide some other interaction. E.g.:

        Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
        Button fall = new Button("Fall");
        fall.addActionListener((e) -> {
            if(hi.getContentPane().getComponentCount() == 1) {
                fall.setText("Rise");
                for(int iter = 0 ; iter  {
                    hi.removeAll();
                    hi.add(fall);
                    hi.revalidate();
                });*/

            }
        });
        hi.add(fall);

    ###### Parameters

    - `duration`: the duration of the animation

    - `opacity`: the opacity to which the layout will reach, allows fading out the components

  - ### createAnimateUnlayout

    public ComponentAnimation createAnimateUnlayout(int duration, int opacity, Runnable callback)

    This method is the exact reverse of createAnimateLayout, when animation is completed it leaves the container in an invalid state. It is useful to invoke this in order to remove a component, transition to a different form or provide some other interaction. E.g.:

    ###### Parameters

    - `duration`: the duration of the animation

    - `opacity`: the opacity to which the layout will reach, allows fading out the components

    ###### Returns

    the animation object that should be added to the animation manager

  - ### getChildrenAsList

    public List<Component> getChildrenAsList(boolean includeQueued)

    Gets the child components of this Container as a List. Using true as the argument provides a way to obtain all of the children, including children whose full addition is pending while an animation is in progress.

    Animation Discussion: If children are added or removed from a Container while its containing Form has an animation in progress, the insertion/deletion isn't complete until after the animation is finished. Most methods to interact with a container's children won't see these pending changes until that time. E.g.:

    `// Assume an animation is in progress on the form containing cnt. Label lbl = new Label("Test"); int len = cnt.getComponentCount(); // 0 cnt.addComponent(lbl); int lenAfter = cnt.getComponentCount(); // 0 cnt.contains(lbl); // true cnt.getChildrenAsList(true).size(); // 1 cnt.getChildrenAsList(false).size(); // 0

    Button btn = new Button("Press me"); cnt.addComponent(btn); cnt.getComponentCount(); // 0 cnt.getChildrenAsList(true).size(); // 2 cnt.removeComponent(btn); cnt.getComponentCount(); // 0 cnt.getChildrenAsList(true).size(); // 1

    `

    ###### Parameters

    - `includeQueued`: True to reflect queued inserts and removals while an animation is in progress.

    ###### Returns

    A list including all of the children of this container.

    ###### See also

    - #iterator(boolean)

  - ### iterator

    public Iterator<Component> iterator(boolean includeQueued)

    Obtains an iterator that iterates over the children of this container. If argument is true, then the iteratator will include queued insertions/deletions while an animation is in progress.

    ###### Parameters

    - `includeQueued`: True to include queued component insertions and removals while animation is in progress.

    ###### Returns

    An iterator that iterates over the children of this component.

    ###### See also

    - #iterator()

    - #getChildrenAsList(boolean)

  - ### iterator

    public Iterator<Component> iterator()

    Part of the Iterable interface allowing us to do a for-each loop on Container

    ###### Returns

    the iterator of the components

    Specified by:
      `iterator` in interface `Iterable<Component>`
    Returns:
      An `Iterator` instance.