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, union
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
distanceTo, draw, getMBR, isIntersected
public 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 Rectangle
java.io.IOException
public Text toText(Text text)
TextSerializable
toText
in interface TextSerializable
toText
in class Rectangle
public void fromText(Text text)
TextSerializable
fromText
in interface TextSerializable
fromText
in class Rectangle
public void draw(java.awt.Graphics g, Rectangle fileMBR, int imageWidth, int imageHeight, double scale)
Shape
draw
in interface Shape
draw
in class Rectangle
g
- - 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 NASAShape
public long getTimestamp()
getTimestamp
in interface NASAShape