|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
Paint
public class Paint
TODO Put here a description of what this class does.
| Nested Class Summary | |
|---|---|
(package private) class |
Paint.opener
this class allows a picture file to be opened in Paint |
(package private) class |
Paint.saver
the class that allows Paint to save files |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| 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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) javax.swing.JViewport |
b
the view area fro JPaint |
(package private) java.util.ArrayList<Brush> |
brush
This is a list of all of the tools that are on the tool window |
(package private) javax.swing.JList |
brushes
the actual list of brushes |
(package private) javax.swing.JScrollPane |
brushlist
this is the pane that hols the list of tools |
(package private) javax.swing.JScrollBar |
brushscroller
this scroll bar for the list of brushes |
(package private) javax.swing.JPanel |
buttons
this holds the button for custom brushes |
(package private) Canvas |
canvas
This is the space that all of the drawing exists on |
(package private) javax.swing.JColorChooser |
cc
the is the color chooser menu for the toolbar window |
(package private) javax.swing.JMenuItem |
deselect
the deslect pixels command |
(package private) javax.swing.JMenu |
edit
the Edit menu |
(package private) javax.swing.JMenuItem |
exit
the exit program command |
(package private) javax.swing.JFileChooser |
fc
this is the file chooser menu for opening and saving |
(package private) javax.swing.JMenu |
file
the File menu |
(package private) javax.swing.JFrame |
frame
the window for JPaint |
(package private) javax.swing.JScrollPane |
imageviewer
this allows the scroll bar on the Jpaint window |
(package private) javax.swing.JScrollBar |
imageX
this is the horizontal scroll bar |
(package private) javax.swing.JScrollBar |
imageY
this is the vertical scroll bar |
(package private) java.awt.GridBagLayout |
l
this grid for the JPaint window |
(package private) javax.swing.JButton |
makeBrush
This is the button for making brushes for a picture file |
(package private) javax.swing.JMenuBar |
mb
this is the menu bar for the JPaint window |
(package private) javax.swing.JTextField |
name
the name of brushes |
(package private) javax.swing.JMenuItem |
New
the new JPaint wwindow command |
(package private) javax.swing.JMenuItem |
open
the open command |
(package private) javax.swing.JMenuItem |
redo
|
(package private) javax.swing.JMenuItem |
save
the save command |
(package private) javax.swing.JMenuItem |
showTools
the command to bring back the toolbar window |
(package private) javax.swing.JSlider |
tolerance
this is the slider that allows tolerance for magic wand and paintbucket |
(package private) javax.swing.JFrame |
toolPallet
this is the Frame that holds all of the tool elements |
(package private) javax.swing.JPanel |
tools
this holds the tools list |
(package private) javax.swing.JMenuItem |
undo
the undo command |
(package private) javax.swing.JMenu |
view
the View menu |
(package private) javax.swing.JTextField |
X
the text field for naming files in x direction |
(package private) javax.swing.JTextField |
Y
the text field for naming files in y direction |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| 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.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, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Paint(int w,
int h)
the constructor for Paint |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent arg0)
|
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
void |
create(java.awt.event.MouseEvent e)
the creation of brush strokes in the Paint window |
void |
deselectAll(java.awt.event.MouseEvent e)
Starts the program. |
void |
exitProgram(java.awt.event.MouseEvent e)
exits the program |
void |
keyPressed(java.awt.event.KeyEvent arg0)
|
void |
keyReleased(java.awt.event.KeyEvent arg0)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
static void |
main(java.lang.String[] args)
This is what causes Paint to run |
void |
makebrush(java.awt.event.MouseEvent e)
Creates a new brush to be selected from the list. |
void |
newCanvas(java.awt.event.MouseEvent e)
creates a new canvas after new was selected from the file menu |
void |
openFile(java.awt.event.MouseEvent e)
creates a new dialog to open a file. |
void |
redo(java.awt.event.MouseEvent e)
|
void |
saveFile(java.awt.event.MouseEvent e)
creates a new dialog to save a file |
void |
showTools(java.awt.event.MouseEvent e)
Shows the tool pallet window |
void |
undo(java.awt.event.MouseEvent e)
undoes the previous action up to 10 steps back. |
void |
valueChanged(javax.swing.event.ListSelectionEvent arg0)
|
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, 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, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
Canvas canvas
javax.swing.JColorChooser cc
javax.swing.JMenuBar mb
javax.swing.JFrame toolPallet
java.util.ArrayList<Brush> brush
javax.swing.JFileChooser fc
javax.swing.JButton makeBrush
javax.swing.JPanel buttons
javax.swing.JPanel tools
javax.swing.JScrollPane brushlist
javax.swing.JScrollPane imageviewer
javax.swing.JScrollBar imageX
javax.swing.JScrollBar imageY
javax.swing.JScrollBar brushscroller
javax.swing.JViewport b
javax.swing.JSlider tolerance
javax.swing.JList brushes
javax.swing.JFrame frame
java.awt.GridBagLayout l
javax.swing.JTextField name
javax.swing.JMenu edit
javax.swing.JMenu file
javax.swing.JMenu view
javax.swing.JMenuItem undo
javax.swing.JMenuItem redo
javax.swing.JMenuItem New
javax.swing.JMenuItem save
javax.swing.JMenuItem open
javax.swing.JMenuItem deselect
javax.swing.JMenuItem exit
javax.swing.JMenuItem showTools
javax.swing.JTextField X
javax.swing.JTextField Y
| Constructor Detail |
|---|
public Paint(int w,
int h)
w - window widthh - window height| Method Detail |
|---|
public void makebrush(java.awt.event.MouseEvent e)
e - public void actionPerformed(java.awt.event.ActionEvent arg0)
actionPerformed in interface java.awt.event.ActionListenerpublic void valueChanged(javax.swing.event.ListSelectionEvent arg0)
valueChanged in interface javax.swing.event.ListSelectionListenerpublic void undo(java.awt.event.MouseEvent e)
e - public void redo(java.awt.event.MouseEvent e)
public void openFile(java.awt.event.MouseEvent e)
e - public void saveFile(java.awt.event.MouseEvent e)
e - public void exitProgram(java.awt.event.MouseEvent e)
e - public void newCanvas(java.awt.event.MouseEvent e)
e - public void create(java.awt.event.MouseEvent e)
e - public void showTools(java.awt.event.MouseEvent e)
e - public void deselectAll(java.awt.event.MouseEvent e)
e - public void keyPressed(java.awt.event.KeyEvent arg0)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent arg0)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic static void main(java.lang.String[] args)
args - public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||