Skip to content
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

Correct contracts of Control#[get|set]Location() #790 #1454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -1726,10 +1726,15 @@ public Object getLayoutData () {
}

/**
* Returns a point describing the receiver's location relative
* to its parent in points (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Returns a point describing the receiver's location relative to its parent in
* points (or its display if its parent is null), unless the receiver is a
* shell. In this case, the point is usually relative to the display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not yield a
* value with the expected meaning on some platforms. For example, executing
* this operation on a shell when the environment uses the Wayland protocol, the
* result is <b>not</b> a coordinate relative to the display. It will not change
* when moving the shell.
*
* @return the receiver's location
*
Expand Down Expand Up @@ -3974,11 +3979,14 @@ public void setLayoutData (Object layoutData) {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the arguments which
* are relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* 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
Expand All @@ -3994,11 +4002,14 @@ public void setLocation (int x, int y) {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the argument which
* is relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* intended effect on some platforms. For example, executing this operation on a
* shell when the environment uses the Wayland protocol, nothing will happen.
*
* @param location the new location for the receiver
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1215,10 +1215,15 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
}

/**
* Returns a point describing the receiver's location relative
* to its parent in points (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Returns a point describing the receiver's location relative to its parent in
* points (or its display if its parent is null), unless the receiver is a
* shell. In this case, the point is usually relative to the display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not yield a
* value with the expected meaning on some platforms. For example, executing
* this operation on a shell when the environment uses the Wayland protocol, the
* result is <b>not</b> a coordinate relative to the display. It will not change
* when moving the shell.
*
* @return the receiver's location
*
Expand Down Expand Up @@ -1247,11 +1252,14 @@ Point getLocationInPixels () {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the argument which
* is relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* intended effect on some platforms. For example, executing this operation on a
* shell when the environment uses the Wayland protocol, nothing will happen.
*
* @param location the new location for the receiver
*
Expand All @@ -1274,11 +1282,14 @@ void setLocationInPixels (Point location) {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the arguments which
* are relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1350,10 +1350,15 @@ public Object getLayoutData () {
}

/**
* Returns a point describing the receiver's location relative
* to its parent in points (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Returns a point describing the receiver's location relative to its parent in
* points (or its display if its parent is null), unless the receiver is a
* shell. In this case, the point is usually relative to the display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not yield a
* value with the expected meaning on some platforms. For example, executing
* this operation on a shell when the environment uses the Wayland protocol, the
* result is <b>not</b> a coordinate relative to the display. It will not change
* when moving the shell.
*
* @return the receiver's location
*
Expand Down Expand Up @@ -3486,11 +3491,14 @@ public void setLayoutData (Object layoutData) {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the arguments which
* are relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* 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
Expand All @@ -3514,11 +3522,14 @@ void setLocationInPixels (int x, int y) {
}

/**
* Sets the receiver's location to the point specified by
* the arguments which are relative to the receiver's
* parent (or its display if its parent is null), unless
* the receiver is a shell. In this case, the point is
* relative to the display.
* Sets the receiver's location to the point specified by the argument which
* is relative to the receiver's parent (or its display if its parent is null),
* unless the receiver is a shell. In this case, the point is relative to the
* display.
* <p>
* <b>Warning:</b> When executing this operation on a shell, it may not have the
* intended effect on some platforms. For example, executing this operation on a
* shell when the environment uses the Wayland protocol, nothing will happen.
*
* @param location the new location for the receiver
*
Expand Down
Loading