| 91 | /// |
| 92 | /// - Component |
| 93 | public class Container extends Component implements Iterable<Component> { |
| 94 | /// Workaround for the behavior of the sidemenu bar on iOS etc. which translates aggressively, |
| 95 | /// this is visible with the table component where the lines slide out of place |
| 96 | static int sidemenuBarTranslation; |
| 97 | private static boolean enableLayoutOnPaint = true; |
| 98 | private static boolean blockOverdraw; |
| 99 | private final ArrayList<Component> components = new ArrayList<Component>(); |
| 100 | /// A queue that keeps track of changes to the children while an animation is in progress. |
| 101 | /// |
| 102 | /// #### See also |
| 103 | /// |
| 104 | /// - #getChildrenAsList(boolean) |
| 105 | /// |
| 106 | /// - #iterator(boolean) |
| 107 | /// |
| 108 | /// - #insertComponentAt(int, java.lang.Object, com.codename1.ui.Component) |
| 109 | /// |
| 110 | /// - #removeComponentImpl(com.codename1.ui.Component) |
| 111 | private final ArrayList<QueuedChange> changeQueue = new ArrayList<QueuedChange>(); |
| 112 | boolean scrollableX; |
| 113 | boolean scrollableY; |
| 114 | /// A set used in `#paintElevatedPane(Graphics)` to gather all of the elevated descendent components |
| 115 | /// of this container. |
| 116 | ArrayList<Component> _tmpRenderingElevatedComponents; |
| 117 | // A 2nd flag for enabling layout on paint. In order for layoutOnPaint to occur, |
| 118 | // both the enableLayoutOnPaint and allowEnableLayoutOnPaint flags must be true. |
| 119 | // This flag can be set on any Container (e.g. form), and will cause it to be propagated |
| 120 | // down to its children. So you can set this at the form level, in order to enable this behaviour |
| 121 | // for the whole form. |
| 122 | private boolean allowEnableLayoutOnPaint = false; |
| 123 | private Component leadComponent; |
| 124 | private Layout layout; |
| 125 | private boolean shouldLayout = true; |
| 126 | private Vector cmpTransitions; |
| 127 | private int scrollIncrement = 20; |
| 128 | private boolean blockFocus = false; |
| 129 | private boolean dontRecurseContainer; |
| 130 | private UIManager uiManager; |
| 131 | private boolean surface; |
| 132 | private boolean revalidatePending; |
| 133 | /// Set to keep track of elevated components to render against this surface. |
| 134 | private HashSet<Component> elevatedComponents; |
| 135 | /// Index variable used to assign indices to components within the same elevation level. |
| 136 | private int nextElevationComponentIndex; |
| 137 | /// Flag to |
| 138 | private boolean safeArea; |
| 139 | /// Indicates that this container is a "safe area" root. |
| 140 | private boolean safeAreaRoot; |
| 141 | private TmpInsets tmpInsets; |
| 142 | private int doLayoutDepth; |
| 143 | private TmpInsets calcTmpInsets; |
| 144 | private int calcPreferredSizeDepth; |
| 145 | |
| 146 | /// Constructs a new Container with a new layout manager and UIID |
| 147 | /// |
| 148 | /// #### Parameters |
| 149 | /// |
| 150 | /// - `layout`: the specified layout manager |