|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.image.graphics.gui.FITSGraphics
public class FITSGraphics
This class allows you to save the current image graphics to a FITS binary table and reload it again later.
Field Summary | |
---|---|
protected CanvasDraw |
canvasDraw
User interface object managing a list of graphics objects. |
protected DivaImageGraphics |
graphics
Object managing image graphics |
protected DivaMainImageDisplay |
imageDisplay
The target image display. |
protected SelectionInteractor |
interactor
Handles selections for graphics objects. |
protected static int[] |
PATTERNS
Maps a skycat pattern (pat0..15) index to CanvasDraw composite index |
Constructor Summary | |
---|---|
FITSGraphics(DivaMainImageDisplay imageDisplay)
Initialize with the image display object. |
Method Summary | |
---|---|
void |
deleteHDU(String extName)
Delete the table HDU with the given name, if found. |
protected Color |
getColor(String s)
Return a color for the given name |
protected String |
getColorName(Color c)
Return the name of the given color |
protected Composite |
getComposite(String s)
Return a composite for the given composite string as defined in CanvasDraw (0%,100%). |
protected String |
getCompositeName(Composite composite)
Return the name corresponding to the given composite. |
protected String |
getConfig(Paint fill,
Paint outline,
int lineWidth,
Composite composite)
Return a Tcl formatted list of Tk canvas item style configuration options and values for the given arguments. |
protected String |
getConfig(String text,
Font font,
Paint fill)
Return a Tcl formatted list of Tk canvas item style configuration options and values for the given arguments. |
protected String |
getCoords(Point2D.Double p)
Return a Tcl formatted list of two image coordinate values for the given screen coordinate point. |
protected String |
getCoords(Shape shape)
Return a Tcl formatted list of image coordinate values for the given screen coordinate shape. |
protected double[] |
getCoords(String[] coords)
Convert the given String formatted image coords to doubles in screen coords and return the new array. |
protected Font |
getFont(String s)
Return a font for the given name |
protected Composite |
getStipple(String s)
Return a composite for the given skycat stipple name (pat0..pat15) |
protected String |
getType(Shape shape)
Return the Tk canvas item type name corresponding to the given shape. |
void |
loadGraphicsFromImage(String extName)
If a binary table with the given name is found in the current image, load the previously saved image graphics from it. |
void |
loadGraphicsFromImage(TableHDU hdu)
Load previously saved graphics from the given FITS binary table. |
void |
saveGraphicsWithImage(String extName)
Save the current image graphics to a binary FITS table with the given name in the current image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DivaMainImageDisplay imageDisplay
protected DivaImageGraphics graphics
protected CanvasDraw canvasDraw
protected SelectionInteractor interactor
protected static final int[] PATTERNS
Constructor Detail |
---|
public FITSGraphics(DivaMainImageDisplay imageDisplay)
imageDisplay
- used to access the JCanvas and DivaImageGraphics objectsMethod Detail |
---|
public void saveGraphicsWithImage(String extName) throws FitsException
FitsException
public void loadGraphicsFromImage(String extName)
public void loadGraphicsFromImage(TableHDU hdu) throws FitsException
FitsException
public void deleteHDU(String extName)
protected double[] getCoords(String[] coords)
protected Color getColor(String s)
protected String getColorName(Color c)
protected Font getFont(String s)
protected Composite getStipple(String s)
protected Composite getComposite(String s)
protected String getCompositeName(Composite composite)
protected String getType(Shape shape)
protected String getCoords(Shape shape)
protected String getCoords(Point2D.Double p)
protected String getConfig(Paint fill, Paint outline, int lineWidth, Composite composite)
Example "{-fill red} {-outline black} {-width 2} {-composite 20%}"
Note: the return value is Tk canvas "style", but may contain other options, such as -composite.
protected String getConfig(String text, Font font, Paint fill)
Example "{-text {some text}} {-font Dialog-italic-14} {-fill white}"
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |