Skip to content

Adding a recommendation for the usage of setLocation in Control #2147

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3991,6 +3991,10 @@ public void setLayoutData (Object layoutData) {
* @param x the new x coordinate for the receiver
* @param y the new y coordinate for the receiver
*
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
Expand All @@ -4013,6 +4017,10 @@ public void setLocation (int x, int y) {
*
* @param location the new location for the receiver
*
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@ Point getLocationInPixels () {
*
* @param location the new location for the receiver
*
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
Expand Down Expand Up @@ -1290,6 +1294,10 @@ void setLocationInPixels (Point location) {
* @param x the new x coordinate for the receiver
* @param y the new y coordinate for the receiver
*
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3504,8 +3504,9 @@ public void setLayoutData (Object layoutData) {
* intended effect on some platforms. For example, executing this operation on a
* shell when the environment uses the Wayland protocol, nothing will happen.
*
* @param x the new x coordinate for the receiver
* @param y the new y coordinate for the receiver
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
Expand Down Expand Up @@ -3537,6 +3538,10 @@ void setLocationInPixels (int x, int y) {
*
* @param location the new location for the receiver
*
* <p><strong>Recommended Usage:</strong> If you plan to use {@link #setSize(int, int)},
* call it <em>before</em> calling this method. This ensures the control is sized
* correctly before positioning, which helps avoid layout issues when using absolute positioning.</p>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
Expand Down
Loading