public class NavDecorations
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static Decoration |
center(javax.swing.Icon icon,
java.awt.Point p) |
Utility function to center a symmetric icon at a point.
|
static Decoration |
center1d(javax.swing.Icon icon,
boolean isY,
java.awt.Point p,
java.awt.Rectangle bounds) |
Utility function to center one of the 1-dimensional zoom icons
about a given point on its axis.
|
static BandDecoration |
createBandDecoration(java.awt.Point p1,
java.awt.Point p2,
boolean xuse,
boolean yuse,
java.awt.Rectangle bounds) |
Returns a decoration appropriate for a 2d frame zoom.
|
static Decoration |
createCenterDecoration(java.awt.Point p) |
Returns a simple marker at a point.
|
static Decoration |
createDragDecoration(java.awt.Point p,
double xfact,
double yfact,
boolean xuse,
boolean yuse,
java.awt.Rectangle bounds) |
Returns a decoration appropriate for a 2d drag zoom.
|
static Decoration |
createWheelDecoration(java.awt.Point p,
double xfact,
double yfact,
boolean xuse,
boolean yuse,
java.awt.Rectangle bounds) |
Returns a decoration appropriate for a 2d wheel zoom.
|
static void |
drawArrow(java.awt.Graphics g,
int x0,
int y0,
int x1,
int y1) |
Draws a line with an arrow head at one end.
|
static java.awt.Graphics2D |
prepareGraphics(java.awt.Graphics g) |
Sets graphics context ready for navigation decorations.
|
public static Decoration createCenterDecoration(java.awt.Point p)
p - positionppublic static Decoration createWheelDecoration(java.awt.Point p, double xfact, double yfact, boolean xuse, boolean yuse, java.awt.Rectangle bounds)
p - reference pointxfact - X direction zoom factoryfact - Y direction zoom factorxuse - true if X zoom is in effectyuse - true if Y zoom is in effectbounds - plot region boundspublic static Decoration createDragDecoration(java.awt.Point p, double xfact, double yfact, boolean xuse, boolean yuse, java.awt.Rectangle bounds)
p - reference pointxfact - X direction zoom factoryfact - Y direction zoom factorxuse - true if X zoom is in effectyuse - true if Y zoom is in effectbounds - plot region boundspublic static BandDecoration createBandDecoration(java.awt.Point p1, java.awt.Point p2, boolean xuse, boolean yuse, java.awt.Rectangle bounds)
p1 - drag start pointp2 - drag (current) end pointxuse - true if X zoom is in effectyuse - true if Y zoom is in effectbounds - plot region boundspublic static Decoration center(javax.swing.Icon icon, java.awt.Point p)
icon - iconp - central pointpublic static Decoration center1d(javax.swing.Icon icon, boolean isY, java.awt.Point p, java.awt.Rectangle bounds)
icon - iconisY - false for X axis annotation, true for Y axis annotationp - reference pointbounds - plot boundspublic static void drawArrow(java.awt.Graphics g,
int x0,
int y0,
int x1,
int y1)
g - graphics contextx0 - start X coordinatey0 - start Y coordinatex1 - end (arrow) X coordinatey1 - end (arrow) Y coordinatepublic static java.awt.Graphics2D prepareGraphics(java.awt.Graphics g)
g - supplied graphics contextgCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.