public class TensorsView extends TiledView
Modifier and Type | Class and Description |
---|---|
static class |
TensorsView.Orientation
Orientation of sample axes x1 and x2.
|
Constructor and Description |
---|
TensorsView(EigenTensors2 et)
Constructs a view of the specified tensors.
|
TensorsView(Sampling s1,
Sampling s2,
EigenTensors2 et)
Constructs a view of the specified tensors.
|
Modifier and Type | Method and Description |
---|---|
TensorsView.Orientation |
getOrientation()
Gets the orientation of (x1,x2) axes.
|
void |
paint(java.awt.Graphics2D g2d)
Paints this tiled view.
|
void |
set(EigenTensors2 et)
Sets the tensors for this view.
|
void |
setEllipsesDisplayed(int ne)
Sets the number of ellipses displayed along the larger dimension.
|
void |
setEllipsesDisplayed(Sampling e1,
Sampling e2)
Sets the samplings of ellipses displayed.
|
void |
setLineColor(java.awt.Color color)
Sets the line color.
|
void |
setLineWidth(float width)
Sets the line width.
|
void |
setOrientation(TensorsView.Orientation orientation)
Sets the orientation of (x1,x2) axes.
|
void |
setScale(double scale)
Sets the scale factor for ellipse size.
|
getBestHorizontalProjector, getBestVerticalProjector, getHorizontalProjector, getLineWidth, getTile, getTranscaler, getVerticalProjector, repaint, setBestProjectors
public TensorsView(EigenTensors2 et)
et
- the tensors.public TensorsView(Sampling s1, Sampling s2, EigenTensors2 et)
s1
- sampling of 1st dimension.s2
- sampling of 2nd dimension.et
- the tensors.public void set(EigenTensors2 et)
et
- the tensors.public void setOrientation(TensorsView.Orientation orientation)
orientation
- the orientation.public TensorsView.Orientation getOrientation()
public void setEllipsesDisplayed(int ne)
The sizes of the ellipses are chosen so that they never overlap. Therefore, this parameter indirectly determines the size of the the ellipses drawn. One can display either a large number of small ellipses or a smaller number of larger ellipses.
The default number is 20.
Calling this method overrides any ellipse samplings specified
previously by calling the method
setEllipsesDisplayed(Sampling,Sampling)
.
ne
- the number of ellipses displayed along the larger dimension.public void setEllipsesDisplayed(Sampling e1, Sampling e2)
Calling this method with non-null samplings overrides any number
of ellipses specified previously by calling the method
setEllipsesDisplayed(int)
.
e1
- ellipse sampling in 1st dimension.e2
- ellipse sampling in 2nd dimension.public void setScale(double scale)
scale
- the scale factor.public void setLineWidth(float width)
width
- the line width.public void setLineColor(java.awt.Color color)
color
- the line color; null, for tile foreground color.public void paint(java.awt.Graphics2D g2d)
TiledView
Tiled views should not replace (set) entirely the transform in the specified graphics context. This transform may already have been set by the tile or its mosaic. Therefore, tiled views should modify this transform only by specifying additional scaling, translation, etc.