gui
Class JDFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended bygui.JDFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class JDFrame
extends Frame

This class is the GUI for the JavaDoctor program. It interacts with the user, of course, and JDControl, which does the internal stuff. That would be the conversion etc.

Since:
1.00
Version:
1.02
Author:
Berend "Kirk" Wouda
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  TagPanel attributepanel
          The TagPanel for the attribute tags.
protected  ButtonPanel buttonpanel
          The ButonPanel for the buttons.
protected  TagPanel classpanel
          The TagPanel for the class tags.
protected  JDControl control
          The control class for this GUI.
protected  FolderPanel folderpanel
          The FolderPanel for the folders.
protected  ListPanel listpanel
          The ListPanel for the list.
protected  TagPanel methodpanel
          The TagPanel for the method tags.
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JDFrame()
          Construct a new JDFrame to have the user stare at in awe.
 
Method Summary
 void addAttributeTag(String attributetag)
          Adds an attribute tag to the attributetag list.
 void addAttributeTag(String attributetag, int index)
          Adds an attribute tag to the attributetag list on the passed index.
 void addClassTag(String classtag)
          Adds a class tag to the classtag list.
 void addClassTag(String classtag, int index)
          Adds a class tag to the classtag list on the passed index.
 void addMethodTag(String methodtag)
          Adds a method tag to the methodtag list.
 void addMethodTag(String methodtag, int index)
          Adds a method tag to the methodtag list on the passed index.
 void deselectAllFiles()
          Deselects all the files in the list of files.
 boolean getAddAttributeComment()
          Returns whether the user wants comments to be added to their attributes.
 boolean getAddClassComment()
          Returns whether the user wants comments to be added to their classes.
 boolean getAddMethodComment()
          Returns whether the user wants comments to be added to their methods.
 String[] getAttributeTags()
          Returns the list of tags the user wants to use in the attribute comments.
 String getAttributeWhiteLines()
          Returns the amount of white lines the user wants to be added before an attribute.
 String[] getClassTags()
          Returns the list of tags the user wants to use in the class comments.
 String getClassWhiteLines()
          Returns the amount of white lines the user wants to be added before a class.
 boolean getConvertAttributeComment()
          Returns whether the user wants attribute comments to be converted.
 boolean getConvertClassComment()
          Returns whether the user wants class comments to be converted.
 boolean getConvertMethodComment()
          Returns whether the user wants method comments to be converted.
 String[] getFileList()
          Returns a list of the selected filenames.
 String getInputFolder()
          Returns the Input Folder that the user has chosen.
 String[] getMethodTags()
          Returns the list of tags the user wants to use in the method comments.
 String getMethodWhiteLines()
          Returns the amount of white lines the user wants to be added before a method.
 int getNumberOfAttributeTags()
          Returns the amount of attribute tags.
 int getNumberOfClassTags()
          Returns the amount of class tags.
 int getNumberOfMethodTags()
          Returns the amount of method tags.
 String getOutputFolder()
          Returns the Output Folder that the user has chosen.
 String getPopupText(String message)
          Returns the String entered by the user a popped up dialog box.
 String getSelectedAttributeTag()
          Returns the currently selected attribute tag.
 int getSelectedAttributeTagIndex()
          Returns the index of the currently selected attribute tag.
 String getSelectedClassTag()
          Returns the currently selected class tag.
 int getSelectedClassTagIndex()
          Returns the index of the currently selected class tag.
 String getSelectedMethodTag()
          Returns the currently selected method tag.
 int getSelectedMethodTagIndex()
          Returns the index of the currently selected method tag.
 boolean getStarInsets()
          Returns whether the star insets style of commentins should be used.
 boolean outputFolderIsInputFolder()
          Returns whether the user wants to have the Output Folder the same as the Input Folder.
 void popup(String message)
          Shows a Dialog with the passed message.
 void removeAttributeTag(int index)
          Removes an attribute tag from the attributetag list.
 void removeClassTag(int index)
          Removes a class tag from the classtag list.
 void removeMethodTag(int index)
          Removes a method tag from the methodtag list.
 void selectAllFiles()
          Selects all the files in the list of files.
 void selectAttributeTag(int index)
          Selects the attribute tag at the passed index.
 void selectClassTag(int index)
          Selects the class tag at the passed index.
 void selectMethodTag(int index)
          Selects the method tag at the passed index.
 void setFileList(String[] filelist)
          Set the list of the filenames to the passed filenames.
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, 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, processWindowEvent, 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, addImpl, 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, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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

