Interface Orientation
- All Known Implementing Classes:
AbstractOrientation,OrientationEW,OrientationNS,OrientationSN,OrientationWE
public interface Orientation
Interface for orientation images.
-
Method Summary
Modifier and TypeMethodDescriptionintgetH()Returns the height of the highlighted part of the image.intgetW()Returns the width of the highlighted part of the image.intgetX()Returns the x-coordinate of the highlighted part of the image.intgetY()Returns the y-coordinate of the highlighted part of the image.booleanReturns whether the low image should be shown.booleanReturns whether the negative image should be shown.booleanisValid()Returns whether the gauge's values are valid.booleansetExtends(int width, int height) Sets the extends of the image.voidsetHasNegativeImage(boolean hasNegativeImage) Sets whether the gauge can display negative images.booleansetValues(int cur, int min, int max) Sets the gauge's values.
-
Method Details
-
setHasNegativeImage
void setHasNegativeImage(boolean hasNegativeImage) Sets whether the gauge can display negative images. By default, negative images are not supported.- Parameters:
hasNegativeImage- whether the gauge can display negative images
-
setValues
boolean setValues(int cur, int min, int max) Sets the gauge's values.- Parameters:
cur- the current valuemin- the minimum valuemax- the maximum value- Returns:
- whether the values have been updated
-
setExtends
boolean setExtends(int width, int height) Sets the extends of the image.- Parameters:
width- the widthheight- the height- Returns:
- true if the size changed, false else
-
getX
int getX()Returns the x-coordinate of the highlighted part of the image.- Returns:
- the x-coordinate
-
getY
int getY()Returns the y-coordinate of the highlighted part of the image.- Returns:
- the y-coordinate
-
getW
int getW()Returns the width of the highlighted part of the image.- Returns:
- the width
-
getH
int getH()Returns the height of the highlighted part of the image.- Returns:
- the height
-
isNegativeImage
boolean isNegativeImage()Returns whether the negative image should be shown.- Returns:
- whether the negative image should be shown
-
isLowImage
boolean isLowImage()Returns whether the low image should be shown.- Returns:
- whether the low image should be shown
-
isValid
boolean isValid()Returns whether the gauge's values are valid.- Returns:
- whether the values are valid
-