|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
jfits.ShapeListener
jfits.ShapeStatistic
public class ShapeStatistic
This shape listener presents a button that displays the average plus standard deviation of the last adu delivered to it. It is inactive as long as select or delete events have been issued lately. Only on add events, the button gets active. If pressed, a dialog pops up giving more statistical information.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private Statistic |
adu
The last ADU statistics delivered to this listener. |
private JButton |
av
The button with the av+/-std label. |
private static DecimalFormat |
DEFFORMAT
Default formatter for text on button. |
static String |
KEY_AVERAGEFORMAT
The format string for the average of the first index. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
ShapeStatistic(Map<String,String> prop)
Constructs a new shape statistic. |
|
| Method Summary | |
|---|---|
protected void |
addFitsShape(FitsShape f,
AffineTransform a)
We update our statistic with the ADU-statistic delivered along with the fits shape and enable the details button. |
protected void |
deleteFitsShape(FitsShape f,
AffineTransform adu)
Disables the detail button until a new selection has been added. |
Icon |
getIcon()
No icon. |
Component |
getRepresentation()
Our representation is a button, which displays the average and the sigma of the first index given in indices on its label. |
void |
init()
Initializes the button of this listener, which is then readily delivered with #getComponent. |
protected void |
selectFitsShape(FitsShape f,
AffineTransform adu)
Disables the detail button until a new selection has been added. |
private void |
updateText(double aver)
Updates the text displayed on the button. |
| Methods inherited from class jfits.ShapeListener |
|---|
propertyChange |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_AVERAGEFORMAT
private static final DecimalFormat DEFFORMAT
private JButton av
private Statistic adu
| Constructor Detail |
|---|
public ShapeStatistic(Map<String,String> prop)
| Method Detail |
|---|
public void init()
#getComponent.
init in interface Initializableinit in class PropertyResourcespublic Component getRepresentation()
getRepresentation in interface Displayablepublic Icon getIcon()
getIcon in interface Displayable
protected void addFitsShape(FitsShape f,
AffineTransform a)
addFitsShape in class ShapeListener
protected void selectFitsShape(FitsShape f,
AffineTransform adu)
selectFitsShape in class ShapeListener
protected void deleteFitsShape(FitsShape f,
AffineTransform adu)
deleteFitsShape in class ShapeListenerprivate void updateText(double aver)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||