jmathlib.ui.swing
Class SwingGUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by jmathlib.ui.swing.SwingGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class SwingGUI
extends javax.swing.JFrame

Stand-alone GUI for the JMathLib package. Some options may be given in the command line, by example: localhost# java MathLib.UI.Swing.SwingGUI -width 320 -height 200.

Command line options

-heightThe height of the main window
-widthThe width of the main window

Version:
2.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  Console answer
           
(package private)  java.lang.String appTitle
           
(package private) static java.lang.String DEAFULT_PROPERTIES
           
(package private)  java.util.ArrayList editorFiles
           
(package private)  javax.swing.JTabbedPane editors
           
(package private)  javax.swing.JFileChooser jFileChooser1
           
(package private)  javax.swing.JMenu jMenu1
           
(package private)  javax.swing.JMenu jMenu2
           
(package private)  javax.swing.JMenu jMenu3
           
(package private)  javax.swing.JMenu jMenu4
           
(package private)  javax.swing.JMenu jMenu5
           
(package private)  javax.swing.JMenuBar jMenuBar1
           
(package private)  javax.swing.JMenuItem jMenuItem1
           
(package private)  javax.swing.JMenuItem jMenuItem10
           
(package private)  javax.swing.JMenuItem jMenuItem11
           
(package private)  javax.swing.JMenuItem jMenuItem12
           
(package private)  javax.swing.JMenuItem jMenuItem13
           
(package private)  javax.swing.JMenuItem jMenuItem14
           
(package private)  javax.swing.JMenuItem jMenuItem15
           
(package private)  javax.swing.JMenuItem jMenuItem16
           
(package private)  javax.swing.JMenuItem jMenuItem2
           
(package private)  javax.swing.JMenuItem jMenuItem3
           
(package private)  javax.swing.JMenuItem jMenuItem4
           
(package private)  javax.swing.JMenuItem jMenuItem5
           
(package private)  javax.swing.JMenuItem jMenuItem6
           
(package private)  javax.swing.JMenuItem jMenuItem7
           
(package private)  javax.swing.JMenuItem jMenuItem8
           
(package private)  javax.swing.JMenuItem jMenuItem9
           
(package private)  javax.swing.JScrollPane jScrollPane1
           
static SwingGUI runningReference
           
(package private)  javax.swing.JSplitPane splitter2
           
(package private)  javax.swing.JLabel statusBar
           
 
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 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
SwingGUI(java.lang.String[] args)
           
 
Method Summary
private  void argumentHandler(java.lang.String[] args)
          Command-line parameter handler Takes control of the size of the main window (by now)
private  void close()
           
 void closeEditor(java.io.File file)
           
 void editFile(java.io.File file)
           
private static java.lang.String getJavaRuntimeVersion()
           
private  void jbInit()
           
(package private)  void jMenuItem1_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem10_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem11_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem12_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem13_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem14_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem15_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem16_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem2_actionPerformed(java.awt.event.ActionEvent e)
          Called on FILE/NEW
(package private)  void jMenuItem3_actionPerformed(java.awt.event.ActionEvent e)
          Called on FILE/OPEN
(package private)  void jMenuItem4_actionPerformed(java.awt.event.ActionEvent e)
          Called on FILE/SAVE
(package private)  void jMenuItem5_actionPerformed(java.awt.event.ActionEvent e)
          Called on FILE/SAVE AS..
(package private)  void jMenuItem6_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem7_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem8_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuItem9_actionPerformed(java.awt.event.ActionEvent e)
           
(package private) static void loadProperties()
           
(package private)  void loadWorkspace(java.io.File f)
          Load the specified workspace file.
static void main(java.lang.String[] args)
           
 void openFileInEditor(java.io.File file)
           
(package private)  void saveWorkspace(java.io.File f)
           
(package private)  void this_windowClosing(java.awt.event.WindowEvent e)
           
 
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, setIconImage, 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, 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, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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

appTitle

final java.lang.String appTitle
See Also:
Constant Field Values

DEAFULT_PROPERTIES

static final java.lang.String DEAFULT_PROPERTIES
See Also:
Constant Field Values

runningReference

public static SwingGUI runningReference

answer

Console answer

statusBar

javax.swing.JLabel statusBar

jMenuBar1

javax.swing.JMenuBar jMenuBar1

jMenu1

javax.swing.JMenu jMenu1

