Package uk.ac.starlink.topcat.plot2
Interface Figure
-
public interface Figure
Defines an area on the graphics surface, including criteria for determining whether a given point is or is not included in it.- Since:
- 15 Feb 2019
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
createExpression(TableCloud cloud)
Returns an algebraic (JEL) expression that tests whether a point from a given point cloud is contained within this figure.java.lang.String
getAdql()
Returns some ADQL text that represents this figure.java.awt.geom.Area
getArea()
Returns a drawable shape representing the area defined by this figure on its plotting surface.java.lang.String
getExpression()
Returns a generic algebraic (JEL-like) expression for determining inclusion in this figure.java.awt.Point[]
getVertices()
Returns the array of vertices defining this figure.void
paintPath(java.awt.Graphics2D g)
Paints the path defined by this figure's points.
-
-
-
Method Detail
-
getArea
java.awt.geom.Area getArea()
Returns a drawable shape representing the area defined by this figure on its plotting surface. The shape does not necessarily extend beyond the plot surface's bounding rectangle, even though the figure may encompass a larger area. Null may be returned if this figure does not represent a non-blank area.- Returns:
- figure area, or null
-
paintPath
void paintPath(java.awt.Graphics2D g)
Paints the path defined by this figure's points. This may or may not be the actual boundary of the enclosed area, but it should convey to the user the choices they have made by selecting the vertices.- Parameters:
g
- destination graphics context
-
getVertices
java.awt.Point[] getVertices()
Returns the array of vertices defining this figure. This may or may not be the same as the array of points that went into defining it, since in some cases some of the points are ignored. These points may be marked visually in some way.- Returns:
- array of significant user-chosen vertices for this figure
-
getExpression
java.lang.String getExpression()
Returns a generic algebraic (JEL-like) expression for determining inclusion in this figure. This should represent symbolic variables (such as X, Y) rather than actually available ones. Null may be returned if this figure does not represent a non-blank area.- Returns:
- boolean JEL inclusion expression, or null
-
createExpression
java.lang.String createExpression(TableCloud cloud)
Returns an algebraic (JEL) expression that tests whether a point from a given point cloud is contained within this figure. Null may be returned if this figure does not represent a non-blank area.- Parameters:
cloud
- the source of the data points- Returns:
- boolean JEL inclusion expression, or null
-
getAdql
java.lang.String getAdql()
Returns some ADQL text that represents this figure. It should be straightforward for the user to adapt the resulting text for use as part of an ADQL query.At present no assumptions are specified about the ADQL version etc, but a widely-applicable dialect (for instance ADQL v2.0 with geometry support) should be used where possible.
- Returns:
- ADQL representation of this figure
-
-