|
|||||||||
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 diva.canvas.interactor.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(java.lang.String extName)
Delete the table HDU with the given name, if found. |
protected java.awt.Color |
getColor(java.lang.String s)
Return a color for the given name |
protected java.lang.String |
getColorName(java.awt.Color c)
Return the name of the given color |
protected java.awt.Composite |
getComposite(java.lang.String s)
Return a composite for the given composite string as defined in CanvasDraw (0%,100%). |
protected java.lang.String |
getCompositeName(java.awt.Composite composite)
Return the name corresponding to the given composite. |
protected java.lang.String |
getConfig(java.awt.Paint fill,
java.awt.Paint outline,
int lineWidth,
java.awt.Composite composite)
Return a Tcl formatted list of Tk canvas item style configuration options and values for the given arguments. |
protected java.lang.String |
getConfig(java.lang.String text,
java.awt.Font font,
java.awt.Paint fill)
Return a Tcl formatted list of Tk canvas item style configuration options and values for the given arguments. |
protected java.lang.String |
getCoords(java.awt.geom.Point2D.Double p)
Return a Tcl formatted list of two image coordinate values for the given screen coordinate point. |
protected java.lang.String |
getCoords(java.awt.Shape shape)
Return a Tcl formatted list of image coordinate values for the given screen coordinate shape. |
protected double[] |
getCoords(java.lang.String[] coords)
Convert the given String formatted image coords to doubles in screen coords and return the new array. |
protected java.awt.Font |
getFont(java.lang.String s)
Return a font for the given name |
protected java.awt.Composite |
getStipple(java.lang.String s)
Return a composite for the given skycat stipple name (pat0..pat15) |
protected java.lang.String |
getType(java.awt.Shape shape)
Return the Tk canvas item type name corresponding to the given shape. |
void |
loadGraphicsFromImage(java.lang.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(nom.tam.fits.TableHDU hdu)
Load previously saved graphics from the given FITS binary table. |
void |
saveGraphicsWithImage(java.lang.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 diva.canvas.interactor.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(java.lang.String extName) throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public void loadGraphicsFromImage(java.lang.String extName)
public void loadGraphicsFromImage(nom.tam.fits.TableHDU hdu) throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public void deleteHDU(java.lang.String extName)
protected double[] getCoords(java.lang.String[] coords)
protected java.awt.Color getColor(java.lang.String s)
protected java.lang.String getColorName(java.awt.Color c)
protected java.awt.Font getFont(java.lang.String s)
protected java.awt.Composite getStipple(java.lang.String s)
protected java.awt.Composite getComposite(java.lang.String s)
protected java.lang.String getCompositeName(java.awt.Composite composite)
protected java.lang.String getType(java.awt.Shape shape)
protected java.lang.String getCoords(java.awt.Shape shape)
protected java.lang.String getCoords(java.awt.geom.Point2D.Double p)
protected java.lang.String getConfig(java.awt.Paint fill, java.awt.Paint outline, int lineWidth, java.awt.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 java.lang.String getConfig(java.lang.String text, java.awt.Font font, java.awt.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 |