jMenu2

javax.swing.JMenu jMenu2

jMenu3

javax.swing.JMenu jMenu3

jMenu4

javax.swing.JMenu jMenu4

jMenu5

javax.swing.JMenu jMenu5

jMenuItem2

javax.swing.JMenuItem jMenuItem2

jMenuItem3

javax.swing.JMenuItem jMenuItem3

jMenuItem4

javax.swing.JMenuItem jMenuItem4

jMenuItem5

javax.swing.JMenuItem jMenuItem5

jMenuItem14

javax.swing.JMenuItem jMenuItem14

jMenuItem1

javax.swing.JMenuItem jMenuItem1

jMenuItem10

javax.swing.JMenuItem jMenuItem10

jMenuItem11

javax.swing.JMenuItem jMenuItem11

jMenuItem12

javax.swing.JMenuItem jMenuItem12

jMenuItem13

javax.swing.JMenuItem jMenuItem13

jMenuItem15

javax.swing.JMenuItem jMenuItem15

jMenuItem16

javax.swing.JMenuItem jMenuItem16

jMenuItem9

javax.swing.JMenuItem jMenuItem9

jMenuItem8

javax.swing.JMenuItem jMenuItem8

jMenuItem7

javax.swing.JMenuItem jMenuItem7

jMenuItem6

javax.swing.JMenuItem jMenuItem6

jScrollPane1

javax.swing.JScrollPane jScrollPane1

splitter2

javax.swing.JSplitPane splitter2

editors

javax.swing.JTabbedPane editors

editorFiles

java.util.ArrayList editorFiles

jFileChooser1

javax.swing.JFileChooser jFileChooser1
Constructor Detail

SwingGUI

public SwingGUI(java.lang.String[] args)
Parameters:
args -
Method Detail

argumentHandler

private void argumentHandler(java.lang.String[] args)
Command-line parameter handler Takes control of the size of the main window (by now)


close

private void close()

getJavaRuntimeVersion

private static java.lang.String getJavaRuntimeVersion()
Returns:

jbInit

private void jbInit()
             throws java.lang.Exception
Throws:
java.lang.Exception

editFile

public void editFile(java.io.File file)
              throws java.lang.Exception
Parameters:
file -
Throws:
java.lang.Exception

closeEditor

public void closeEditor(java.io.File file)
Parameters:
file -

openFileInEditor

public void openFileInEditor(java.io.File file)
Parameters:
file -

jMenuItem1_actionPerformed

void jMenuItem1_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem2_actionPerformed

void jMenuItem2_actionPerformed(java.awt.event.ActionEvent e)
Called on FILE/NEW

Parameters:
e - The action event

jMenuItem3_actionPerformed

void jMenuItem3_actionPerformed(java.awt.event.ActionEvent e)
Called on FILE/OPEN

Parameters:
e - The action event

jMenuItem4_actionPerformed

void jMenuItem4_actionPerformed(java.awt.event.ActionEvent e)
Called on FILE/SAVE

Parameters:
e - The action event

jMenuItem5_actionPerformed

void jMenuItem5_actionPerformed(java.awt.event.ActionEvent e)
Called on FILE/SAVE AS..

Parameters:
e - The action event

jMenuItem6_actionPerformed

void jMenuItem6_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem7_actionPerformed

void jMenuItem7_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem8_actionPerformed

void jMenuItem8_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem9_actionPerformed

void jMenuItem9_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem10_actionPerformed

void jMenuItem10_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem11_actionPerformed

void jMenuItem11_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem12_actionPerformed

void jMenuItem12_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem13_actionPerformed

void jMenuItem13_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem14_actionPerformed

void jMenuItem14_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem15_actionPerformed

void jMenuItem15_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

jMenuItem16_actionPerformed

void jMenuItem16_actionPerformed(java.awt.event.ActionEvent e)
Parameters:
e -

loadProperties

static void loadProperties()

loadWorkspace

void loadWorkspace(java.io.File f)
Load the specified workspace file. All the main window text and the command history is overwritten. See release notes - General notes - GN0009

Parameters:
f - File to load

main

public static void main(java.lang.String[] args)
Parameters:
args -

saveWorkspace

void saveWorkspace(java.io.File f)
Parameters:
f -

this_windowClosing

void this_windowClosing(java.awt.event.WindowEvent e)
Parameters:
e -

FOOTER

BOTTOM