|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jview.JExitFrame
jview.JConfirmExitFrame
jview.JBorderFrame
jview.JDataModelFrame
public class JDataModelFrame
This frame works together with a JFitResidualDisplay and allows
displaying of the original data, the model fit and the residuals.
Additionally, the user may adjust some of the model parameters, those given
in KEY_ADJUSTABLE, while those denoted in KEY_FIXED cannot
be altered. Changing the parameters is accomplished by spinners, the
step-size is regulated by the errors of the model parameters, if known,
#setInitialModel, and by #KEY_ADJUSTABLESTEP. Transfer
functions for x, y and the residual allow more flexibility.
| Nested Class Summary | |
|---|---|
static class |
JDataModelFrame.Show
Class to create the frame and display it. |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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 List<String> |
adjustlist
This is the list of parameters known for the current fitter. |
private Map<String,List<String>> |
adjustmap
How I map models to adjustable parameters. |
private Map<String,JLabel> |
constants
To trace constants. |
private JLabel |
correlationfit
The label with the root of the coefficient of determination. |
private static int |
DEFADJUSTMAX
How I step from error to spinner. |
private static double |
DEFADJUSTSTEP
How I step from error to spinner. |
private static String |
DEFEQUAL
How I separate constant name from value in display labels. |
private static Insets |
DEFINSETS
The default insets on the labels and spinners. |
private static Dimension |
DEFMINPANEL
Minimum panel size. |
private ModelFitting |
fitter
The current active fitter. |
private List<String> |
fixedlist
This is the list of known constants for the current fitter. |
private Map<String,List<String>> |
fixedmap
How I map models to adjustable parameters. |
static String |
KEY_ADJUSTABLE
The names of the parameters that should be adjustable. |
static String |
KEY_ADJUSTMAX
The maximum number of spinner steps from the current value.. |
static String |
KEY_ADJUSTSTEP
The spinner-step values of the adjustable parameters. |
static String |
KEY_CANVAS
The properties of the splitted canvas to show. |
static String |
KEY_EQUAL
How I separate constant name from value in display labels. |
static String |
KEY_FIXED
The mapping of fixed parameters to their values. |
static String |
KEY_MINPANEL
I need a minimum size of the right panel, otherwise I cant see it. |
static String |
R2
The header for the R label. |
private JComponent |
right
The panel which contains the spinners and labels. |
static String |
RMS
The header for the rms label. |
private JLabel |
rmsfit
The label with the current model RMS. |
private Map<String,MySpinner> |
spinners
To trace the new value. |
private DataCanvasProviding |
splitter
The splitted data pane to display residuals plus fit. |
static String |
UNDEFINED
For undefined RMS or correlation. |
| Fields inherited from class jview.JBorderFrame |
|---|
DATACLEANSE, KEY_ABOUTURL, KEY_ACTIONCLASS, KEY_AIPLOGO, KEY_BIGGERSTRUT, KEY_DATAANALYSER, KEY_EASTALIGNMENT, KEY_FITTERS, KEY_FITTERTIPS, KEY_HELPSIZE, KEY_LESSERSTRUT, KEY_NOLOGO, KEY_NORTHALIGNMENT, KEY_SOUTHALIGNMENT, KEY_WESTALIGNMENT, MODELFITTER |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface util.BeanSupport |
|---|
CASTING |
| Fields inherited from interface jview.BorderLabels |
|---|
KEY_ABOUT, KEY_ABOUTACC, KEY_FILEACCS, KEY_FILEITEMS, KEY_FILEMENU, KEY_FILEMNEMONIC, KEY_HELPMENU, KEY_HELPMNEMONIC, KEY_HELPTITLE, KEY_NOHELP, KEY_NOURLACCESS, KEY_TITLE |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JDataModelFrame(LocalizedSupplying prop)
Constructs an expression frame from a property container. |
|
JDataModelFrame(Map<String,String> prop)
Constructs an expression frame from a property mapping. |
|
| Method Summary | |
|---|---|
private boolean |
addAdjustable(Variable v)
Adds a spinner to the spinners mapping if not present or updates the value. |
private boolean |
addConstant(Variable v)
Adds a constant. |
private void |
cache(String name,
Number val)
Caches a new variable value in our table. |
private void |
cleanse()
Cleanse spinners and lables. |
private JComponent |
createRight()
|
private MySpinner |
createSpinner(Variable v)
|
Component |
getRepresentation()
We return our expression canvas. |
protected List |
getRightItems()
We return a panel that holds the spinners and constant labels as soon as parameters are specified. |
void |
init()
We have to pack ourselves after init. |
private boolean |
initParameterPanel(List<String> adjustable,
List<String> fixed)
We initialize the spinners and constans maps with displayable items. |
boolean |
isInterested(String propname)
Returns the same interest as my minion display. |
private static Map<String,List<String>> |
parseParameterNames(String p)
We propertize a key value and convert the property values to string lists. |
void |
propertyChange(PropertyChangeEvent pce)
Receives the property changes. |
void |
setComposedProperties(LocalizedSupplying prop)
Sets the composed properties, defaults the transfer function or constructs them with an empty constructor. |
private void |
setLabelConstant(JLabel c,
Variable v)
Puts the name of the variable plus the value in the label's text and update the tooltiptext to include the error. |
private void |
setSpinnerAdjustable(MySpinner s,
Variable v)
|
private boolean |
spinnersAndLabels(List<Variable> received,
List<String> adjustable,
List<String> fixed)
|
private void |
updateRmsAndR()
|
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit, disposeImmediately |
| Methods inherited from class jview.JExitFrame |
|---|
setVisible |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.BeanSupport |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String UNDEFINED
public static final String RMS
public static final String R2
public static final String KEY_CANVAS
public static final String KEY_ADJUSTABLE
public static final String KEY_ADJUSTSTEP
public static final String KEY_ADJUSTMAX
public static final String KEY_FIXED
public static final String KEY_EQUAL
public static final String KEY_MINPANEL
private static final Insets DEFINSETS
private static final double DEFADJUSTSTEP
private static final int DEFADJUSTMAX
private static final String DEFEQUAL
private static final Dimension DEFMINPANEL
private DataCanvasProviding splitter
private ModelFitting fitter
private JLabel rmsfit
private JLabel correlationfit
private Map<String,List<String>> adjustmap
private Map<String,List<String>> fixedmap
private JComponent right
private List<String> fixedlist
private List<String> adjustlist
private Map<String,MySpinner> spinners
private Map<String,JLabel> constants
| Constructor Detail |
|---|
public JDataModelFrame(Map<String,String> prop)
public JDataModelFrame(LocalizedSupplying prop)
| Method Detail |
|---|
public void setComposedProperties(LocalizedSupplying prop)
setComposedProperties in interface LocalizedAwaresetComposedProperties in class JBorderFramepublic void init()
init in interface Initializableinit in class JBorderFramepublic boolean isInterested(String propname)
public void propertyChange(PropertyChangeEvent pce)
propertyChange in interface PropertyChangeListenerpublic Component getRepresentation()
getRepresentation in interface DisplayablegetRepresentation in class JBorderFrameprotected List getRightItems()
getRightItems in class JBorderFrameprivate void cleanse()
private void updateRmsAndR()
private JComponent createRight()
private boolean spinnersAndLabels(List<Variable> received,
List<String> adjustable,
List<String> fixed)
private boolean addAdjustable(Variable v)
private MySpinner createSpinner(Variable v)
private boolean addConstant(Variable v)
private void setSpinnerAdjustable(MySpinner s,
Variable v)
private void setLabelConstant(JLabel c,
Variable v)
private boolean initParameterPanel(List<String> adjustable,
List<String> fixed)
private void cache(String name,
Number val)
private static final Map<String,List<String>> parseParameterNames(String p)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||