Class preferences

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 preferences
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class preferences
extends javax.swing.JDialog

preferences class is used set up the user preferences There are two states of this class. One is being shown but not clicked and one is being shown and clicked. Once clicked, there will be a dialog which asks you how you want to set preferences. There are no OS dependencies and variances. No security constraints or external specifications.

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.JPanel anim
          Java swing GUI depicting the JPanel of the animation interval.
 javax.swing.JTextField animInterval
          Java swing GUI depicting the text field of the animation interval.
 javax.swing.JPanel bottom
          Java swing GUI depicting the bottom panel.
 javax.swing.JButton cancel
          Java swing GUI depicting the CANCEL button.
 javax.swing.JPanel center
          Java swing GUI depicting the CENTER panel.
 javax.swing.JRadioButton createNew
          Java swing GUI depicting the button for the option to create a new file for paste to File.
 javax.swing.JTextField cycleNumber
          Java swing GUI depicting the text field of the number of cycles used when animating.
 javax.swing.JPanel filePrefs
          Java swing GUI depicting the File panel.
 javax.swing.JRadioButton fixedSize
          Java swing GUI depicting the button for the option to use specified size for new files.
 javax.swing.JTextField height
          Java swing GUI depicting the text field of the height of new images.
 javax.swing.JPanel heightPanel
          Java swing GUI depicting the JPanel of the height.
 javax.swing.JPanel imageAttrib
          Java swing GUI depicting the image size panel.
 javax.swing.JPanel imageAttrib2
          Java swing GUI depicting the JPanel of image size for new files.
 javax.swing.ButtonGroup imageSizes
          Java swing GUI depicting the button group for size creation.
 javax.swing.JLabel jLabel0
          Java swing GUI depicting the Label 0.
 javax.swing.JLabel jLabel1
          Java swing GUI depicting the Label 1.
 javax.swing.JLabel jLabel2
          Java swing GUI depicting the Label 2.
 javax.swing.JLabel jLabel3
          Java swing GUI depicting the Label 3.
 javax.swing.JLabel jLabelCycle
          Java swing GUI depicting the cycle number label.
 javax.swing.JLabel jLabelCycle2
          Java swing GUI depicting the cycle number parameter definition.
 javax.swing.JPanel lang
          Java swing GUI depicting the langauges panel.
 java.util.TreeSet lang_list
          Array of languages.
 javax.swing.JPanel langandtran
          Java swing GUI depicting the JPanel of languages and transitions.
 javax.swing.JComboBox langs
          Java swing GUI depicting the JComboBox of the languages.
 javax.swing.JRadioButton lastSize
          Java swing GUI depicting the button for the option to use last size for new files.
static int MaxUndo
          the maximum depth to which a person can undo.
 javax.swing.ButtonGroup newFiles
          Java swing GUI depicting the button group for new Files inpasting.
 javax.swing.JButton ok
          Java swing GUI depicting the OK button.
 javax.swing.JPanel ok_cancel
          Java swing GUI depicting the OK and CANCEL panel.
 javax.swing.JRadioButton onlyIfExists
          Java swing GUI depicting the button for the option to only pasteTo exiting files.
 javax.swing.ButtonGroup pasteOrImportTo
          Java swing GUI depicting the button group for where to paste.
 javax.swing.JPanel pastePrefs
          Java swing GUI depicting the Paste/Import To panel.
 javax.swing.JPanel prefs
          Java swing GUI depicting the main panel.
 javax.swing.JRadioButton promptSize
          Java swing GUI depicting the button for the option to prompt for size of new files.
 javax.swing.JRadioButton toCurrentLayer
          Java swing GUI depicting the button for the option to paste to the current layer of current file.
 javax.swing.JRadioButton toNewFile
          Java swing GUI depicting the button for the option to paste to a new file.
 javax.swing.JRadioButton toNewFileAndOpen
          Java swing GUI depicting the button for the option to paste to a new window.
 javax.swing.JRadioButton toNewLayer
          Java swing GUI depicting the button for the option to paste to a new layer of current file.
 javax.swing.JPanel top
          Java swing GUI depicting the top panel.
 javax.swing.JPanel tran
          Java swing GUI depicting the transitions panel.
 javax.swing.JComboBox trans
          Java swing GUI depicting the JComboBox of the transitions.
 java.lang.String[] transitions
          Array of availiable transitions.
 javax.swing.JPanel undo
          Java swing GUI depicting the undo panel.
 javax.swing.JTextField undoLevel
          Java swing GUI depicting the textfield of the undo level.
 javax.swing.JTextField width
          Java swing GUI depicting the text field of the width of new images.
 javax.swing.JPanel widthPanel
          Java swing GUI depicting the JPanel of the width.
 
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
preferences(java.awt.Frame parent, boolean modal)
          Creates new form preferences.
 
