public class InteractiveControlPosition extends Object implements Comparable<InteractiveControlPosition>
InteractiveControlPosition
represents the position and size of the asociated control on the specified
control canvas area.Constructor and Description |
---|
InteractiveControlPosition(InteractiveCanvasSize size)
Initializes a new
InteractiveControlPosition with default values. |
InteractiveControlPosition(InteractiveCanvasSize size,
int width,
int height,
int x,
int y)
Initializes a new
InteractiveControlPosition . |
InteractiveControlPosition(String size,
int width,
int height,
int x,
int y)
Initializes a new
InteractiveControlPosition . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(InteractiveControlPosition o) |
boolean |
equals(Object o) |
InteractiveCanvasSize |
getCanvasSize()
Returns the
InteractiveCanvasSize for this control position. |
int |
getHeight()
Returns the
InteractiveControls height for this control position. |
int |
getWidth()
Returns the
InteractiveControls width for this control position. |
int |
getX()
Returns the
InteractiveControls X position for this control position. |
int |
getY()
Returns the
InteractiveControls Y position for this control position. |
int |
hashCode() |
InteractiveControlPosition |
moveTo(int x,
int y)
Sets the
InteractiveControls X and Y positions for this control position. |
InteractiveControlPosition |
resize(int width,
int height)
Sets the
InteractiveControls height and width for this control position. |
InteractiveControlPosition |
setHeight(int height)
Sets the
InteractiveControls height for this control position. |
InteractiveControlPosition |
setWidth(int width)
Sets the
InteractiveControls width for this control position. |
InteractiveControlPosition |
setX(int x)
Sets the
InteractiveControls X position for this control position. |
InteractiveControlPosition |
setY(int y)
Sets the
InteractiveControls Y position for this control position. |
public InteractiveControlPosition(InteractiveCanvasSize size)
InteractiveControlPosition
with default values.size
- InteractiveCanvasSize
for this InteractiveControlPosition
public InteractiveControlPosition(String size, int width, int height, int x, int y)
InteractiveControlPosition
.size
- Canvas size for this InteractiveControlPosition
width
- Width of the InteractiveControl
height
- Height of the InteractiveControl
x
- X position on the Interactive control canvasy
- Y position on the Interactive control canvaspublic InteractiveControlPosition(InteractiveCanvasSize size, int width, int height, int x, int y)
InteractiveControlPosition
.size
- InteractiveCanvasSize
for this InteractiveControlPosition
width
- Width of the InteractiveControl
height
- Height of the InteractiveControl
x
- X position on the Interactive control canvasy
- Y position on the Interactive control canvaspublic InteractiveCanvasSize getCanvasSize()
InteractiveCanvasSize
for this control position.InteractiveCanvasSize
for this control positionpublic int getWidth()
InteractiveControls
width for this control position.InteractiveControls
width for this control positionpublic InteractiveControlPosition setWidth(int width)
InteractiveControls
width for this control position.width
- The InteractiveControls
width for this control positionthis
for method chainingpublic int getHeight()
InteractiveControls
height for this control position.InteractiveControls
height for this control positionpublic InteractiveControlPosition setHeight(int height)
InteractiveControls
height for this control position.height
- The InteractiveControls
height for this control positionthis
for method chainingpublic InteractiveControlPosition resize(int width, int height)
InteractiveControls
height and width for this control position.width
- The InteractiveControls
height for this control positionheight
- The InteractiveControls
height for this control positionthis
for method chainingpublic int getX()
InteractiveControls
X position for this control position.InteractiveControls
X position for this control positionpublic InteractiveControlPosition setX(int x)
InteractiveControls
X position for this control position.x
- The InteractiveControls
X position for this control positionthis
for method chainingpublic int getY()
InteractiveControls
Y position for this control position.InteractiveControls
Y position for this control positionpublic InteractiveControlPosition setY(int y)
InteractiveControls
Y position for this control position.y
- The InteractiveControls
Y position for this control positionthis
for method chainingpublic InteractiveControlPosition moveTo(int x, int y)
InteractiveControls
X and Y positions for this control position.x
- The InteractiveControls
X position for this control positiony
- The InteractiveControls
Y position for this control positionthis
for method chainingpublic int compareTo(InteractiveControlPosition o)
compareTo
in interface Comparable<InteractiveControlPosition>
Copyright © 2018. All rights reserved.