|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfable.imageviewer.internal.Coordinates
public class Coordinates
Class to manage the coordinates used to display the mouse position. These
coordinates apply to the oriented image, not the raw image. They use the
form:
x1 = pixelWidth * (x - x0)
y1 = pixelHeight * (y - y0)
where x and y are the image coordinates with origin at top left.
Field Summary |
---|
Fields inherited from interface fable.imageviewer.internal.IImagesVarKeys |
---|
BTN_IMG_ADD, BTN_IMG_ADD_PLOT, BTN_IMG_DELETE, BTN_IMG_SETTINGS, BTN_IMG_SUBTRACT, BTN_IMG_SUBTRACT_PLOT, COORD_BL, COORD_BR, COORD_CUSTOM, COORD_TL, COORD_TR, coordNameValues, O_MOOM, O_MOOP, O_OMMO, O_OMPO, O_OPMO, O_OPPO, O_POOM, O_POOP, orientNameValues, PALETTE_AUTUMN, PALETTE_BLUES, PALETTE_COLOR, PALETTE_GREENS, PALETTE_GREY, PALETTE_PASTEL1, PALETTE_RAINBOW1, PALETTE_RAINBOW2, PALETTE_REDS, PALETTE_SPRING, PALETTE_SUMMER, PALETTE_WINTER, paletteNameValues |
Constructor Summary | |
---|---|
Coordinates()
Constructor that uses the default values. |
|
Coordinates(int type,
double width,
double height)
Constructor that sets the parameters based on the width and height of the oriented image. |
|
Coordinates(int type,
double x0,
double y0,
double pixelWidth,
double pixelHeight,
java.lang.String xName,
java.lang.String yName)
Constructor that sets all the parameters. |
Method Summary | |
---|---|
double[] |
getCoordinatesFromOriented(org.eclipse.swt.graphics.Point point)
Gets the double coordinates given the integer oriented image coordinates. |
java.lang.String |
getCoordinateString(int x,
int y)
Gets a String with the coordinates given the oriented image coordinates. |
java.lang.String |
getCoordinateString(int x,
int y,
float pixelValue)
Gets a String with the coordinates given the oriented image coordinates and the pixel value. |
double |
getPixelHeight()
|
double |
getPixelWidth()
|
int |
getType()
|
double |
getX0()
|
java.lang.String |
getXName()
|
double |
getY0()
|
java.lang.String |
getYName()
|
boolean |
isXInverted()
Determines whether the x axis is inverted, that is, whether values increase to the left or not. |
boolean |
isYInverted()
Determines whether the y axis is inverted, that is, whether values increase upward or not. |
void |
reset(int type,
double width,
double height)
Resets the values based on the width and height of the oriented image. |
void |
reset(int type,
double x0,
double y0,
double pixelWidth,
double pixelHeight,
java.lang.String xName,
java.lang.String yName)
Resets all the parameters. |
void |
resetToDefault()
Set the values to the defaults. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Coordinates()
public Coordinates(int type, double width, double height)
type
- width
- height
- public Coordinates(int type, double x0, double y0, double pixelWidth, double pixelHeight, java.lang.String xName, java.lang.String yName)
type
- x0
- y0
- pixelWidth
- pixelHeight
- xName
- yName
- Method Detail |
---|
public void resetToDefault()
public void reset(int type, double width, double height)
type
- width
- height
- public void reset(int type, double x0, double y0, double pixelWidth, double pixelHeight, java.lang.String xName, java.lang.String yName)
type
- x0
- y0
- pixelWidth
- pixelHeight
- xName
- yName
- public double[] getCoordinatesFromOriented(org.eclipse.swt.graphics.Point point)
point
- The oriented image coordinates (x,y).
public java.lang.String getCoordinateString(int x, int y)
x
- y
-
public java.lang.String getCoordinateString(int x, int y, float pixelValue)
x
- y
- pixelValue
-
public boolean isXInverted()
public boolean isYInverted()
public double getX0()
public double getY0()
public double getPixelWidth()
public double getPixelHeight()
public java.lang.String getXName()
public java.lang.String getYName()
public int getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |