|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.geom.NavDecorations
public class NavDecorations
Utility class supplying visual feedback decorations for two-dimensional plot navigation.
Method Summary | |
---|---|
static Decoration |
center(Icon icon,
Point p)
Utility function to center a symmetric icon at a point. |
static Decoration |
center1d(Icon icon,
boolean isY,
Point p,
Rectangle bounds)
Utility function to center one of the 1-dimensional zoom icons about a given point on its axis. |
static BandDecoration |
createBandDecoration(Point p1,
Point p2,
boolean xuse,
boolean yuse,
Rectangle bounds)
Returns a decoration appropriate for a 2d frame zoom. |
static Decoration |
createCenterDecoration(Point p)
Returns a simple marker at a point. |
static Decoration |
createDragDecoration(Point p,
double xfact,
double yfact,
boolean xuse,
boolean yuse,
Rectangle bounds)
Returns a decoration appropriate for a 2d drag zoom. |
static Decoration |
createWheelDecoration(Point p,
double xfact,
double yfact,
boolean xuse,
boolean yuse,
Rectangle bounds)
Returns a decoration appropriate for a 2d wheel zoom. |
static void |
drawArrow(Graphics g,
int x0,
int y0,
int x1,
int y1)
Draws a line with an arrow head at one end. |
static Graphics2D |
prepareGraphics(Graphics g)
Sets graphics context ready for navigation decorations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Decoration createCenterDecoration(Point p)
p
- position
p
public static Decoration createWheelDecoration(Point p, double xfact, double yfact, boolean xuse, boolean yuse, 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 bounds
public static Decoration createDragDecoration(Point p, double xfact, double yfact, boolean xuse, boolean yuse, 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 bounds
public static BandDecoration createBandDecoration(Point p1, Point p2, boolean xuse, boolean yuse, 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 bounds
public static Decoration center(Icon icon, Point p)
icon
- iconp
- central point
public static Decoration center1d(Icon icon, boolean isY, Point p, Rectangle bounds)
icon
- iconisY
- false for X axis annotation, true for Y axis annotationp
- reference pointbounds
- plot bounds
public static void drawArrow(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 Graphics2D prepareGraphics(Graphics g)
g
- supplied graphics context
g
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |