|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.apps.MapBrowser.Scale
public class Scale
A visual scale for a map. Defines the pixel<->ground coordinate mapping.
| Field Summary | |
|---|---|
double |
pixelHeight
|
double |
pixelWidth
|
| Constructor Summary | |
|---|---|
Scale()
Create a new, blank scale. |
|
Scale(double pixelSize)
Create a scale with the same pixel width and height |
|
Scale(double pixelWidth,
double pixelHeight)
Create a scale with the given pixel height and width. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object nother)
Compares with another Scale. |
double |
getPixelHeight()
|
double |
getPixelWidth()
|
boolean |
isCoarserThan(Scale nother)
Returns true if this scale is coarser (i.e., each pixel covers more area) than the one given. |
boolean |
isEqualOrFinerThan(Scale nother)
Returns true if this scale is the same or finer (i.e., each pixel covers less area) than the one given. |
boolean |
isFinerThan(Scale nother)
Returns true if this scale is finer (i.e., each pixel covers less area) than the one given. |
double |
pixelsToX(int pixels)
Translates a horizontal distance in pixels to a horizontal distance in ground coordinates. |
double |
pixelsToY(int pixels)
Translates a vertical distance in pixels to a vertical distance in ground coordinates. |
void |
scaleBy(double factor)
Scales the scale by the given factor (multiplying pixelWidth and pixelHeight by said factor). |
void |
setPixelHeight(double newHeight)
|
void |
setPixelWidth(double newWidth)
|
java.lang.String |
toString()
|
int |
xToPixels(double x)
Translates a horizontal distance in ground coordinates to a horizontal distance in pixels. |
int |
yToPixels(double y)
Translates a vertical distance in ground coordinates to a vertical distance in pixels. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double pixelWidth
public double pixelHeight
| Constructor Detail |
|---|
public Scale()
public Scale(double pixelWidth,
double pixelHeight)
public Scale(double pixelSize)
| Method Detail |
|---|
public double pixelsToX(int pixels)
public double pixelsToY(int pixels)
public int xToPixels(double x)
public int yToPixels(double y)
public boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isCoarserThan(Scale nother)
public boolean isFinerThan(Scale nother)
public boolean isEqualOrFinerThan(Scale nother)
public void scaleBy(double factor)
public double getPixelWidth()
public void setPixelWidth(double newWidth)
public double getPixelHeight()
public void setPixelHeight(double newHeight)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||