public abstract class OverlayObject extends Object
Modifier and Type | Field and Description |
---|---|
protected Color |
color
Color of this overlay.
|
protected boolean |
drawing
Flag indicating this overlay is still being initially drawn.
|
protected boolean |
filled
Flag indicating overlay is solid.
|
protected static float |
GLOW_ALPHA |
protected static Color |
GLOW_COLOR |
protected static float |
GLOW_WIDTH |
protected String |
group
Group to which this overlay belongs.
|
protected int |
horizGridCount
Number of horizontal and vertical dividing lines for selection grid.
|
protected String |
notes
Notes associated with this overlay.
|
protected OverlayTransform |
overlay
Associated overlay transform.
|
protected boolean |
selected
Flag indicating this overlay is currently selected.
|
protected String |
text
Text string to render.
|
protected int |
vertGridCount
Number of horizontal and vertical dividing lines for selection grid.
|
protected float |
x1
Endpoint coordinates.
|
protected float |
x2
Endpoint coordinates.
|
protected float |
xGrid1
Top-left endpoint of selection grid rectangle.
|
protected float |
xGrid2
Top-right endpoint of selection grid rectangle.
|
protected float |
xGrid3
Bottom-left endpoint of selection grid rectangle.
|
protected float |
xGrid4
Bottom-right endpoint of selection grid rectangle.
|
protected float |
y1
Endpoint coordinates.
|
protected float |
y2
Endpoint coordinates.
|
protected float |
yGrid1
Top-left endpoint of selection grid rectangle.
|
protected float |
yGrid2
Top-right endpoint of selection grid rectangle.
|
protected float |
yGrid3
Bottom-left endpoint of selection grid rectangle.
|
protected float |
yGrid4
Bottom-right endpoint of selection grid rectangle.
|
Constructor and Description |
---|
OverlayObject(OverlayTransform overlay)
Constructs an overlay.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areBoundsEditable()
True iff this overlay can be resized using X1, X2, Y1, Y2 entry boxes.
|
boolean |
canBeFilled()
True iff this overlay supports the filled parameter.
|
Color |
getColor()
Gets color of this overlay.
|
abstract DataImpl |
getData()
Gets VisAD data object representing this overlay.
|
abstract double |
getDistance(double x,
double y)
Computes the shortest distance from this overlay to the given point.
|
String |
getGroup()
Gets group to which this overlay belongs.
|
String |
getNotes()
Gets notes for this overlay.
|
abstract String |
getStat(String name)
Gets a specific overlay statistic.
|
String |
getStatistics()
Retrieves useful statistics about this overlay.
|
String |
getText()
Gets text to render.
|
float |
getX()
Gets X coordinate of the overlay's first endpoint.
|
float |
getX2()
Gets X coordinate of the overlay's second endpoint.
|
float |
getY()
Gets Y coordinate of the overlay's first endpoint.
|
float |
getY2()
Gets Y coordinate of the overlay's second endpoint.
|
abstract boolean |
hasData()
Returns whether this object is drawable, i.e., is of nonzero size, area,
length, etc.
|
boolean |
hasEndpoint()
True iff this overlay has an endpoint coordinate pair.
|
boolean |
hasEndpoint2()
True iff this overlay has a second endpoint coordinate pair.
|
boolean |
hasText()
True iff this overlay returns text to render.
|
boolean |
isDrawing()
Gets whether this overlay is still being initially drawn.
|
boolean |
isFilled()
Gets whether overlay is solid.
|
boolean |
isScalable()
Gets whether overlay is scalable.
|
boolean |
isSelected()
Gets whether this overlay is currently selected.
|
void |
rescale(float multiplier)
Rescales this overlay object.
|
protected void |
setBoundaries(float x,
float y)
Sets value of largest and smallest x, y values.
|
void |
setColor(Color c)
Sets color of this overlay.
|
void |
setCoords(float x1,
float y1)
Changes coordinates of the overlay's first endpoint.
|
void |
setCoords2(float x2,
float y2)
Changes coordinates of the overlay's second endpoint.
|
void |
setDrawing(boolean drawing)
Sets whether this overlay is still being initially drawn.
|
void |
setFilled(boolean filled)
Sets whether overlay is solid.
|
void |
setGroup(String group)
Sets group to which this overlay belongs.
|
void |
setNotes(String text)
Sets notes for this overlay.
|
void |
setSelected(boolean selected)
Sets whether this overlay is currently selected.
|
void |
setText(String text)
Changes text to render.
|
void |
setX(float x1)
Changes X coordinate of the overlay's first endpoint.
|
void |
setX2(float x2)
Changes X coordinate of the overlay's second endpoint.
|
void |
setY(float y1)
Changes Y coordinate of the overlay's first endpoint.
|
void |
setY2(float y2)
Changes Y coordinate of the overlay's second endpoint.
|
protected static final float GLOW_WIDTH
protected static final float GLOW_ALPHA
protected static final Color GLOW_COLOR
protected OverlayTransform overlay
protected float x1
protected float y1
protected float x2
protected float y2
protected String text
protected Color color
protected boolean filled
protected String group
protected String notes
protected boolean selected
protected boolean drawing
protected float xGrid1
protected float yGrid1
protected float xGrid2
protected float yGrid2
protected float xGrid3
protected float yGrid3
protected float xGrid4
protected float yGrid4
protected int horizGridCount
protected int vertGridCount
public OverlayObject(OverlayTransform overlay)
public abstract boolean hasData()
public abstract DataImpl getData()
public abstract double getDistance(double x, double y)
public String getStatistics()
public boolean hasEndpoint()
public boolean hasEndpoint2()
public boolean canBeFilled()
public boolean areBoundsEditable()
public boolean hasText()
public void setX(float x1)
public void setY(float y1)
public void setCoords(float x1, float y1)
public float getX()
public float getY()
public void setX2(float x2)
public void setY2(float y2)
public void setCoords2(float x2, float y2)
public float getX2()
public float getY2()
public void setText(String text)
public String getText()
public void setColor(Color c)
public Color getColor()
public void setFilled(boolean filled)
public boolean isFilled()
public boolean isScalable()
public void rescale(float multiplier)
public void setGroup(String group)
public String getGroup()
public void setNotes(String text)
public String getNotes()
public void setSelected(boolean selected)
public boolean isSelected()
public void setDrawing(boolean drawing)
public boolean isDrawing()
protected void setBoundaries(float x, float y)
Copyright © 2015–2022 SciJava. All rights reserved.