Class AllLayers

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by AllLayers
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class AllLayers
extends javax.swing.JDialog

AllLayers is used to create a GUI toolbox to display layers. It works with all operating systems and hardware. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
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
 javax.swing.JButton add
          GUI button that depicting the add a layer function.
 javax.swing.JTextField area
          TextField that takes in the name of removing layer.
 javax.swing.JPanel bottom
          GUI panel to show the possible layers.
 javax.swing.JButton bottomMost
          GUI button that depicts moving layer to bottom function.
 main_canvas center
          center is a main_canvas value that holds the drawing board.
 javax.swing.JLabel curLabel
          GUI label stating that category is current.
private static javax.swing.ButtonGroup currentGroup
          currentGroup is a ButtonGroup that holds the grouping of current Layer buttons.
 javax.swing.JPanel direction
          GUI panel that groups the movable directions of layers.
 javax.swing.JButton down
          GUI button that depicts moving a layer down function.
 javax.swing.JButton flatten
          GUI button that depicts the flatten a layer function.
 javax.swing.JButton front
          GUI button that depicts moving a layer to the front function.
 javax.swing.JPanel function
          GUI panel that groups the functions of layers.
 javax.swing.JPanel groupLayer
          GUI panel to group singleLayer into groups.
 java.util.Vector holder
          Vector to hold the individual layers together.
 javax.swing.JPanel layout
          GUI panel to group the layout of the toolbox.
 java.lang.String Name
          String function to store name.
 javax.swing.JLabel nameLab
          GUI label to show category for name.
 javax.swing.JLabel NameLabel
          GUI label stating that category is for Name of layers.
 TerpPaint paint
          paint is a TerpPaint value that holds the drawing board.
 int position
          position is an int that tells of location in GridBagConstraints.
 javax.swing.JButton remove
          GUI button that depicts the remove a layer function.
 javax.swing.JButton removeCurrent
          GUI button that depicts the remove current layer function.
 javax.swing.JPanel singleLayer
          GUI panel to group the different aspects of layer: name, current,change.
 javax.swing.JFrame temp
          GUI Frame to display for remove function.
 javax.swing.JPanel topLabels
          GUI panel to name the labels of each category for layers.
 javax.swing.JButton up
          GUI button that depicts the moving a layer up function.
 javax.swing.JLabel visLabel
          GUI label stating that category is for visible layers.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AllLayers(java.awt.Frame parent, boolean modal, main_canvas theCanvas)
          This method is called by the TerpPaint class and is used to create the toolbox.
 
Method Summary
 void addActionPerformed(java.awt.event.ActionEvent evt)
          This method is called when the add button is pressed on GUI by user.
 void bottomMostActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by bottomMost button.
 void cancelActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by GUI user pressing on cancel It will not store anything and will close Frame.
 void closeDialog(java.awt.event.WindowEvent evt)
          This method closes a dialog window.
 void downActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by down button.
 void flattenActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by flatten button.
 void flattenLayer()
          This method is called by the flattenActionPerformed.
 void frontActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by front button.
 void initComponents()
          This method is called by the AllLayers constructor.
 void layerGUI()
          This method is called to createlayer box.
static void main(java.lang.String[] args)
          This method is the initializer.
 void newLayer()
          This method is called by addActionPerformed.
 void okActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by the GUI user pressing on ok in the remove frame.
 void removeActionPerformed(java.awt.event.ActionEvent evt)
          This method is called when the remove button is pressed on GUI by user.
 void removeCurrentActionPerformed(java.awt.event.ActionEvent evt)
          This method is called when the remove current layer is pressed on GUI by user.
 void removeLayer(int number)
          This method is called by removeActionPerformed.
 void upActionPerformed(java.awt.event.ActionEvent evt)
          This method is called by up button.
 void updateBox()
          This method is called by several functions to set gridbagconstraints.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, removeNotify, 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, 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, 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
 

Field Detail

center

public main_canvas center
center is a main_canvas value that holds the drawing board.


paint

public TerpPaint paint
paint is a TerpPaint value that holds the drawing board.


currentGroup

private static javax.swing.ButtonGroup currentGroup
currentGroup is a ButtonGroup that holds the grouping of current Layer buttons.


position

public int position
position is an int that tells of location in GridBagConstraints.


curLabel

public javax.swing.JLabel curLabel
GUI label stating that category is current.


visLabel

public javax.swing.JLabel visLabel
GUI label stating that category is for visible layers.


NameLabel

public javax.swing.JLabel NameLabel
GUI label stating that category is for Name of layers.


add

public javax.swing.JButton add
GUI button that depicting the add a layer function.


remove

public javax.swing.JButton remove
GUI button that depicts the remove a layer function.


removeCurrent

public javax.swing.JButton removeCurrent
GUI button that depicts the remove current layer function.


