gui
Class TagPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bygui.TagPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class TagPanel
extends Panel

This class is the panel with the tag stuff on it, like a list with some manipulative buttons, some choices, and a label.

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

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
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  Checkbox addcheckbox
          The checkbox where the user can indicate whether comment should be added.
protected  Checkbox convertcheckbox
          The checkbox where the user can indicate whether comment should be converted.
protected  List taglist
          The list with the tags in it.
protected  TextField whitelines
          The textfield where the user can indicate how many white lines he wants.
 
Fields inherited from class java.awt.Panel
 
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
TagPanel(String label, ActionListener listener)
          Constructs and initialises a new TagPanel.
 
Method Summary
 void addTag(String tag)
          Adds a tag to the tag list.
 void addTag(String tag, int index)
          Adds a tag to the tag list on the passed index.
 boolean getAddComment()
          Returns whether the user wants to have comment added.
 boolean getConvertComment()
          Returns whether the user wants to have their comment converted.
 int getNumberOfTags()
          Returns the amount of tags.
 String getSelectedTag()
          Returns the currently selected tag.
 int getSelectedTagIndex()
          Returns the index of the currently selected tag.
 String[] getTags()
          Returns the tags in the tag list.
 String getWhiteLines()
          Returns the amount of white lines the user wants after their comment.
 void removeTag(int index)
          Removes a tag from the tag list.
 void selectTag(int index)
          Selects the tag at the passed index.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, 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, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, 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, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

convertcheckbox

protected Checkbox convertcheckbox
The checkbox where the user can indicate whether comment should be converted. Give it a label, and set it to be standard on.


addcheckbox

protected Checkbox addcheckbox
The checkbox where the user can indicate whether comment should be added. Give it a label, and set it to be standard on.


whitelines

protected TextField whitelines
The textfield where the user can indicate how many white lines he wants.


taglist

protected List taglist
The list with the tags in it.

Constructor Detail

TagPanel

public TagPanel(String label,
                ActionListener listener)
Constructs and initialises a new TagPanel.

Parameters:
label - The label of this TagPanel (For example: "Class").
listener - The ActionListener for the buttons.
Method Detail

addTag

public void addTag(String tag)
Adds a tag to the tag list.

Parameters:
tag - The tag to be added.

addTag

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

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

removeTag

public void removeTag(int index)
Removes a tag from the tag list.

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

getNumberOfTags

public int getNumberOfTags()
Returns the amount of tags.

Returns:
The amount of tags.

getSelectedTagIndex

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

Returns:
The index of the currently selected tag.

getSelectedTag

public String getSelectedTag()
Returns the currently selected tag.

Returns:
The currently selected tag.

selectTag

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

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

getTags

public String[] getTags()
Returns the tags in the tag list.

Returns:
The tags in the tag list.

getConvertComment

public boolean getConvertComment()
Returns whether the user wants to have their comment converted.

Returns:
Whether the user wants to have their comment converted.

getAddComment

public boolean getAddComment()
Returns whether the user wants to have comment added.

Returns:
Whether the user wants to have comment added.

getWhiteLines

public String getWhiteLines()
Returns the amount of white lines the user wants after their comment.

Returns:
The amount of white lines the user wants after their comment.