fdda.dialog.swing
Class MainFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--fdda.dialog.swing.MainFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, SelectionModifier, Serializable, WindowConstants

public class MainFrame
extends JFrame
implements SelectionModifier

This is the main window of fdda. It controls functions, presents menu bar, button bar and property editor.

Author:
Jörg Rüdenauer
See Also:
Serialized Form

Nested Class Summary
(package private)  class MainFrame.MaximizeListener
          Workaround for Java lack: no resize-Event is fired if a frame is maximized.
(package private)  class MainFrame.SystemFrameListener
          Internal listener for changes of the windows.
 
Field Summary
static int LAST_PROJECT
          action at start: load the last used project
static int NEW_PROJECT
          action at start: open a new project
static int NOTHING
          action at start: do nothing
 
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.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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
MainFrame()
          The constructor.
 
Method Summary
 void cascade()
          cascades the windows
 void chooseAlgorithm()
          Shows the algorithm selection dialog.
 void closeProject()
          Closes the current project
 void deleteSelection()
          Deletes the selected component(s).
 void help(int page)
          Shows help pages.
 void newProject()
          Creates a new project
 void openProject(String location)
          Opens a project
 void pauseDemonstration()
          Pauses or continues the demonstration.
 void performStartAction()
          Performs the first action after starting the application.
 void quit()
          Quits the application.
 void refreshMDI()
          Repaints all windows
 void saveJPEG()
          Saves current modelling window to a jpeg file
 void saveProject(boolean newName)
          Saves the current project.
 void selectAll()
          Selects all movable components
 void showGrid(boolean visible)
          Sets the visibility of the grid.
 void showInfo()
          Shows the about dialog
 void showObjectInspector(boolean visible)
          Shows or hides the property editor
 void showOptionsDialog()
          Shows the options dialog
 void showStatistics()
          Shows the statistics dialog.
 void startDemonstration()
          Starts the demonstration.
 void stopDemonstration()
          Stops the demonstration.
 void tile()
          tiles the windows
 void tryToolSwitch()
          Tries to revert to the default tool.
 void useTool(int tool, boolean sticky)
          Selects a modelling tool
 void zoomIn()
          Zooms in.
 void zoomOut()
          Zooms out
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

NOTHING

public static final int NOTHING
action at start: do nothing

See Also:
Constant Field Values

LAST_PROJECT

public static final int LAST_PROJECT
action at start: load the last used project

See Also:
Constant Field Values

NEW_PROJECT

public static final int NEW_PROJECT
action at start: open a new project

See Also:
Constant Field Values
Constructor Detail

MainFrame

public MainFrame()
The constructor.

Method Detail

performStartAction

public void performStartAction()
Performs the first action after starting the application.


refreshMDI

public void refreshMDI()
Repaints all windows


newProject

public void newProject()
Creates a new project


openProject

public void openProject(String location)
Opens a project

Parameters:
location - the location of the project

saveProject

public void saveProject(boolean newName)
Saves the current project.

Parameters:
newName - whether 'save as' is requested

closeProject

public void closeProject()
Closes the current project


quit

public void quit()
Quits the application. Shows warning messages, saves attributes.


zoomIn

public void zoomIn()
Zooms in.


zoomOut

public void zoomOut()
Zooms out


selectAll

public void selectAll()
Selects all movable components


showObjectInspector

public void showObjectInspector(boolean visible)
Shows or hides the property editor

Parameters:
visible - whether it shall be shown

useTool

public void useTool(int tool,
                    boolean sticky)
Selects a modelling tool

Parameters:
tool - the tool
sticky - whether the selection shall be 'sticky'

tryToolSwitch

public void tryToolSwitch()
Tries to revert to the default tool. This doesn't work if the current selection of another tool is 'sticky'.


deleteSelection

public void deleteSelection()
Deletes the selected component(s).


chooseAlgorithm

public void chooseAlgorithm()
Shows the algorithm selection dialog.


startDemonstration

public void startDemonstration()
Starts the demonstration.


stopDemonstration

public void stopDemonstration()
Stops the demonstration.


pauseDemonstration

public void pauseDemonstration()
Pauses or continues the demonstration.


showStatistics

public void showStatistics()
Shows the statistics dialog.


showGrid

public void showGrid(boolean visible)
Sets the visibility of the grid.

Parameters:
visible - whether the grid shall be visible

showOptionsDialog

public void showOptionsDialog()
Shows the options dialog


showInfo

public void showInfo()
Shows the about dialog


tile

public void tile()
tiles the windows


cascade

public void cascade()
cascades the windows


help

public void help(int page)
Shows help pages.

Parameters:
page - code for the page to be shown

saveJPEG

public void saveJPEG()
Saves current modelling window to a jpeg file



API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.