folderpanel

protected FolderPanel folderpanel
The FolderPanel for the folders.


buttonpanel

protected ButtonPanel buttonpanel
The ButonPanel for the buttons.


listpanel

protected ListPanel listpanel
The ListPanel for the list.


classpanel

protected TagPanel classpanel
The TagPanel for the class tags.


methodpanel

protected TagPanel methodpanel
The TagPanel for the method tags.


attributepanel

protected TagPanel attributepanel
The TagPanel for the attribute tags.


control

protected JDControl control
The control class for this GUI. It does all the work, you could say.

Constructor Detail

JDFrame

public JDFrame()

Construct a new JDFrame to have the user stare at in awe. Perhaps. Sets the title to a standard funky thing. Or maybe not so funky.

Furthermore it initialises a lot of stuff. Like components... action commands... yeah... that stuff.

Method Detail

popup

public void popup(String message)
Shows a Dialog with the passed message.

Parameters:
message - the passed message.

getPopupText

public String getPopupText(String message)
Returns the String entered by the user a popped up dialog box.

Parameters:
message - The message asking for a tag.
Returns:
The String entered by the user a popped up dialog box, or null if the user canceled.

getInputFolder

public String getInputFolder()
Returns the Input Folder that the user has chosen.

Returns:
The Input Folder given by the user.

getOutputFolder

public String getOutputFolder()
Returns the Output Folder that the user has chosen.

Returns:
The Output Folder given by the user.

outputFolderIsInputFolder

public boolean outputFolderIsInputFolder()
Returns whether the user wants to have the Output Folder the same as the Input Folder.

Returns:
Whether the user wants to have the Output Folder the same as the Input Folder.

getFileList

public String[] getFileList()
Returns a list of the selected filenames.

Returns:
A list of the selected filenames.

setFileList

public void setFileList(String[] filelist)
Set the list of the filenames to the passed filenames.

Parameters:
filelist - A list of filenames.

getStarInsets

public boolean getStarInsets()
Returns whether the star insets style of commentins should be used.

Returns:
Whether the star insets style of commentins should be used.

addClassTag

public void addClassTag(String classtag)
Adds a class tag to the classtag list.

Parameters:
classtag - The classtag to be added.

addClassTag

public void addClassTag(String classtag,
                        int index)
Adds a class tag to the classtag list on the passed index.

Parameters:
classtag - The classtag to be added.
index - The index to add the passed classtag on.

removeClassTag

public void removeClassTag(int index)
Removes a class tag from the classtag list.

Parameters:
index - The index of the class tag to be removed.

getNumberOfClassTags

public int getNumberOfClassTags()
Returns the amount of class tags.

Returns:
The amount of class tags.

getSelectedClassTagIndex

public int getSelectedClassTagIndex()
Returns the index of the currently selected class tag.

Returns:
The index of the currently selected class tag.

getSelectedClassTag

public String getSelectedClassTag()
Returns the currently selected class tag.

Returns:
The currently selected class tag.

selectClassTag

public void selectClassTag(int index)
Selects the class tag at the passed index.

Parameters:
index - The index of the class tag to be added.

getClassTags

public String[] getClassTags()
Returns the list of tags the user wants to use in the class comments.

Returns:
A list of Strings that represent tags.

getConvertClassComment

public boolean getConvertClassComment()
Returns whether the user wants class comments to be converted.

Returns:
Whether the user wants class comments to be converted.

getAddClassComment

public boolean getAddClassComment()
Returns whether the user wants comments to be added to their classes.