flatten

public javax.swing.JButton flatten
GUI button that depicts the flatten a layer function.


up

public javax.swing.JButton up
GUI button that depicts the moving a layer up function.


down

public javax.swing.JButton down
GUI button that depicts moving a layer down function.


front

public javax.swing.JButton front
GUI button that depicts moving a layer to the front function.


bottomMost

public javax.swing.JButton bottomMost
GUI button that depicts moving layer to bottom function.


function

public javax.swing.JPanel function
GUI panel that groups the functions of layers.


direction

public javax.swing.JPanel direction
GUI panel that groups the movable directions of layers.


topLabels

public javax.swing.JPanel topLabels
GUI panel to name the labels of each category for layers.


bottom

public javax.swing.JPanel bottom
GUI panel to show the possible layers.


layout

public javax.swing.JPanel layout
GUI panel to group the layout of the toolbox.


singleLayer

public javax.swing.JPanel singleLayer
GUI panel to group the different aspects of layer: name, current,change.


groupLayer

public javax.swing.JPanel groupLayer
GUI panel to group singleLayer into groups.


holder

public java.util.Vector holder
Vector to hold the individual layers together.


area

public javax.swing.JTextField area
TextField that takes in the name of removing layer.


temp

public javax.swing.JFrame temp
GUI Frame to display for remove function.


nameLab

public javax.swing.JLabel nameLab
GUI label to show category for name.


Name

public java.lang.String Name
String function to store name.

Constructor Detail

AllLayers

public AllLayers(java.awt.Frame parent,
                 boolean modal,
                 main_canvas theCanvas)
This method is called by the TerpPaint class and is used to create the toolbox. This executes when the program is started This function calls: initComponents() It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
parent - Frame
modal - boolean
theCanvas - main_canvas
Method Detail

initComponents

public void initComponents()
This method is called by the AllLayers constructor. This initializes the GUI components used by AllLayers and this calls no functions. It should work with all operating systems and hardware. There are no variances and no security constraints.


updateBox

public void updateBox()
This method is called by several functions to set gridbagconstraints. It should work with all operating systems and hardware. There are no variances and no security constraints


newLayer

public void newLayer()
This method is called by addActionPerformed. The new layer function creates a new layer in the GUI toolbox. It should work with all operating systems and hardware. There are no variances and no security constraints


removeLayer

public void removeLayer(int number)
This method is called by removeActionPerformed. It removes the layer specified and recreates the GUI toolbox correctly without the deleted layer. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
number - an int that represents the layer number to be removed

flattenLayer

public void flattenLayer()
This method is called by the flattenActionPerformed. It combines all layers into one. It should work with all operating systems and hardware. There are no variances and no security constraints.


addActionPerformed

public void addActionPerformed(java.awt.event.ActionEvent evt)
This method is called when the add button is pressed on GUI by user. It calls the main_canvas addLayer, repaint and then newLayer. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

removeActionPerformed

public void removeActionPerformed(java.awt.event.ActionEvent evt)
This method is called when the remove button is pressed on GUI by user. It creates a new Frame and asks for layer name and deletes it. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - an ActionEvent object

removeCurrentActionPerformed

public void removeCurrentActionPerformed(java.awt.event.ActionEvent evt)
This method is called when the remove current layer is pressed on GUI by user. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - an ActionEvent object

okActionPerformed

public void okActionPerformed(java.awt.event.ActionEvent evt)
This method is called by the GUI user pressing on ok in the remove frame. It will store the removal of layer name and remove layer. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

cancelActionPerformed

public void cancelActionPerformed(java.awt.event.ActionEvent evt)
This method is called by GUI user pressing on cancel It will not store anything and will close Frame. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

flattenActionPerformed

public void flattenActionPerformed(java.awt.event.ActionEvent evt)
This method is called by flatten button. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

upActionPerformed

public void upActionPerformed(java.awt.event.ActionEvent evt)
This method is called by up button. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

downActionPerformed

public void downActionPerformed(java.awt.event.ActionEvent evt)
This method is called by down button. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

frontActionPerformed

public void frontActionPerformed(java.awt.event.ActionEvent evt)
This method is called by front button. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

bottomMostActionPerformed

public void bottomMostActionPerformed(java.awt.event.ActionEvent evt)
This method is called by bottomMost button. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - ActionEvent

layerGUI

public void layerGUI()
This method is called to createlayer box. It should work with all operating systems and hardware. There are no variances and no security constraints.


closeDialog

public void closeDialog(java.awt.event.WindowEvent evt)
This method closes a dialog window. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
evt - WindowEvent

main

public static void main(java.lang.String[] args)
This method is the initializer. It should work with all operating systems and hardware. There are no variances and no security constraints.

Parameters:
args - String[]