|
||||||||
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
dirk_krause.jtools.ApplicationFrame
MainWindow
public class MainWindow
The main window.
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String[] |
actionCmd
Keyword to set up buttons and menu items |
protected javax.swing.JButton |
bDir
Button to change directory. |
protected javax.swing.JButton |
bExit
Button to exit the application. |
protected javax.swing.JButton |
bOpt
Button to change options to tracecc. |
protected javax.swing.JButton |
bRun
Button to run the tracecc command. |
protected MainWindow.DropHandler |
dh
DropHandler instance. |
protected dirk_krause.jtools.GuiDialog |
guid
Dialog to set up GUI. |
static java.lang.String |
helpFileName
File name for online help. |
protected dirk_krause.jtools.HelpWindow |
hw
Window to show version information and help. |
static java.lang.String[] |
iconFileNames
File names for icons in the button bar. |
protected boolean |
isRunning
Flag to indicate whether or not a background thread is running |
protected javax.swing.JLabel |
lDir
Label to show the current working directory. |
static java.lang.String |
licenseTerms
License terms. |
protected javax.swing.JLabel |
lSta
Label to show the program status. |
protected dirk_krause.jtools.LogWindow |
lw
Window to show log text (command output). |
protected javax.swing.JMenuItem |
miDir
Menu item to choose directory. |
protected javax.swing.JMenuItem |
miExit
Menu item to exit the application. |
protected javax.swing.JMenuItem |
miGui
Menu item to set up GUI. |
protected javax.swing.JMenuItem |
miHlp
Menu item to show help text. |
protected javax.swing.JMenuItem |
miLic
Menu item to show version and license information. |
protected javax.swing.JMenuItem |
miOpt
Menu item to set options. |
protected javax.swing.JMenuItem |
miPck
Menu item to pack window. |
protected javax.swing.JMenuItem |
miRun
Menu item to run the tracecc command. |
protected javax.swing.JMenuItem |
miWeb
Menu item to launch web browser. |
protected java.awt.Color |
myG
Color to show the program status in green while the application is idle. |
protected java.awt.Color |
myR
Color to show the program status in red while the application is busy. |
protected dirk_krause.jtools.SizeTracker |
stDir
Size tracker for directory label. |
protected TraceccController |
tc
Controller keeping options for tracecc. |
static java.lang.String[] |
theTexts
Keywords to set up GUI elements |
protected TraceccOptionsDialog |
tod
Dialog to set up options to tracecc. |
static java.lang.String[] |
toolTipTexts
Texts for tooltips. |
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 | |
---|---|
MainWindow(dirk_krause.jtools.GuiController c,
TraceccController t)
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Reaction on mouseclicks |
protected void |
chooseDirectory()
Choose a new directory for tracecc. |
void |
cleanup(boolean isLast)
Cleanup procedure. |
protected javax.swing.JPanel |
createInnerPanel()
Create the inner panel (real window panel). |
protected javax.swing.ImageIcon |
findImageForName(java.lang.String n)
Search for an icon image. |
protected dirk_krause.jtools.GuiDialog |
getGuid()
Get the GUI options dialog. |
protected dirk_krause.jtools.HelpWindow |
getHelpWindow()
Get the help window. |
protected dirk_krause.jtools.LogWindow |
getLogWindow()
Get the log window. |
protected boolean |
getRunning()
Check whether or not a background task is running. |
protected TraceccController |
getTc()
Get the tracecc controller. |
protected TraceccOptionsDialog |
getTod()
Get the dialog to set tracecc options. |
protected boolean |
haveGuid()
Check whether or not there already is a GUI options dialog. |
protected boolean |
haveHelpWindow()
Check whether or not there already is a help window. |
protected boolean |
haveLogWindow()
Check whether or not we already have a log window. |
protected boolean |
haveTod()
Check whether or not there already is a tracecc options dialog. |
protected dirk_krause.jtools.GuiDialog |
internalGetGuid()
Synchronized request for GUI dialog. |
protected dirk_krause.jtools.HelpWindow |
internalGetHelpWindow()
Get the help window. |
protected dirk_krause.jtools.LogWindow |
internalGetLogWindow()
Get the log window. |
protected TraceccOptionsDialog |
internalGetTod()
Get the dialog to set tracecc options. |
protected void |
internalSetGuid(dirk_krause.jtools.GuiDialog d)
Synchronized set GUI dialog. |
protected void |
internalSetHelpWindow(dirk_krause.jtools.HelpWindow h)
Set the help window. |
protected void |
internalSetLogWindow(dirk_krause.jtools.LogWindow l)
Set the log window. |
protected void |
internalSetTod(TraceccOptionsDialog d)
Save the tracecc options dialog. |
void |
positionLogWindow()
Choose a non-modal position for the log window. |
protected void |
resetGuid()
Mark the current GUI options dialog as not longer being used. |
protected void |
resetHelpWindow()
Mark the help window as not longer being used. |
protected void |
resetLogWindow()
Mark the log window as not longer being used. |
protected void |
resetTod()
Mark existing tracecc options dialog as not longer being used. |
void |
retrieveDefaults()
Retrieve default settings. |
void |
runProgram()
Run tracecc. |
void |
saveDefaults()
Save default settings. |
protected void |
setRunning(boolean b)
Set the flag to indicate whether or not a background task is running. |
protected void |
setStatus(int t,
java.awt.Color c,
boolean fromAwtThread)
Set a new status. |
protected javax.swing.JToolBar |
setupButtonBar()
Set up the button bar. |
protected void |
setupMenuBar()
Set up the menu bar. |
protected void |
showGuiSetupDialog()
Show the GUI options dialog. |
Methods inherited from class dirk_krause.jtools.ApplicationFrame |
---|
getGuic, restorePosition, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class javax.swing.JFrame |
---|
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 |
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.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
protected dirk_krause.jtools.GuiDialog guid
protected TraceccController tc
protected TraceccOptionsDialog tod
protected dirk_krause.jtools.LogWindow lw
protected dirk_krause.jtools.HelpWindow hw
protected boolean isRunning
protected javax.swing.JMenuItem miDir
protected javax.swing.JMenuItem miOpt
protected javax.swing.JMenuItem miRun
protected javax.swing.JMenuItem miExit
protected javax.swing.JMenuItem miGui
protected javax.swing.JMenuItem miPck
protected javax.swing.JMenuItem miLic
protected javax.swing.JMenuItem miHlp
protected javax.swing.JMenuItem miWeb
protected javax.swing.JButton bDir
protected javax.swing.JButton bOpt
protected javax.swing.JButton bRun
protected javax.swing.JButton bExit
protected javax.swing.JLabel lDir
protected javax.swing.JLabel lSta
protected java.awt.Color myR
protected java.awt.Color myG
protected dirk_krause.jtools.SizeTracker stDir
public static final java.lang.String licenseTerms
public static final java.lang.String[] theTexts
public static final java.lang.String[] actionCmd
public static final java.lang.String[] iconFileNames
public static final java.lang.String[] toolTipTexts
public static final java.lang.String helpFileName
protected MainWindow.DropHandler dh
Constructor Detail |
---|
public MainWindow(dirk_krause.jtools.GuiController c, TraceccController t)
c
- A GuiController providing the border setting.t
- A controller for tracecc options.Method Detail |
---|
protected TraceccOptionsDialog internalGetTod()
protected void internalSetTod(TraceccOptionsDialog d)
d
- The dialog to save for re-use.protected TraceccOptionsDialog getTod()
protected void resetTod()
protected boolean haveTod()
protected TraceccController getTc()
protected dirk_krause.jtools.LogWindow internalGetLogWindow()
protected void internalSetLogWindow(dirk_krause.jtools.LogWindow l)
l
- The log window.protected dirk_krause.jtools.LogWindow getLogWindow()
protected void resetLogWindow()
protected boolean haveLogWindow()
protected dirk_krause.jtools.HelpWindow internalGetHelpWindow()
protected void internalSetHelpWindow(dirk_krause.jtools.HelpWindow h)
h
- The help window.protected dirk_krause.jtools.HelpWindow getHelpWindow()
protected void resetHelpWindow()
protected boolean haveHelpWindow()
protected void setStatus(int t, java.awt.Color c, boolean fromAwtThread)
t
- The index of the text in the theTexts array.c
- The color to use.fromAwtThread
- Flag indicating whether or not we are in the
AWT/event thread.protected void setupMenuBar()
protected javax.swing.JToolBar setupButtonBar()
protected javax.swing.JPanel createInnerPanel()
public void cleanup(boolean isLast)
cleanup
in class dirk_krause.jtools.ApplicationFrame
protected boolean haveGuid()
protected dirk_krause.jtools.GuiDialog internalGetGuid()
protected void internalSetGuid(dirk_krause.jtools.GuiDialog d)
d
- The new GUI dialog.protected dirk_krause.jtools.GuiDialog getGuid()
protected void resetGuid()
protected void showGuiSetupDialog()
protected boolean getRunning()
protected void setRunning(boolean b)
b
- The new flag value.protected javax.swing.ImageIcon findImageForName(java.lang.String n)
n
- The file name.
protected void chooseDirectory()
public void retrieveDefaults()
public void saveDefaults()
public void runProgram()
public void positionLogWindow()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |