forked from codenameone/CodenameOne
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
090620_0415PM_addingChangesFromCn1 #36
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With these anchors percent insets can also refer to other points than the default one (e.g. center of a Component) .
…ith differnt topLeft,topRight,bottomLeft,bottomRight modes as being unequal. This fixes issues where you change the border of a style but it has no effect, because the style does an equality test inside setBorder() to only change the border if it isn't the same as the existing border.
…d by the notch on iPhoneX
…ixed topOnlyMode/bottomOnlyMode not being loaded form XML for RoundRectBorder.
… to/from container during an animation.
…ethods can be used safely. The default implementation of setPreferredW() will implicitly set the preferred height of the component as well, and will prevent calcPreferredHeight from being called. With SpanLabel we may want to specify a desired width and have the height automatically calculated based on that width. Now we are able to do that via the setPreferredW() method.
…e when the user clicks outside of its bounds. Setting allowClose=false will also cause the close button to not appear. If you navigate to sub-sheets, the back buttons will still appear - just not the top-level close button. This allows you to create semi-modal dialogs using Sheet.
…orm.getSafeArea(Rectangle). Also added flag to force a container to render its children inside the safe area. Container.setSafeArea(boolean). Also set the tabs container of the Tabs component to be a safe area so that the tab buttons don't get covered by the iPhone X task bar.. Content pane of Sheet is also set as safe area. Added SafeAreaSample to demonstrate how this works. Also fixed some issues related to recent change to setAllowEnableLayoutOnPaint() that caused form to not be laid out sometimes. #2946
…ulator when resizing the window. #2946
TextArea was not painting while editing. It would just show blank while user editiing, but would start showing again when editing completed on the field. The problem was that sizing was being applied to the TextArea itself rather than the wrapping JScrollPane. When resizing (to match cn1 text area size and position) was instead applied to the JScrollPane, the problem was fixed. 2nd regression: Painting was not being performed while editing *any* text fields if they were tabbed into. It would work if clicking in. Did some refactoring of resizing behaviour on native text fields to reduce code duplication between textfields, password fields, and textareas. This should make it easier to maintain going forward.
…() can be defined in a parent class rather than directly in the app's main class? This will make it easier to create reusable main classes that be be reused from project to project.
…feature. Merged layout unit tests into a single class. So far just BoxLayout, FlowLayout, and LayeredLayout. Future tests for other Layout managers will be added to this test class.
… the onStart event properly. #3010
I added a link to a blog article of Steve that clarify the externalizable interface in a way deeper than the Javadoc.
I added a link to a blog article that explains the ComponentSelector in a way deeper and clearer than the Javadoc.
…ing more flexible. Calling setPreferredW() will now cause the preferred height to be calculated accordingly, and vice versa. Previously setting preferred width or height would result in the orthogonal dimension being calculated based on the full-size image.
…will be called even if the text area was not currently editing. Added support for tabbing to previous field from textfields in JavaSE port.
…hat support addActionListener/removeActionListener methods. This makes it much easier to bind event listeners to components in a more generic way.
…to use the new ActionSource interface.
…s replacing rather than its own font style, if it is available. This fixes issue reported https://stackoverflow.com/questions/60125358/loadingtextanimation-requirements-to-work
…onitor errors on Javascript port.
…n app-wide BrowserComponent for executing javascript. When running in the Javascript port, this javascript environment is the same as the one that the app is running it so this provides a simpler way to interact with the underlying browser environment. When running in other platforms, it just uses an off-screen browser component.
… to ensure that a BrowserComponent is ready.
…es to unit test for getComponentAt(). getComponentAt() has been a challenge because it is crucial to the functioning of apps (event delivery) yet its behaviour is not well defined. These new modifications fix the following cases: 1. getComponentAt(x,y) where x,y falls outside the proper bounds. Previously this would return null, however this was causing intermittend NPEs due to the menubar overriding its contains(x,y) method to delegagte to the Toolbar, so contains(x,y) might be true even if (x,y) was outside the bounds of the menu bar. Now getComponent(x,y) will always return the container itself if x,y is outside of its bounds. 2. Focusable containers. Given a container C that is focusable. if getComponentAt(x,y) is called on an ancestor of C and (x,y) is inside the bounds of C, then it will return C, unless C there exists another component D such that either D is a descendent of C and is focusable - OR - D is a descendent of an ancestor of C, D is rendered in front of C, and D has an ancestor E that is rendered in front of C and E.respondsToPointerEvents() is true.
…ntForm() may return null but this was not tested for (many other components make this test)
…minimal, simply changing the hash for a shape from a String into a long because creating the string hashes for shapes ended up being very memory intensive. The long hash may need to be refined as is is possible that there may be collisions as I haven't rigorously analyzed the distribution of the hashing algorithm. This mostly corrects the memory issue. Memory will still grow slightly, mostly due to allocations of rectangles used for obtaining the bounds of shapes during painting. This is the *minimal* change resulting from 3 days of attempting a far more ambition refactor that involved immutable paths, and lots of smart caching. But all those things didn't make much of a difference on performance (if at all), and made the code much more complex, so I reverted and only changed the shape hashing algorithm, which was the main source of memory growth.
…bscure pointer events from underlying labels. Added unit test.
…that are required to build in some environments
…nput stream not being cleaned up in ConnectionRequest.
…ame() will return empty Vector instead of null if there are no results found.
…iew. Added flag which is hard-coded as true to disable UI webview, so that even if you specify the BrowserComponent.useWKWebView property to false, it will still use WKWebView, but will print a warning to the console.
Added a theme constant to indicate a theme derives from the dark mode representation
…t stuck into the text field
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.