|
||||||||||
| 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
public abstract class JBorderFrame
A generic class that is suitable for GUI that want to lay out their
individual components in a BorderLayout with a menu bar.
| Nested Class Summary | |
|---|---|
static class |
JBorderFrame.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 Action |
about
The about action. |
private List<DataAnalysing> |
dataanalysers
My data analysers. |
static String |
DATACLEANSE
This property is fired if cleansing of data references is requested. |
private static String |
DEFABOUTURL
The default url for the about button. |
private static String |
DEFACTIONCLASS
The default class name for actions. |
private static String |
DEFAIPLOGO
The default AIP logo resource. |
private static int |
DEFBIGGERSTRUT
A general purpose lesser strut. |
private static int |
DEFEASTALIGNMENT
The general x-alignment value for east, top-to-bottom items. |
private static Dimension |
DEFHELPSIZE
The height & wisth of the help dialog in pixel. |
private static int |
DEFLESSERSTRUT
A general purpose lesser strut. |
private static int |
DEFNORTHALIGNMENT
The general y-alignment value for north, left-to-right items. |
private static String |
DEFRESOURCEBUNDLES
The resource bundles for localized labels and text. |
private static int |
DEFSOUTHALIGNMENT
The general y-alignment value for north, left-to-right items. |
private static String |
DEFURLRESOURCES
The default resources. |
private static int |
DEFWESTALIGNMENT
The general x-alignment value for west, top-to-bottom items. |
private boolean |
fired
Gets true, if we have fired a MODELFITTER. |
private String |
fitlabel
If we have active model fitters, they change this label. |
private Map<String,ModelFitting> |
fittings
My action-less model fitters. |
private PropertyBearing |
info
My properties, composed from a PropertyContainer. |
static String |
KEY_ABOUTURL
The aip logo as an image file. |
static String |
KEY_ACTIONCLASS
The class that should be used if items are actions. |
static String |
KEY_AIPLOGO
The aip logo as an image file. |
static String |
KEY_BIGGERSTRUT
A general-purpose bigger strut for separating items. |
static String |
KEY_DATAANALYSER
All known analysers in that frame. |
static String |
KEY_EASTALIGNMENT
The general x-alignment value for east, top-to-ottom items. |
static String |
KEY_FITTERS
All known model fitter in that frame. |
static String |
KEY_FITTERTIPS
All known fitter tooltips in that frame, only for button view. |
static String |
KEY_HELPSIZE
The pixel dimension of help dialogs. |
static String |
KEY_LESSERSTRUT
A general-purpose lesser strut for separating items. |
static String |
KEY_NOLOGO
If this key points to true, the AIP logo is suppressed. |
static String |
KEY_NORTHALIGNMENT
The general y-alignment value for north, left-to-right items. |
static String |
KEY_SOUTHALIGNMENT
The general y-alignment value for north, left-to-right items. |
static String |
KEY_WESTALIGNMENT
The general x-alignment value for west, top-to-bottom items. |
static String |
MODELFITTER
This property is fired on fitter changes. |
private JStatusField |
status
My status panel. |
| 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 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 | |
|---|---|
JBorderFrame(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
JBorderFrame(PropertyBearing prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
protected void |
analyserListenTo(JComponent c)
Adds the list of analysers to the data canvas. |
private static Container |
createBox(int axis,
int align,
int afill,
List<?> all,
Class<?> action)
Creates a box using the specified layout direction. |
static JButton |
createButton(String text,
Icon icon,
String command,
String tooltip)
Creates a new button, set the command if specified and the tooltip |
static JCheckBox |
createCheckBox(String text,
Icon icon,
String command,
String tooltip)
Creates a new button, set the command if specified and the tooltip |
protected boolean |
createDataAnalysers()
We create the data anlysers here by listing through the KEY_DATAANALYSER property and using each entry as a
resource for
a DataAnlysing class. |
protected boolean |
createFitters()
We create the anlysers here by propertizing through the #KEY_ANALYSER property and using each value entry as a
resource for
a Anlyser class. |
static Action |
createHelp(PropertyBearing i,
String label,
String acc,
String url,
Icon icon)
Creates a standard help action with a label, a accelerator and an icon. |
static JLabel |
createLabel(String text,
Icon icon,
String tooltip)
Creates a new button, set the command if specified and the tooltip |
static JButton |
createLocalizedButton(PropertyBearing info,
String textkey,
Icon icon,
String command,
String tipkey)
Creates a localized button, scanning the resource bundle for the appropriate keys. |
static JCheckBox |
createLocalizedCheckBox(PropertyBearing info,
String textkey,
Icon icon,
String command,
String tipkey)
Creates a localized button, scanning the resource bundle for the appropriate keys. |
Action |
createLocalizedHelp(PropertyBearing info,
String labelkey,
String acckey,
String url,
Icon icon)
Creates a localized help. |
static JLabel |
createLocalizedLabel(PropertyBearing info,
String textkey,
Icon icon,
String tipkey)
Creates a localized button, scanning the resource bundle for the appropriate keys. |
protected JStatusField |
createStatus()
Creates the status field or a subclass of it. |
protected Action |
getAboutAction()
Returns an action that pops up an about dialog. |
ModelFitting |
getActiveFit()
Gets the currently selected analyser. |
int |
getBiggerStrut()
For layout purposes get the size of a bigger strut. |
protected List<Object> |
getBottomItems()
Returns the bottom. |
private Box |
getBoxAt(Object constraint)
We can try to retrieve the box at the given location. |
PropertyBearing |
getComposedProperties()
Returns the PropertyBearings this frame refers to. |
List<DataAnalysing> |
getDataAnalysers()
Returns the list of possible analysers for this frame. |
ButtonGroup |
getFitterButtonGroup()
Creates a radio button group out of the fitting mechanisms. |
JComboBox |
getFitterComboBox()
Creates a combo box out of the fitting mechanisms. |
Icon |
getIcon()
The default implementation returns null here. |
protected List<Object> |
getLeftItems()
Returns the list of items to add to the west box. |
int |
getLesserStrut()
For layout purposes get the size of a lesser strut. |
Map<String,ModelFitting> |
getModelFittings()
Returns a mapping of names of analysers to analysers. |
Component |
getRepresentation()
The default implementation returns null here. |
protected List<Object> |
getRightItems()
Returns the list of actions where buttons below the AIP logo should be created. |
protected JStatusField |
getStatusField()
Returns the status field. |
protected List<Object> |
getTopItems()
Returns the list of items to add to the north box. |
protected boolean |
hasFired()
Returns the fired flag. |
void |
init()
Initializes the frame. |
protected static void |
printAlignment(Component c,
String name)
For testing, this prints out the alignment of a component. |
protected static void |
setAlignment(JComponent c,
float x,
float y)
|
void |
setComposedProperties(PropertyBearing prop)
Sets a PropertyBearing object as a composite of the canvas. |
protected void |
setFired(boolean virgin)
Sets the fired flag. |
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit |
| 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 java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String DATACLEANSE
public static final String MODELFITTER
public static final String KEY_AIPLOGO
public static final String KEY_HELPSIZE
public static final String KEY_ABOUTURL
public static final String KEY_EASTALIGNMENT
public static final String KEY_WESTALIGNMENT
public static final String KEY_NORTHALIGNMENT
public static final String KEY_SOUTHALIGNMENT
public static final String KEY_LESSERSTRUT
public static final String KEY_BIGGERSTRUT
public static final String KEY_DATAANALYSER
public static final String KEY_FITTERS
public static final String KEY_FITTERTIPS
public static final String KEY_ACTIONCLASS
public static final String KEY_NOLOGO
private static final String DEFAIPLOGO
private static final String DEFURLRESOURCES
private static final String DEFRESOURCEBUNDLES
private static final Dimension DEFHELPSIZE
private static final int DEFEASTALIGNMENT
private static final int DEFWESTALIGNMENT
private static final int DEFNORTHALIGNMENT
private static final int DEFSOUTHALIGNMENT
private static final int DEFLESSERSTRUT
private static final int DEFBIGGERSTRUT
private static final String DEFABOUTURL
private static final String DEFACTIONCLASS
private JStatusField status
private List<DataAnalysing> dataanalysers
private Map<String,ModelFitting> fittings
private String fitlabel
private boolean fired
private PropertyBearing info
PropertyContainer.
private Action about
| Constructor Detail |
|---|
public JBorderFrame(Map<String,String> prop)
public JBorderFrame(PropertyBearing prop)
| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
PropertyBearing object as a composite of the canvas.
Defaults the necessary parameter.
setComposedProperties in interface PropertyAwarepublic PropertyBearing getComposedProperties()
PropertyBearings this frame refers to.
getComposedProperties in interface PropertyComposedpublic void init()
#getMenus method that in the basic version delivers a
'File' menu that allows connecting/disconnecting/save/print/exit.
If additional help is needed, the #getHelpActions method must be
overridn which delivers an empty list in the basic version. Right to the
main area, where the #deliverComponent return is placed,
the AIP-logo is displayed. Underneath the buttons are placed delivered
by the #getRightActions method, which in the basic version
returns an empty list.
init in interface Initializablepublic int getLesserStrut()
public int getBiggerStrut()
public Component getRepresentation()
getRepresentation in interface Displayablepublic Icon getIcon()
getIcon in interface Displayableprivate Box getBoxAt(Object constraint)
constrain - BorderLayout.NORTH, EAST, SOUTH, WEST.
private static Container createBox(int axis,
int align,
int afill,
List<?> all,
Class<?> action)
axis - The orientation of the boxxalign - Common x-alignment for all components added.yalign - Common y-alignment for all components added.list - The non-null list of components or actions to add.protected JStatusField getStatusField()
protected Action getAboutAction()
protected void analyserListenTo(JComponent c)
public JComboBox getFitterComboBox()
#MODELLFITTER property change is fired.
public ButtonGroup getFitterButtonGroup()
#MODELLFITTER property change is fired.
protected List<Object> getRightItems()
public ModelFitting getActiveFit()
protected List<Object> getTopItems()
protected List<Object> getLeftItems()
protected JStatusField createStatus()
protected boolean createDataAnalysers()
KEY_DATAANALYSER property and using each entry as a
resource for
a DataAnlysing class. Normally, this method is called once at
the beginning of the initialization process (as the first item in
the init() method). This implies that the analysers are ready
when getRepresentation() is called.
As soon as it is called, all created
analysers should be retrieved with getDataAnalysers().
protected boolean createFitters()
#KEY_ANALYSER property and using each value entry as a
resource for
a Anlyser class. Normally, this method is called once at
the beginning of the initialization process (as the first item in
the init() method). This implies that the analysers are ready
when getRepresentation() is called.
As soon as it is called, all created
analysers should be retrieved with #getAnalysers.
protected boolean hasFired()
protected void setFired(boolean virgin)
public List<DataAnalysing> getDataAnalysers()
#createAnalysers, which in due curse happens
right after the entry to the init(), before the
getRepresentation() call.
public Map<String,ModelFitting> getModelFittings()
protected List<Object> getBottomItems()
#getAnalysers
returns
In this version it only consits of a status field,
which is also intialized here.
public static JLabel createLocalizedLabel(PropertyBearing info,
String textkey,
Icon icon,
String tipkey)
public static JLabel createLabel(String text,
Icon icon,
String tooltip)
public static JButton createLocalizedButton(PropertyBearing info,
String textkey,
Icon icon,
String command,
String tipkey)
public static JButton createButton(String text,
Icon icon,
String command,
String tooltip)
public static JCheckBox createLocalizedCheckBox(PropertyBearing info,
String textkey,
Icon icon,
String command,
String tipkey)
public static JCheckBox createCheckBox(String text,
Icon icon,
String command,
String tooltip)
public Action createLocalizedHelp(PropertyBearing info,
String labelkey,
String acckey,
String url,
Icon icon)
public static Action createHelp(PropertyBearing i,
String label,
String acc,
String url,
Icon icon)
protected static void printAlignment(Component c,
String name)
protected static void setAlignment(JComponent c,
float x,
float y)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||