Method Summary
 void addLangs()
          Detects and adds all local platform's Languages to families JComboBox.
 void addTrans()
          Detects and adds all transitions to families JComboBox.
 void animIntervalActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the animation interval action.
 void cancelActionPerformed(java.awt.event.ActionEvent evt)
          This method executes if the event is a CANCEL button, then it closes the dialog.
 void closeDialog(java.awt.event.WindowEvent evt)
          Closes the dialog.
 void createNewActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the create new action.
 void cycleNumberActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the cycle Number.
 void fixedSizeActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the fixed size action.
 void heightActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the height action.
 void initComponents()
          This method is called from within the constructor to initialize the form.
 void lastSizeActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the last size action.
static void main(java.lang.String[] args)
          This method basically creates a new STRETCH object and applies the image into it.
 void okActionPerformed(java.awt.event.ActionEvent evt)
          This method executes if the event is a OK button.
 void onlyIfExistsActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the only if exists action.
 void promptSizeActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the prompt size action.
 void toCurrentLayerActionPerformed(java.awt.event.ActionEvent evt)
          This method is for when current layer is chosen.
 void toNewFileActionPerformed(java.awt.event.ActionEvent evt)
          This method is for when to new File is chosen.
 void toNewFileAndOpenActionPerformed(java.awt.event.ActionEvent evt)
          This method is for when to new File and open is chosen.
 void toNewLayerActionPerformed(java.awt.event.ActionEvent evt)
          This method is for when new layer is chosen.
 void undoLevelActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the undo level.
 void widthActionPerformed(java.awt.event.ActionEvent evt)
          This method is for the width action.
 
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

transitions

public java.lang.String[] transitions
Array of availiable transitions.


lang_list

public java.util.TreeSet lang_list
Array of languages.


MaxUndo

public static final int MaxUndo
the maximum depth to which a person can undo.

See Also:
Constant Field Values

ok_cancel

public javax.swing.JPanel ok_cancel
Java swing GUI depicting the OK and CANCEL panel.


ok

public javax.swing.JButton ok
Java swing GUI depicting the OK button.


cancel

public javax.swing.JButton cancel
Java swing GUI depicting the CANCEL button.


center

public javax.swing.JPanel center
Java swing GUI depicting the CENTER panel.


top

public javax.swing.JPanel top
Java swing GUI depicting the top panel.


bottom

public javax.swing.JPanel bottom
Java swing GUI depicting the bottom panel.


prefs

public javax.swing.JPanel prefs
Java swing GUI depicting the main panel.


lang

public javax.swing.JPanel lang
Java swing GUI depicting the langauges panel.


tran

public javax.swing.JPanel tran
Java swing GUI depicting the transitions panel.


imageAttrib

public javax.swing.JPanel imageAttrib
Java swing GUI depicting the image size panel.


undo

public javax.swing.JPanel undo
Java swing GUI depicting the undo panel.


undoLevel

public javax.swing.JTextField undoLevel
Java swing GUI depicting the textfield of the undo level.


jLabel0

public javax.swing.JLabel jLabel0
Java swing GUI depicting the Label 0.


jLabel1

public javax.swing.JLabel jLabel1
Java swing GUI depicting the Label 1.


jLabel2

public javax.swing.JLabel jLabel2
Java swing GUI depicting the Label 2.


jLabel3

public javax.swing.JLabel jLabel3
Java swing GUI depicting the Label 3.


jLabelCycle

public javax.swing.JLabel jLabelCycle
Java swing GUI depicting the cycle number label.


jLabelCycle2

public javax.swing.JLabel jLabelCycle2
Java swing GUI depicting the cycle number parameter definition.


pastePrefs

public javax.swing.JPanel pastePrefs
Java swing GUI depicting the Paste/Import To panel.


filePrefs

public javax.swing.JPanel filePrefs
Java swing GUI depicting the File panel.


anim

public javax.swing.JPanel anim
Java swing GUI depicting the JPanel of the animation interval.


widthPanel

public javax.swing.JPanel widthPanel
Java swing GUI depicting the JPanel of the width.


heightPanel

public javax.swing.JPanel heightPanel
Java swing GUI depicting the JPanel of the height.


imageAttrib2

public javax.swing.JPanel imageAttrib2
Java swing GUI depicting the JPanel of image size for new files.


langandtran

public javax.swing.JPanel langandtran
Java swing GUI depicting the JPanel of languages and transitions.


langs

public javax.swing.JComboBox langs
Java swing GUI depicting the JComboBox of the languages.


trans

public javax.swing.JComboBox trans
Java swing GUI depicting the JComboBox of the transitions.


animInterval

public javax.swing.JTextField animInterval
Java swing GUI depicting the text field of the animation interval.


width

public javax.swing.JTextField width
Java swing GUI depicting the text field of the width of new images.


height

public javax.swing.JTextField height
Java swing GUI depicting the text field of the height of new images.


cycleNumber

public javax.swing.JTextField cycleNumber
Java swing GUI depicting the text field of the number of cycles used when animating.


toNewFileAndOpen

public javax.swing.JRadioButton toNewFileAndOpen
Java swing GUI depicting the button for the option to paste to a new window.


toNewFile

public javax.swing.JRadioButton toNewFile
Java swing GUI depicting the button for the option to paste to a new file.


