Class LocationImpl
- java.lang.Object
-
- org.eclipse.graphiti.internal.datatypes.impl.LocationImpl
-
- All Implemented Interfaces:
IAdvancedLocation,ILocation
public class LocationImpl extends java.lang.Object implements IAdvancedLocation
The Class LocationImpl.
-
-
Constructor Summary
Constructors Constructor Description LocationImpl(int x, int y)LocationImpl(ILocation location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ILocationgetLocationCopy()intgetX()Gets the x value.intgetY()Gets the y value.inthashCode()voidscale(double amount)Changes the current location.ILocationsetLocation(int x, int y)Sets the location.ILocationsetLocation(ILocation location)Sets the location.voidsetX(int x)Sets the x coordinate of this location.voidsetY(int y)Sets the y coordinate of this location.java.lang.StringtoString()ILocationtranslate(int dx, int dy)Translates the current location.
-
-
-
Constructor Detail
-
LocationImpl
public LocationImpl(int x, int y)
-
LocationImpl
public LocationImpl(ILocation location)
-
-
Method Detail
-
getX
public int getX()
Description copied from interface:ILocationGets the x value.
-
getY
public int getY()
Description copied from interface:ILocationGets the y value.
-
setX
public void setX(int x)
Description copied from interface:ILocationSets the x coordinate of this location.
-
setY
public void setY(int y)
Description copied from interface:ILocationSets the y coordinate of this location.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getLocationCopy
public ILocation getLocationCopy()
- Specified by:
getLocationCopyin interfaceIAdvancedLocation- Returns:
- An exact copy of the current advanced location instance.
-
setLocation
public ILocation setLocation(int x, int y)
Description copied from interface:IAdvancedLocationSets the location.- Specified by:
setLocationin interfaceIAdvancedLocation- Parameters:
x- the new x coordinate of the locationy- the new y coordinate of the location- Returns:
- the current instance
-
setLocation
public ILocation setLocation(ILocation location)
Description copied from interface:IAdvancedLocationSets the location.- Specified by:
setLocationin 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:IAdvancedLocationChanges the current location.- Specified by:
scalein interfaceIAdvancedLocation- Parameters:
amount- x and y coordinate of the location will be multiplied with this amount
-
translate
public ILocation translate(int dx, int dy)
Description copied from interface:IAdvancedLocationTranslates the current location.- Specified by:
translatein 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
-
-