Class LocationImpl
java.lang.Object
org.eclipse.graphiti.internal.datatypes.impl.LocationImpl
- All Implemented Interfaces:
IAdvancedLocation
,ILocation
The Class LocationImpl.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getX()
Gets the x value.int
getY()
Gets the y value.int
hashCode()
void
scale
(double amount) Changes the current location.setLocation
(int x, int y) Sets the location.setLocation
(ILocation location) Sets the location.void
setX
(int x) Sets the x coordinate of this location.void
setY
(int y) Sets the y coordinate of this location.toString()
translate
(int dx, int dy) Translates the current location.
-
Constructor Details
-
LocationImpl
public LocationImpl(int x, int y) -
LocationImpl
-
-
Method Details
-
getX
public int getX()Description copied from interface:ILocation
Gets the x value. -
getY
public int getY()Description copied from interface:ILocation
Gets the y value. -
setX
public void setX(int x) Description copied from interface:ILocation
Sets the x coordinate of this location. -
setY
public void setY(int y) Description copied from interface:ILocation
Sets the y coordinate of this location. -
equals
-
hashCode
public int hashCode() -
toString
-
getLocationCopy
- Specified by:
getLocationCopy
in interfaceIAdvancedLocation
- Returns:
- An exact copy of the current advanced location instance.
-
setLocation
Description copied from interface:IAdvancedLocation
Sets the location.- Specified by:
setLocation
in interfaceIAdvancedLocation
- Parameters:
x
- the new x coordinate of the locationy
- the new y coordinate of the location- Returns:
- the current instance
-
setLocation
Description copied from interface:IAdvancedLocation
Sets the location.- Specified by:
setLocation
in interfaceIAdvancedLocation
- Parameters:
location
- the location which contains the new x and y coordinates- Returns:
- the current instance
-
scale
public void scale(double amount) Description copied from interface:IAdvancedLocation
Changes the current location.- Specified by:
scale
in interfaceIAdvancedLocation
- Parameters:
amount
- x and y coordinate of the location will be multiplied with this amount
-
translate
Description copied from interface:IAdvancedLocation
Translates the current location.- Specified by:
translate
in interfaceIAdvancedLocation
- Parameters:
dx
- this value will be added to the x coordinatedy
- this value will be added to the y coordinate- Returns:
- the current instance
-