Returns:
Whether the user wants comments to be added to their classes.

getClassWhiteLines

public String getClassWhiteLines()
Returns the amount of white lines the user wants to be added before a class.

Returns:
The amount of white lines the user wants to be added (as a String).

addMethodTag

public void addMethodTag(String methodtag)
Adds a method tag to the methodtag list.

Parameters:
methodtag - The methodtag to be added.

addMethodTag

public void addMethodTag(String methodtag,
                         int index)
Adds a method tag to the methodtag list on the passed index.

Parameters:
methodtag - The methodtag to be added.
index - The index to add the passed methodtag on.

removeMethodTag

public void removeMethodTag(int index)
Removes a method tag from the methodtag list.

Parameters:
index - The index of the methodtag to be removed.

getNumberOfMethodTags

public int getNumberOfMethodTags()
Returns the amount of method tags.

Returns:
The amount of method tags.

getSelectedMethodTagIndex

public int getSelectedMethodTagIndex()
Returns the index of the currently selected method tag.

Returns:
The index of the currently selected method tag.

getSelectedMethodTag

public String getSelectedMethodTag()
Returns the currently selected method tag.

Returns:
The currently selected method tag.

selectMethodTag

public void selectMethodTag(int index)
Selects the method tag at the passed index.

Parameters:
index - The index of the method tag to be added.

getMethodTags

public String[] getMethodTags()
Returns the list of tags the user wants to use in the method comments.

Returns:
A list of Strings that represent tags.

getConvertMethodComment

public boolean getConvertMethodComment()
Returns whether the user wants method comments to be converted.

Returns:
Whether the user wants method comments to be converted.

getAddMethodComment

public boolean getAddMethodComment()
Returns whether the user wants comments to be added to their methods.

Returns:
Whether the user wants comments to be added to their methods.

getMethodWhiteLines

public String getMethodWhiteLines()
Returns the amount of white lines the user wants to be added before a method.

Returns:
The amount of white lines the user wants to be added (as a String).

addAttributeTag

public void addAttributeTag(String attributetag)
Adds an attribute tag to the attributetag list.

Parameters:
attributetag - The attributetag to be added.

addAttributeTag

public void addAttributeTag(String attributetag,
                            int index)
Adds an attribute tag to the attributetag list on the passed index.

Parameters:
attributetag - The attributetag to be added.
index - The index to add the passed attributetag on.

removeAttributeTag

public void removeAttributeTag(int index)
Removes an attribute tag from the attributetag list.

Parameters:
index - The index of the attributetag to be removed.

getNumberOfAttributeTags

public int getNumberOfAttributeTags()
Returns the amount of attribute tags.

Returns:
The amount of attribute tags.

getSelectedAttributeTagIndex

public int getSelectedAttributeTagIndex()
Returns the index of the currently selected attribute tag.

Returns:
The index of the currently selected attribute tag.

getSelectedAttributeTag

public String getSelectedAttributeTag()
Returns the currently selected attribute tag.

Returns:
The currently selected attribute tag.

selectAttributeTag

public void selectAttributeTag(int index)
Selects the attribute tag at the passed index.

Parameters:
index - The index of the attribute tag to be added.

getAttributeTags

public String[] getAttributeTags()
Returns the list of tags the user wants to use in the attribute comments.

Returns:
A list of Strings that represent tags.

getConvertAttributeComment

public boolean getConvertAttributeComment()
Returns whether the user wants attribute comments to be converted.

Returns:
Whether the user wants attribute comments to be converted.

getAddAttributeComment

public boolean getAddAttributeComment()
Returns whether the user wants comments to be added to their attributes.

Returns:
Whether the user wants comments to be added to their attributes.

getAttributeWhiteLines

public String getAttributeWhiteLines()
Returns the amount of white lines the user wants to be added before an attribute.

Returns:
The amount of white lines the user wants to be added (as a String).

selectAllFiles

public void selectAllFiles()
Selects all the files in the list of files.


deselectAllFiles

public void deselectAllFiles()
Deselects all the files in the list of files.