gui
Class GUIColumnNames

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by gui.WizardPanel
                      extended by gui.GUIColumnNames
All Implemented Interfaces:
WizardConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

 class GUIColumnNames
extends WizardPanel
implements WizardConstants

The GUIColumnNames is the wizard panel used for the selection, and modification of the column name values. This panel has the functionality of browsing through the records, change the header row values as desired, or select a already existing "header row"; which will remove the same record selected from the structure. The CUIColumnNames panel, also has the function of creating default column names if there is no value entered.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
private  java.util.ArrayList<javax.swing.JTextField> columnNames
           
private static java.lang.String EXAMPLE_DATA
           
private static java.lang.String HEADER_NAME
           
private  int index
           
private  java.util.ArrayList<javax.swing.JLabel> labelFieldNames
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface gui.WizardConstants
BROWSE, COLON, COLUMN, DATA_SEPARATOR, DATABASE_NAME, DOT, EMPTY, FILE_CHOOSER_TITLE, GUI_COLUMN_NAMES_TEXT, GUI_DATABASE_SETUP_TEXT, GUI_EXPORT_DATABSE_TEXT, GUI_OPEN_FILE_TEXT, GUI_PRIMARY_KEY_TEXT, GUI_SAVE_FILE_TEXT, LOADING_ERROR, SPACE, TABLE_NAME
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GUIColumnNames()
          The contructor doesn't receive any parameters, but it passes some constant values to the super type for the title, and the image file.
 
Method Summary
 void clearData()
          The clear data method is called from the wizard manager once the previous action has been triggered.
 boolean closePanel()
          The closePanel() method is a required method declared in the WizardPanel.
 void displayPanel()
          The displayPanel() method initialises the panel with the gui components.
private  void getHeaderRow()
          The getHeaderRow() method grabs the List from the data structure at that specific index.
private  void increment()
          Sets the index value with the next increment.
private  void refreshExample()
          The refreshExample() method gets the list from the List< Of List > data structure at that specific index.
private  void setColumnNames()
          The setColumnNames() method iterates through the JTextField columnNames list, and adds the values into the stored columnNames structure within the business object layer.
 
Methods inherited from class gui.WizardPanel
errorTest, getCenterPanel, getTitle
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

HEADER_NAME

private static final java.lang.String HEADER_NAME
See Also:
Constant Field Values

EXAMPLE_DATA

private static final java.lang.String EXAMPLE_DATA
See Also:
Constant Field Values

index

private int index

labelFieldNames

private java.util.ArrayList<javax.swing.JLabel> labelFieldNames

columnNames

private java.util.ArrayList<javax.swing.JTextField> columnNames
Constructor Detail

GUIColumnNames

GUIColumnNames()
The contructor doesn't receive any parameters, but it passes some constant values to the super type for the title, and the image file.

Method Detail

displayPanel

public void displayPanel()
The displayPanel() method initialises the panel with the gui components. It handles the actions for the more button: which incremements the current index value, and also the header row checkbox.

Specified by:
displayPanel in class WizardPanel

refreshExample

private void refreshExample()
The refreshExample() method gets the list from the List< Of List > data structure at that specific index. Therefore providing a List of Object for each element contained at that row.


increment

private void increment()
Sets the index value with the next increment. Contains a condition test to check whether it is in range. It loops back to 0 if the index has been incremented higher than size of the data structure.


getHeaderRow

private void getHeaderRow()
The getHeaderRow() method grabs the List from the data structure at that specific index. It iterates through the elements contained in that received list, and checks whether the data received does not exceed the columnNames size.


setColumnNames

private void setColumnNames()
The setColumnNames() method iterates through the JTextField columnNames list, and adds the values into the stored columnNames structure within the business object layer.


closePanel

public boolean closePanel()
The closePanel() method is a required method declared in the WizardPanel. The function of this method is to comit the update for the columns once the panel has been closed.

Specified by:
closePanel in class WizardPanel
Returns:
boolean.

clearData

public void clearData()
The clear data method is called from the wizard manager once the previous action has been triggered. The clear data method allows the panel, and any associated data to be wiped when the user has made a mistake within the wizard process.

Overrides:
clearData in class WizardPanel