| 66 | /// |
| 67 | /// @author Chen Fishbein |
| 68 | public class Form extends Container { |
| 69 | private static final String Z_INDEX_PROP = "cn1$_zIndex"; |
| 70 | static int activePeerCount; |
| 71 | static int rippleX; |
| 72 | static int rippleY; |
| 73 | /// Used by the combo box to block some default Codename One behaviors |
| 74 | static boolean comboLock; |
| 75 | private static Motion rippleMotion; |
| 76 | private static Component rippleComponent; |
| 77 | private final Container contentPane; |
| 78 | /// Rectangle storing the safe area on the form. |
| 79 | private final Rectangle safeArea = new Rectangle(); |
| 80 | private final AnimationManager animMananger = new AnimationManager(this); |
| 81 | /// A queue of containers that are scheduled to be revalidated before the next |
| 82 | /// paint. Use `Container#revalidateLater()` to add to this queue. The |
| 83 | /// queue the queue is flushed in `#flushRevalidateQueue()` |
| 84 | private final Set<Container> pendingRevalidateQueue = new HashSet<Container>(); |
| 85 | /// A temporary container used in `#flushRevalidateQueue()` for the list |
| 86 | /// of containers that are being revalidated. This should not be used outside |
| 87 | /// of `#flushRevalidateQueue()` |
| 88 | private final ArrayList<Container> revalidateQueue = new ArrayList<Container>(); |
| 89 | private final Rectangle pressedCmpAbsBounds = new Rectangle(); |
| 90 | /// Indicates whether lists and containers should scroll only via focus and thus "jump" when |
| 91 | /// moving to a larger component as was the case in older versions of Codename One. |
| 92 | protected boolean focusScrolling; |
| 93 | Container titleArea = new Container(new BorderLayout()); |
| 94 | /// Indicates that this form should be tinted when painted |
| 95 | boolean tint; |
| 96 | EventDispatcher showListener; |
| 97 | int initialPressX; |
| 98 | int initialPressY; |
| 99 | /// A flag that enables/disables the behaviour that revalidate() on any container |
| 100 | /// will trigger a revalidate() in its parent form. Not sure why we do this |
| 101 | /// but this flag turns off this behaviour. Hopefully we can default this |
| 102 | /// to "Off" eventually. |
| 103 | /// |
| 104 | /// Used in `Container#revalidate()`. |
| 105 | boolean revalidateFromRoot = "true".equals(CN.getProperty("Form.revalidateFromRoot", "true")); |
| 106 | private Command sourceCommand; |
| 107 | private boolean globalAnimationLock; |
| 108 | private Painter glassPane; |
| 109 | private Container layeredPane; |
| 110 | private Container formLayeredPane; |
| 111 | private Label title = new Label("", "Title"); |
| 112 | private MenuBar menuBar; |
| 113 | private Component dragged; |
| 114 | // Last component whose interactive scrollbar showed a hover highlight, so the highlight can be |
| 115 | // cleared when the pointer moves to a different scrollable (desktop interactive scrollbars only) |
| 116 | private Component lastInteractiveScrollHover; |
| 117 | private boolean enableCursors; |
| 118 | private TextSelection textSelection; |
| 119 | private ArrayList<Component> componentsAwaitingRelease; |
| 120 | private VirtualInputDevice currentInputDevice; |
| 121 | /// Contains a list of components that would like to animate their state |
| 122 | private ArrayList<Animation> internalAnimatableComponents; |
| 123 | /// Contains a list of components that would like to animate their state |
| 124 | private ArrayList<Animation> animatableComponents; |
| 125 | //private FormSwitcher formSwitcher; |
nothing calls this directly
no test coverage detected