Interface IUIPosition
public interface IUIPosition
{
// Methods
public Point getPosition();
public int getXPosition();
public int getYPosition();
public void setPosition(Point pt);
public void setPosition(int x, int y);
public void setXPosition(int x);
public void setYPosition(int y);
}
This interface is used to expose a spatial position. For example, UIViewer and UIScrollViewer implement IUIPosition to expose their content's position. UIScroll implements this interface to expose the position of the scroll track control.
public Point getPosition();
Retrieves the position of the object.
Return Value:
Returns a Point object containing the current position. The x and y coordinates specify the horizontal and vertical positions (in pixels), respectively.
public int getXPosition();
Retrieves the horizontal position of the object.
Return Value:
Returns the horizontal position (in pixels).
public int getYPosition();
Retrieves the vertical position of the object.
Return Value:
Returns the vertical position (in pixels).
public void setPosition(Point pt);
Sets the position of the object according to the specified Point.
Return Value:
No return value.
Parameter | Description |
pt
| The requested position. The x and y coordinates of pt specify the horizontal and vertical positions (in pixels), respectively.
|
Remarks:
Depending on the object's range checking, the returned position may differ from the requested position.
public void setPosition(int x, int y);
Sets the position of the object according to the specified values.
Return Value:
No return value.
Parameter | Description |
x
| The requested horizontal position (in pixels).
|
y
| The requested vertical position (in pixels).
|
Remarks:
Depending on the object's range checking, the returned position may differ from the requested position.
public void setXPosition(int x);
Sets the horizontal position of the object.
Return Value:
No return value.
Parameter | Description |
x
| The requested horizontal position.
|
Remarks:
Depending on the object's range checking, the returned position may differ from the requested position.
public void setYPosition(int y);
Sets the vertical position of the object.
Return Value:
No return value.
Parameter | Description |
y
| The requested vertical position.
|
Remarks:
Depending on the object's range checking, the returned position may differ from the requested position.