|
|||||||||
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
tnt.gui.TnTFrame
public abstract class TnTFrame
This class instantiates the graphical component of the UI, but defines very little of its associated business logic.
Nested Class Summary | |
---|---|
(package private) class |
TnTFrame.InfoPanel
|
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 | |
---|---|
protected javax.swing.JMenuItem |
aboutMenuItem
|
protected javax.swing.JRadioButtonMenuItem |
blackLineMenuItem
|
protected javax.swing.JRadioButtonMenuItem |
blueLineMenuItem
|
protected javax.swing.JMenuItem |
calculateMenuItem
|
protected ScrollablePaintPanel |
canvas
|
protected javax.swing.JScrollPane |
canvasScrollPane
|
protected javax.swing.JRadioButtonMenuItem |
customLineMenuItem
|
protected javax.swing.JLabel |
cxValueLabel
Displays the selected key's center x-coordinate. |
protected javax.swing.JLabel |
cyValueLabel
Displays the selected key's center y-coordinate. |
protected KeyButtonListModel |
dataModel
The model storing the outline keys. |
protected javax.swing.JButton |
deleteKeyButton
The "Delete" button in the InfoPanel . |
protected javax.swing.JLabel |
dimension
|
protected javax.swing.JButton |
editKeyButton
The "Edit" button in the InfoPanel . |
protected javax.swing.JMenuItem |
exitMenuItem
|
protected javax.swing.JMenuItem |
exportMenuItem
|
protected javax.swing.JRadioButtonMenuItem |
greenLineMenuItem
|
protected javax.swing.JLabel |
hValueLabel
Displays the width of the selected key's outline. |
protected javax.swing.JRadioButtonMenuItem |
magentaLineMenuItem
|
protected javax.swing.JLabel |
mouseLocation
|
protected javax.swing.JMenuItem |
newMenuItem
|
protected javax.swing.JMenuItem |
openMenuItem
|
protected javax.swing.JMenuItem |
parametersMenuItem
|
protected javax.swing.JLabel |
pointLocation
|
protected javax.swing.JRadioButtonMenuItem |
redLineMenuItem
|
protected javax.swing.JMenuItem |
redoMenuItem
|
protected javax.swing.JMenuItem |
saveAsMenuItem
|
protected javax.swing.JMenuItem |
saveMenuItem
|
protected javax.swing.JList |
shapesList
The list displaying the object stored in dataModel . |
protected int |
SPACE
The amount of space between some components |
protected int |
STATUS_LABEL_WIDTH
The width of certain labels on the status panel |
protected javax.swing.JLabel |
statusHelp
|
protected javax.swing.JLabel |
twValueLabel
Displays the selected key's target width. |
protected javax.swing.JMenuItem |
undoMenuItem
|
protected javax.swing.JMenuItem |
userManualMenuItem
|
protected int |
VIEWPORT_DIMENSIONS
The size of the square viewport |
protected javax.swing.JLabel |
wValueLabel
Displays the width of the selected key's outline. |
protected javax.swing.JLabel |
xValueLabel
Displays the x-coordinate of the selected key's outline. |
protected javax.swing.JRadioButtonMenuItem |
yellowLineMenuItem
|
protected javax.swing.JLabel |
yValueLabel
Displays the y-coordinate of the selected key's outline. |
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 | |
---|---|
TnTFrame()
|
Method Summary | |
---|---|
protected abstract void |
aboutAction()
Defines action(s) to take upon selection of the "About" menu item. |
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
protected abstract void |
calculateAction()
Defines action(s) to take upon selection of the "Calculate" menu item. |
protected javax.swing.JScrollPane |
createCanvasScrollPane()
Instantiates and returns the canvas (an instance of ScrollablePaintPanel ). |
protected javax.swing.JMenu |
createColorMenu()
Instantiates and returns the Color menu. |
protected javax.swing.JMenu |
createEditMenu()
Instantiates and returns the Edit menu. |
protected javax.swing.JMenu |
createFileMenu()
Instantiates and returns the File menu. |
protected javax.swing.JMenu |
createHelpMenu()
Instantiates and returns the Help menu. |
protected javax.swing.JPanel |
createInfoPanel()
Instantiates components of the InfoPanel before returning
an instance of InfoPanel . |
protected javax.swing.JMenu |
createMetricsMenu()
Instantiates and returns the Metrics menu. |
protected javax.swing.JPanel |
createStatusPanel()
Instantiates and returns the status panel. |
protected abstract void |
deleteKeyAction()
Defines action(s) to take upon pressing the delete button. |
protected abstract void |
editKeyAction()
Defines action(s) to take upon pressing the edit button. |
protected abstract void |
exitAction()
Defines action(s) to take upon selection of the "Exit" menu item. |
protected abstract void |
exportAction()
Defines action(s) to take upon selection of the "Export..." menu item. |
protected abstract boolean |
newAction()
Defines action(s) to take upon selection of the "New" menu item. |
protected abstract boolean |
openAction()
Defines action(s) to take upon selection of the "Open" menu item. |
protected abstract void |
parameterAction()
Defines action(s) to take upon selection of the "Parameters" menu item. |
protected abstract void |
redoAction()
Defines action(s) to take upon selection of the "Redo" menu item. |
protected abstract boolean |
saveAction()
Defines action(s) to take upon selection of the "Save" menu item. |
protected abstract boolean |
saveAsAction()
Defines action(s) to take upon selection of the "Save As" menu item. |
protected abstract void |
setColorAction(java.awt.Color c)
Defines action(s) to take upon of a predefined line color. |
protected abstract void |
setCustomColorAction()
Defines action(s) to take upon of a custom line color. |
protected abstract void |
undoAction()
Defines action(s) to take upon selection of the "Undo" menu item. |
protected abstract void |
userManualAction()
Defines action(s) to take upon selection of the "User Manual" menu item. |
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 |
---|
protected final int SPACE
protected final int STATUS_LABEL_WIDTH
protected final int VIEWPORT_DIMENSIONS
protected javax.swing.JLabel statusHelp
protected javax.swing.JLabel mouseLocation
protected javax.swing.JLabel pointLocation
protected javax.swing.JLabel dimension
protected javax.swing.JMenuItem newMenuItem
protected javax.swing.JMenuItem openMenuItem
protected javax.swing.JMenuItem saveMenuItem
protected javax.swing.JMenuItem saveAsMenuItem
protected javax.swing.JMenuItem exportMenuItem
protected javax.swing.JMenuItem exitMenuItem
protected javax.swing.JMenuItem undoMenuItem
protected javax.swing.JMenuItem redoMenuItem
protected javax.swing.JMenuItem parametersMenuItem
protected javax.swing.JMenuItem calculateMenuItem
protected javax.swing.JMenuItem userManualMenuItem
protected javax.swing.JMenuItem aboutMenuItem
protected javax.swing.JRadioButtonMenuItem blackLineMenuItem
protected javax.swing.JRadioButtonMenuItem blueLineMenuItem
protected javax.swing.JRadioButtonMenuItem greenLineMenuItem
protected javax.swing.JRadioButtonMenuItem magentaLineMenuItem
protected javax.swing.JRadioButtonMenuItem redLineMenuItem
protected javax.swing.JRadioButtonMenuItem yellowLineMenuItem
protected javax.swing.JRadioButtonMenuItem customLineMenuItem
protected ScrollablePaintPanel canvas
protected javax.swing.JScrollPane canvasScrollPane
protected KeyButtonListModel dataModel
InfoPanel
object.
protected javax.swing.JList shapesList
dataModel
.
This object must be initialized before instantiating an
InfoPanel
object.
protected javax.swing.JLabel cxValueLabel
InfoPanel
object.
protected javax.swing.JLabel cyValueLabel
InfoPanel
object.
protected javax.swing.JLabel twValueLabel
InfoPanel
object.
protected javax.swing.JLabel xValueLabel
InfoPanel
object.
protected javax.swing.JLabel yValueLabel
InfoPanel
object.
protected javax.swing.JLabel wValueLabel
InfoPanel
object.
protected javax.swing.JLabel hValueLabel
InfoPanel
object.
protected javax.swing.JButton editKeyButton
InfoPanel
.
This object must be initialized before instantiating an
InfoPanel
object.
protected javax.swing.JButton deleteKeyButton
InfoPanel
.
This object must be initialized before instantiating an
InfoPanel
object.
Constructor Detail |
---|
public TnTFrame()
Method Detail |
---|
protected javax.swing.JMenu createFileMenu()
protected javax.swing.JMenu createEditMenu()
protected javax.swing.JMenu createColorMenu()
protected javax.swing.JMenu createMetricsMenu()
protected javax.swing.JMenu createHelpMenu()
protected javax.swing.JPanel createStatusPanel()
protected javax.swing.JPanel createInfoPanel()
InfoPanel
before returning
an instance of InfoPanel
. The specific components that
must be instantiated prior to calling the InfoPanel
constructor are described as such in the API.deleteKeyAction()
method.
protected javax.swing.JScrollPane createCanvasScrollPane()
ScrollablePaintPanel
).
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
protected abstract boolean newAction()
true
if successful, false
otherwise.protected abstract boolean openAction()
true
if successful, false
otherwise.protected abstract boolean saveAction()
true
if successful, false
otherwise.protected abstract boolean saveAsAction()
true
if successful, false
otherwise.protected abstract void exportAction()
protected abstract void exitAction()
protected abstract void undoAction()
protected abstract void redoAction()
protected abstract void setColorAction(java.awt.Color c)
protected abstract void setCustomColorAction()
protected abstract void parameterAction()
protected abstract void calculateAction()
protected abstract void userManualAction()
protected abstract void aboutAction()
protected abstract void editKeyAction()
protected abstract void deleteKeyAction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |