|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jview.JFitsComponent
public class JFitsComponent
A special extension to JFitsCanvas that displays two sliders for
adjusting contrast and brightness of the displayed fits image. It works
together with the JCamera class.
| Nested Class Summary | |
|---|---|
static class |
JFitsComponent.Show
A test class. |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private double |
bright
The last brightness of the image. |
private JSlider |
brightness
The brightness slider. |
private double |
contrast
The last contrast of the image. |
private JSlider |
contrastrate
The contrast slider. |
private static double |
DEFBRIGHTNESS
Default brightness value. |
private static boolean |
DEFCONTINUOUS
Default property value. |
private static double |
DEFCONTRAST
Default contrast value. |
private static int |
DEFICONSIZE
The default icon size. |
private static boolean |
DEFONADJUST
Default not. |
private JFitsCanvas |
fitscanvas
The fits canvas served by this panel. |
private PropertySupplying |
info
My properties, also a handle to the fitscanvas properites. |
static String |
KEY_BRIGHTNESS
The default brightness value. |
static String |
KEY_CONTINUOUS
Always fill full view or snap to integer scales. |
static String |
KEY_CONTRAST
The default contrast value. |
static String |
KEY_ICONSIZE
The size of the brightness and contrast icon. |
static String |
KEY_ONADJUST
If true we allow b/c adjustment on slider move. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JFitsComponent(JFitsCanvas fits)
Constructs a new fits component. |
|
| Method Summary | |
|---|---|
double |
getBrightness()
Returns the current brightness. |
protected JFitsCanvas |
getCanvas()
Returns the fits canvas. |
PropertySupplying |
getComposedProperties()
Returns the properties of the panel and the properties of the fits canvas. |
double |
getContrast()
Returns the current contrast on the image in the range of -1 to +1. |
Map<String,Object> |
getDisplayMap()
|
BufferedImage |
getSaveBuffer()
Returns the buffered image from the fits canvas. |
void |
init()
Initializes the shape canvas. |
BufferedImage |
prepareToDisplay(BufferedImage src)
Rescales the image to display the new brightness and contrast. |
void |
propertyChange(PropertyChangeEvent e)
Notified when the fits canvas has been reset. |
boolean |
setBrightness(double newbright)
Sets the brightness of the image. |
void |
setComposedProperties(PropertySupplying prop)
Defaults the icon size. |
boolean |
setContrast(double newcontrast)
Sets the contrast of the image. |
void |
stateChanged(ChangeEvent e)
Invoked when the contrast or brightness slider was moved. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_ICONSIZE
public static final String KEY_ONADJUST
public static final String KEY_BRIGHTNESS
public static final String KEY_CONTRAST
public static final String KEY_CONTINUOUS
private static final int DEFICONSIZE
private static final boolean DEFONADJUST
private static final double DEFBRIGHTNESS
private static final double DEFCONTRAST
private static final boolean DEFCONTINUOUS
private double contrast
private double bright
private JFitsCanvas fitscanvas
private JSlider brightness
private JSlider contrastrate
private PropertySupplying info
| Constructor Detail |
|---|
public JFitsComponent(JFitsCanvas fits)
| Method Detail |
|---|
public void setComposedProperties(PropertySupplying prop)
setComposedProperties in interface PropertyAwarepublic PropertySupplying getComposedProperties()
getComposedProperties in interface PropertyComposedpublic void init()
init in interface Initializablepublic Map<String,Object> getDisplayMap()
public double getContrast()
public boolean setContrast(double newcontrast)
#revertFromFits.
public double getBrightness()
public boolean setBrightness(double newbright)
#revertFromFits.
public BufferedImage prepareToDisplay(BufferedImage src)
prepareToDisplay in interface ImageOperationpublic void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerprotected JFitsCanvas getCanvas()
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic BufferedImage getSaveBuffer()
getSaveBuffer in interface Savable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||