public class NASARectangle extends Rectangle implements NASAShape
| Modifier and Type | Field and Description |
|---|---|
long |
timestamp |
int |
value
Value stored at this point
|
| Constructor and Description |
|---|
NASARectangle() |
NASARectangle(double x1,
double y1,
double x2,
double y2) |
NASARectangle(double x1,
double y1,
double x2,
double y2,
int value) |
NASARectangle(Rectangle r) |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Color |
calculateColor(float value) |
static java.awt.Color |
calculateColor(int value) |
Rectangle |
clone()
Returns a clone of this shape
|
void |
draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
Draws a shape to the given graphics.
|
void |
fromText(Text text)
Retrieve information from the given text.
|
long |
getTimestamp() |
int |
getValue() |
void |
readFields(java.io.DataInput in) |
void |
setTimestamp(long t) |
void |
setValue(int value) |
java.lang.String |
toString() |
Text |
toText(Text text)
Store current object as string in the given text appending text already there.
|
void |
write(java.io.DataOutput out) |
buffer, compareTo, compareTo, contains, contains, contains, contains, distanceTo, draw, equals, expand, getCenterPoint, getHeight, getIntersection, getMaxDistance, getMaxDistanceTo, getMBR, getMinDistance, getMinDistanceTo, getWidth, invalidate, isIntersected, isValid, set, set, translate, unionfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdistanceTo, draw, getMBR, isIntersectedpublic NASARectangle()
public NASARectangle(Rectangle r)
public NASARectangle(double x1,
double y1,
double x2,
double y2)
public NASARectangle(double x1,
double y1,
double x2,
double y2,
int value)
public void write(java.io.DataOutput out)
throws java.io.IOException
public void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in class Rectanglejava.io.IOExceptionpublic Text toText(Text text)
TextSerializabletoText in interface TextSerializabletoText in class Rectanglepublic void fromText(Text text)
TextSerializablefromText in interface TextSerializablefromText in class Rectanglepublic void draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
Shapedraw in interface Shapedraw in class Rectangleg - - the graphics or canvas to draw tofileMBR - - the MBR of the file in which the shape is containedimageWidth - - width of the image to drawimageHeight - - height of the image to drawscale - - the scale used to convert shape coordinates to image coordinatespublic static java.awt.Color calculateColor(int value)
public static java.awt.Color calculateColor(float value)
public void setTimestamp(long t)
setTimestamp in interface NASAShapepublic long getTimestamp()
getTimestamp in interface NASAShape