toNewLayer

public javax.swing.JRadioButton toNewLayer
Java swing GUI depicting the button for the option to paste to a new layer of current file.


toCurrentLayer

public javax.swing.JRadioButton toCurrentLayer
Java swing GUI depicting the button for the option to paste to the current layer of current file.


createNew

public javax.swing.JRadioButton createNew
Java swing GUI depicting the button for the option to create a new file for paste to File.


lastSize

public javax.swing.JRadioButton lastSize
Java swing GUI depicting the button for the option to use last size for new files.


promptSize

public javax.swing.JRadioButton promptSize
Java swing GUI depicting the button for the option to prompt for size of new files.


fixedSize

public javax.swing.JRadioButton fixedSize
Java swing GUI depicting the button for the option to use specified size for new files.


onlyIfExists

public javax.swing.JRadioButton onlyIfExists
Java swing GUI depicting the button for the option to only pasteTo exiting files.


newFiles

public javax.swing.ButtonGroup newFiles
Java swing GUI depicting the button group for new Files inpasting.


imageSizes

public javax.swing.ButtonGroup imageSizes
Java swing GUI depicting the button group for size creation.


pasteOrImportTo

public javax.swing.ButtonGroup pasteOrImportTo
Java swing GUI depicting the button group for where to paste.

Constructor Detail

preferences

public preferences(java.awt.Frame parent,
                   boolean modal)
Creates new form preferences. This also initializes all the components and calls the parent's default constructor. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
parent - This parameter sends which frame is the parent.
modal - This parameter could be a model, true or false.
Method Detail

initComponents

public void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. This method initializes the entire form with buttons and new dialoge boxes, etc. It also sets up constraints. There are no OS dependencies and variances. No security constraints or external specifications.


cancelActionPerformed

public void cancelActionPerformed(java.awt.event.ActionEvent evt)
This method executes if the event is a CANCEL button, then it closes the dialog. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

okActionPerformed

public void okActionPerformed(java.awt.event.ActionEvent evt)
This method executes if the event is a OK button. Then it executes the performed action. In this case, it will preferences the picture accordingly. If user selected undo instead of preferences, the picture will basically just expand without the borders of the picture to expand. There are no state transitions and no security constraints or OS dependencies.

Parameters:
evt - The event of a mouse action.

toCurrentLayerActionPerformed

public void toCurrentLayerActionPerformed(java.awt.event.ActionEvent evt)
This method is for when current layer is chosen. Disables option to specify how to create new file. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

toNewLayerActionPerformed

public void toNewLayerActionPerformed(java.awt.event.ActionEvent evt)
This method is for when new layer is chosen. Disables option to specify how to create new file. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

toNewFileActionPerformed

public void toNewFileActionPerformed(java.awt.event.ActionEvent evt)
This method is for when to new File is chosen. Enables option to specify how to create new file. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

toNewFileAndOpenActionPerformed

public void toNewFileAndOpenActionPerformed(java.awt.event.ActionEvent evt)
This method is for when to new File and open is chosen. Enables option to specify how to create new file. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

cycleNumberActionPerformed

public void cycleNumberActionPerformed(java.awt.event.ActionEvent evt)
This method is for the cycle Number. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

undoLevelActionPerformed

public void undoLevelActionPerformed(java.awt.event.ActionEvent evt)
This method is for the undo level. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

createNewActionPerformed

public void createNewActionPerformed(java.awt.event.ActionEvent evt)
This method is for the create new action. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

onlyIfExistsActionPerformed

public void onlyIfExistsActionPerformed(java.awt.event.ActionEvent evt)
This method is for the only if exists action. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

animIntervalActionPerformed

public void animIntervalActionPerformed(java.awt.event.ActionEvent evt)
This method is for the animation interval action. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

lastSizeActionPerformed

public void lastSizeActionPerformed(java.awt.event.ActionEvent evt)
This method is for the last size action. Disables option to specify the size. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

promptSizeActionPerformed

public void promptSizeActionPerformed(java.awt.event.ActionEvent evt)
This method is for the prompt size action. Disables option to specify the size. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

fixedSizeActionPerformed

public void fixedSizeActionPerformed(java.awt.event.ActionEvent evt)
This method is for the fixed size action. Enables option to specify the size. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

widthActionPerformed

public void widthActionPerformed(java.awt.event.ActionEvent evt)
This method is for the width action. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

heightActionPerformed

public void heightActionPerformed(java.awt.event.ActionEvent evt)
This method is for the height action. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of a mouse action.

closeDialog

public void closeDialog(java.awt.event.WindowEvent evt)
Closes the dialog. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
evt - The event of an action.

addTrans

public void addTrans()
Detects and adds all transitions to families JComboBox.


addLangs

public void addLangs()
Detects and adds all local platform's Languages to families JComboBox.


main

public static void main(java.lang.String[] args)
This method basically creates a new STRETCH object and applies the image into it. If there are arguments, it will take them as well. It will then display the results onto the main canvas. There are no OS dependencies and variances. No security constraints or external specifications.

Parameters:
args - The command line arguments