|
||||||||||
| 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.JOpenFrame
public abstract class JOpenFrame
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 |
JOpenFrame.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 static String |
DEFFILEACTIONS
The action commands used for identfiying file menu actions. |
static String |
EMPTYACTION
Identifier for empty action. |
static String |
EXITACTION
Identifier for exit action. |
static String |
EXPORTACTION
Identifier for print action. |
static String |
KEY_FILEACTIONS
The file menu items action commands. |
static String |
KEY_FILEHOME
The directory were we look for open/save files or rundir. |
private File |
lastfile
We remeber file choses to restart in the same directory. |
static String |
OPENACTION
Identifier for open action. |
static String |
PRINTACTION
Identifier for print action. |
static String |
SAVEACTION
Identifier for save action. |
| 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 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 | |
|---|---|
JOpenFrame(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
JOpenFrame(PropertyBearing prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent ae)
Trace actions delivered to this component. |
static JCheckBoxMenuItem |
createCheckBoxMenuItem(String text,
Icon icon,
String acc,
String command)
Creates a new CeckBoxMenuItem with the given text and icon and sets an accelerator and a action command to it, if given. |
JCheckBoxMenuItem |
createLocalizedCheckBoxMenuItem(PropertyBearing info,
String textkey,
Icon icon,
String acckey,
String command)
Creates a new localized JCeckBoxMenuItem from a pointer to the localized name and accelerator and an action command. |
private static JMenuItem |
createMenuItem(String display,
String keyacc,
String message)
Creates a new jmenuitem, set the action command and display text and adds an accelerator. |
private List<JMenuItem> |
createMenuItemList(List<String> names,
List<String> acc,
List<String> action)
Takes a list of menu item names, accelerators and action commands and creates a list of jmenuitems out of it. |
protected void |
exportCenter()
Exports the central component. |
protected Component |
getExportRepresentation()
For saving, we return the central component. |
protected List<Action> |
getHelpActions()
Returns the list of actions where the help menu items should be created from. |
protected List<JMenu> |
getMenus()
Returns the list of menus that should be added to the menu bar. |
protected FileFilter |
getOpenFilter()
If the file chooser shown on open should use a file-filter, override this method. |
protected Component |
getPrintRepresentation()
For saving, we return the central component. |
protected FileFilter |
getSaveFilter()
If the file chooser shown on save should use a file-filter, override this method. |
protected Component |
getSaveRepresentation()
For saving, we return the central component. |
void |
init()
Initializes the frame. |
protected abstract boolean |
openFile(File openit)
This is tha abstract method called if the user selected a file for opening from the open menu. |
protected JMenu |
populateMenu(JMenu target,
String namelist,
String acclist,
String actionlist)
Adds new menu items to a given menu. |
protected void |
printCenter()
Prints the central component. |
protected boolean |
saveFile(File saveas)
Different to openFile(java.io.File) we have a default implementation, where
we save to central component in the file. |
void |
setComposedProperties(PropertyBearing prop)
Sets a PropertyBearing object as a composite of the canvas. |
| 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 util.PropertyComposed |
|---|
getComposedProperties |
| Methods inherited from interface jview.Displayable |
|---|
getIcon, getRepresentation |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String EMPTYACTION
public static final String OPENACTION
public static final String SAVEACTION
public static final String EXITACTION
public static final String PRINTACTION
public static final String EXPORTACTION
public static final String KEY_FILEACTIONS
public static final String KEY_FILEHOME
private static final String DEFFILEACTIONS
private File lastfile
| Constructor Detail |
|---|
public JOpenFrame(Map<String,String> prop)
public JOpenFrame(PropertyBearing prop)
| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
PropertyBearing object as a composite of the canvas.
Defaults the necessary parameter.
setComposedProperties in interface PropertyAwaresetComposedProperties in class JBorderFramepublic 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 Initializableinit in class JBorderFramepublic void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListenerprotected List<JMenu> getMenus()
protected JMenu populateMenu(JMenu target,
String namelist,
String acclist,
String actionlist)
Empty entries are replaced with separators in the drop-down list.
If the given menu is null, a new menu is instanitatied.
protected List<Action> getHelpActions()
protected FileFilter getOpenFilter()
protected FileFilter getSaveFilter()
protected abstract boolean openFile(File openit)
protected boolean saveFile(File saveas)
openFile(java.io.File) we have a default implementation, where
we save to central component in the file.
protected Component getSaveRepresentation()
protected Component getPrintRepresentation()
protected Component getExportRepresentation()
protected void printCenter()
protected void exportCenter()
private List<JMenuItem> createMenuItemList(List<String> names,
List<String> acc,
List<String> action)
private static JMenuItem createMenuItem(String display,
String keyacc,
String message)
public JCheckBoxMenuItem createLocalizedCheckBoxMenuItem(PropertyBearing info,
String textkey,
Icon icon,
String acckey,
String command)
public static JCheckBoxMenuItem createCheckBoxMenuItem(String text,
Icon icon,
String acc,
String command)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||