class ChapGUI
extends javax.swing.JFrame
The GUI was created with, and is maintained by, the Eclipse WindowBuilder. All methods and data are declared static because it only makes sense to have one main GUI per application, and making them static avoids the problem of having to pass a reference to the GUI instance in other classes that need to reference the main GUI.
Copyright (c) 2018
Note that the Eclipse Window Builder has trouble with complex, dynamic GUIs so that
one should first build the GUI, then modify the code by hand to use
the definitions in ASTUtils.ASTStyle. The Window Builder start/stop hiding tags can be used to
surround code that the Window Builder parser has trouble handling.
The start hiding tag is //$hide>>$
while the stop
hiding tag is //$hide<<$
. For example,
//$hide>>$
code to be hidden
//$hide<<$
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Modifier | Constructor and Description |
---|---|
protected |
ChapGUI()
Create the GUI frame.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
clearAllTextAreas()
Clears all of the text areas in the GUI
|
protected static java.lang.String |
getAboutCommand()
Gets the command that represents the About menu item.
|
protected static ChapMenuItems.CalculationType |
getCalcToDo()
Gets the calculation to perform based upon the most recent menu selection.
|
protected static java.lang.String |
getChapMenuCommand()
Gets the command that represents the Coord Sys and Kepler's Eq menu items.
|
protected static javax.swing.JMenu |
getCoordSystemsMenu()
Gets the Coord Systems menu.
|
protected static java.lang.String |
getData1()
Gets the string data associated with the 1st input area
|
protected static java.lang.String |
getData2()
Gets the string data associated with the 2nd input area
|
protected static java.lang.String |
getData3()
Gets the string data associated with the 3rd input area
|
protected static java.lang.String |
getData4()
Gets the string data associated with the 4th input area
|
protected static java.lang.String |
getExitCommand()
Gets the command that represents the Exit menu item.
|
protected static java.lang.String |
getInstructionsCommand()
Gets the command that represents the Instructions menu item.
|
protected static javax.swing.JMenu |
getKeplersEqMenu()
Gets the Kepler's Equation menu.
|
protected static java.awt.event.ActionListener |
getMenuListener()
Gets the listener for the menu items
|
protected static jll.celcalc.ASTUtils.ASTPrt |
getPrtInstance()
Gets the ASTPrt instance for this application's scrollable text pane area.
|
protected static javax.swing.JTextPane |
getTextPane()
Gets the scrollable text pane area for this GUI.
|
protected static void |
printCond(java.lang.String txt)
Routines to handle sending output text to the scrollable
output area.
|
protected static void |
printlnCond()
Routines to handle sending output text to the scrollable
output area.
|
protected static void |
printlnCond(java.lang.String txt)
Routines to handle sending output text to the scrollable
output area.
|
protected static void |
printlnCond(java.lang.String txt,
boolean centerTxt)
Routines to handle sending output text to the scrollable
output area.
|
protected static void |
setCalcToDo(ChapMenuItems.CalculationType calcToDo)
Saves the calculation to perform based upon the just selected menu item
|
protected static void |
setDataLabels(java.lang.String s1)
Sets the data labels in the GUI
|
protected static void |
setDataLabels(java.lang.String s1,
java.lang.String s2)
Sets the data labels in the GUI
|
protected static void |
setDataLabels(java.lang.String s1,
java.lang.String s2,
java.lang.String s3)
Sets the data labels in the GUI
|
protected static void |
setDataLabels(java.lang.String s1,
java.lang.String s2,
java.lang.String s3,
java.lang.String s4)
Sets the data labels in the GUI
|
protected static void |
setResults(java.lang.String result)
Sets the results label in the GUI
|
protected static void |
showAboutBox()
Shows the About Box
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static javax.swing.JMenu getCoordSystemsMenu()
protected static javax.swing.JMenu getKeplersEqMenu()
protected static java.awt.event.ActionListener getMenuListener()
protected static jll.celcalc.ASTUtils.ASTPrt getPrtInstance()
protected static javax.swing.JTextPane getTextPane()
protected static void clearAllTextAreas()
protected static ChapMenuItems.CalculationType getCalcToDo()
protected static java.lang.String getData1()
protected static java.lang.String getData2()
protected static java.lang.String getData3()
protected static java.lang.String getData4()
protected static void setCalcToDo(ChapMenuItems.CalculationType calcToDo)
calcToDo
- which calculation to performprotected static void setDataLabels(java.lang.String s1)
s1
- string for the 1st data label in the GUIprotected static void setDataLabels(java.lang.String s1, java.lang.String s2)
s1
- string for the 1st data label in the GUIs2
- string for the 2nd data label in the GUIprotected static void setDataLabels(java.lang.String s1, java.lang.String s2, java.lang.String s3)
s1
- string for the 1st data label in the GUIs2
- string for the 2nd data label in the GUIs3
- string for the 3rd data label in the GUIprotected static void setDataLabels(java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4)
s1
- string for the 1st data label in the GUIs2
- string for the 2nd data label in the GUIs3
- string for the 3rd data label in the GUIs4
- string for the 4th data label in the GUIprotected static void setResults(java.lang.String result)
result
- string for the results label in the GUIprotected static java.lang.String getChapMenuCommand()
protected static java.lang.String getExitCommand()
protected static java.lang.String getInstructionsCommand()
protected static java.lang.String getAboutCommand()
protected static void printCond(java.lang.String txt)
txt
- string to be printedprotected static void printlnCond()
protected static void printlnCond(java.lang.String txt)
txt
- string to be printedprotected static void printlnCond(java.lang.String txt, boolean centerTxt)
txt
- string to be printedcenterTxt
- true if the text is to be centeredprotected static void showAboutBox()