|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.apps.MapBrowser.RenderMold
public class RenderMold
A "mold" that controls the shape that map bits are rendered into.
Note well that the current implementation only deals with cartesian quadrant I (NE); i.e. that Y increases in the up or north direction and X increases in the right or east direction. When modifying the mold that has listeners (e.g. for a MapViewPanel) try to use only a single method call to modify the mold. Each method call only results in one ChangeEvent, cutting down on redraws etc. There are compound methods like rescaleAndRecenter() to help with this.
| Constructor Summary | |
|---|---|
RenderMold()
|
|
RenderMold(Coord3D origin,
int width,
int height,
Scale scale)
|
|
RenderMold(MapViewFrame frame)
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
|
void |
centerOn(Coord3D newCenter)
|
void |
centerOn(double x,
double y)
|
void |
changeToMatch(RenderMold nother)
Changes this rendermold to match the one given. |
java.lang.Object |
clone()
|
boolean |
contains(int pixelX,
int pixelY)
|
Coord3D |
coordAt(int pixelX,
int pixelY)
|
Coord3D |
coordAt(java.awt.Point pixel)
|
boolean |
covers(Coord3D coord)
|
void |
fromMapViewFrame(MapViewFrame frame)
|
Coord3D |
getCenter()
|
java.lang.String |
getContent()
|
MagicCookie |
getCookie()
The serial cookie. |
Coord2D |
getDimensions()
|
DoubleRectangle |
getExtents()
|
int |
getHeight()
|
boolean |
getInvertBackgroundColor()
|
boolean |
getMonochromeBackground()
|
Coord3D |
getNECorner()
|
Coord3D |
getNWCorner()
|
Coord3D |
getOrigin()
|
DoubleRectangle |
getRotatedExtents()
|
double |
getRotation()
|
Scale |
getScale()
|
Coord3D |
getSECorner()
|
Coord3D |
getSWCorner()
Purely for completeness; same as origin. |
int |
getWidth()
|
boolean |
isPrinting()
|
java.awt.Point |
pixelAt(Coord3D coord)
|
void |
polylineToFastPath(FastPath path,
int numPoints,
FloatBuffer coords)
|
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
|
void |
rescaleAndRecenter(Scale newScale,
Coord3D newCenter)
Another nice one. |
void |
rescaleButKeepCentered(Scale newScale)
Another nice one. |
void |
resizeButKeepCentered(int newWidth,
int newHeight)
Here's a nice one. |
void |
rotateTo(double x,
double y)
|
void |
setContent(java.lang.String newContent)
|
void |
setCoordToMatchPixel(Coord3D coord,
int pixelX,
int pixelY)
Same as coordAt, but instead of creating a new one, reuses the supplied Coord3D for speed. |
void |
setHeight(int newHeight)
|
void |
setInvertBackgroundColor(boolean newInvertBackgroundColor)
|
void |
setMonochromeBackground(boolean newMonochromeBackground)
|
void |
setOrigin(Coord3D newOrigin)
|
void |
setPrinting(boolean newPrinting)
|
void |
setRotation(double newRotation)
|
void |
setScale(Scale newScale)
|
void |
setWidth(int newWidth)
|
RenderMold[][] |
tileByPixels(int tileWidth,
int tileHeight)
|
MapViewFrame |
toMapViewFrame()
|
java.lang.String |
toString()
|
int |
xToPixel(double x)
|
int |
yToPixel(double y)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RenderMold()
public RenderMold(Coord3D origin,
int width,
int height,
Scale scale)
public RenderMold(MapViewFrame frame)
| Method Detail |
|---|
public int xToPixel(double x)
public int yToPixel(double y)
public java.awt.Point pixelAt(Coord3D coord)
public Coord3D coordAt(java.awt.Point pixel)
public Coord3D coordAt(int pixelX,
int pixelY)
public void setCoordToMatchPixel(Coord3D coord,
int pixelX,
int pixelY)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic boolean covers(Coord3D coord)
public boolean contains(int pixelX,
int pixelY)
public RenderMold[][] tileByPixels(int tileWidth,
int tileHeight)
public void polylineToFastPath(FastPath path,
int numPoints,
FloatBuffer coords)
public Coord3D getNWCorner()
public Coord3D getNECorner()
public Coord3D getSECorner()
public Coord3D getSWCorner()
public Coord3D getCenter()
public void centerOn(Coord3D newCenter)
public void centerOn(double x,
double y)
public void rotateTo(double x,
double y)
public void resizeButKeepCentered(int newWidth,
int newHeight)
public void rescaleAndRecenter(Scale newScale,
Coord3D newCenter)
public void rescaleButKeepCentered(Scale newScale)
public Coord2D getDimensions()
public DoubleRectangle getExtents()
public DoubleRectangle getRotatedExtents()
public void changeToMatch(RenderMold nother)
public MagicCookie getCookie()
public Coord3D getOrigin()
public void setOrigin(Coord3D newOrigin)
public int getWidth()
public void setWidth(int newWidth)
public int getHeight()
public void setHeight(int newHeight)
public Scale getScale()
public void setScale(Scale newScale)
public java.lang.String getContent()
public void setContent(java.lang.String newContent)
public boolean getMonochromeBackground()
public void setMonochromeBackground(boolean newMonochromeBackground)
public boolean isPrinting()
public void setPrinting(boolean newPrinting)
public boolean getInvertBackgroundColor()
public void setInvertBackgroundColor(boolean newInvertBackgroundColor)
public double getRotation()
public void setRotation(double newRotation)
public void fromMapViewFrame(MapViewFrame frame)
public void addChangeListener(javax.swing.event.ChangeListener listener)
public void removeChangeListener(javax.swing.event.ChangeListener listener)
public MapViewFrame toMapViewFrame()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||