PanelConfiguration
Class PaintSurfacePanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--PanelConfiguration.PanelConfiguration
                          |
                          +--PanelConfiguration.PaintSurfacePanel

public class PaintSurfacePanel
extends PanelConfiguration
implements MouseListener, ComponentListener

This class provides the panel in order to add a paintSurface on it.

Version:
1.0
Author:
Sebastien baehni
See Also:
PaintSurface, PanelConfiguration, Serialized Form

Field Summary
protected  PaintSurface paintSurface
          The surface that we are going to add to the panel.
protected  ToolPanel toolPanel
          The panel on which we display a help message.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
PaintSurfacePanel(int width, int height)
          The second constructor.
PaintSurfacePanel(int width, int height, Color backgroundColor)
          The first constructor.
 
Method Summary
 void componentHidden(ComponentEvent e)
          When the component is hidden.
 void componentMoved(ComponentEvent e)
          When the component is moved.
 void componentResized(ComponentEvent e)
          When the component is resized.
 void componentShown(ComponentEvent e)
          When the component is shown.
 void init(ToolPanel toolPanel, FormsMakerPanel formsMakerPanel)
          Initialization of the PaintSurfacePanel.
 void mouseClicked(MouseEvent e)
          When the mouse is clicked.
 void mouseEntered(MouseEvent e)
          When the mouse enters.
 void mouseExited(MouseEvent e)
          When the mouse exits.
 void mousePressed(MouseEvent e)
          When the mouse is pressed.
 void mouseReleased(MouseEvent e)
          When the mouse is released.
 PaintSurface paintSurface()
          Return the PaintSurface of the panel.,
 void start()
          This method call the start method of the PaintSurface.
 
Methods inherited from class PanelConfiguration.PanelConfiguration
Disable, Enable
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paintSurface

protected PaintSurface paintSurface
The surface that we are going to add to the panel.
See Also:
PaintSurface

toolPanel

protected ToolPanel toolPanel
The panel on which we display a help message.
See Also:
ToolPanel
Constructor Detail

PaintSurfacePanel

public PaintSurfacePanel(int width,
                         int height,
                         Color backgroundColor)
The first constructor. It create a PaintSurfacePanel with a background color.
Parameters:
width - The width of the PaintSurface.
height - The height of the PaintSurface.
backgroundColor - The backroundColor of the PaintSurfacePanel.
See Also:
PaintSurface

PaintSurfacePanel

public PaintSurfacePanel(int width,
                         int height)
The second constructor. It create a PaintSurfacePanel with a white background.
Parameters:
width - The width of the PaintSurface.
height - The height of the PaintSurface.
See Also:
PaintSurface
Method Detail

init

public void init(ToolPanel toolPanel,
                 FormsMakerPanel formsMakerPanel)
Initialization of the PaintSurfacePanel.
Parameters:
toolPanel - The panel on which we display the help message.
formsMakerPanel - The panel we are going to get the different variables (type of forms choosen, texture, color) for drawing on a PaintSurface.
See Also:
ToolPanel, FormsMakerPanel

start

public void start()
This method call the start method of the PaintSurface.
See Also:
PaintSurface

paintSurface

public PaintSurface paintSurface()
Return the PaintSurface of the panel.,
Returns:
The PaintSurface of the panel.
See Also:
PaintSurface

mouseClicked

public void mouseClicked(MouseEvent e)
When the mouse is clicked.
Specified by:
mouseClicked in interface MouseListener
Parameters:
e - The MouseEvent.

mouseEntered

public void mouseEntered(MouseEvent e)
When the mouse enters.
Specified by:
mouseEntered in interface MouseListener
Parameters:
e - The MouseEvent.

mouseExited

public void mouseExited(MouseEvent e)
When the mouse exits.
Specified by:
mouseExited in interface MouseListener
Parameters:
e - The MouseEvent.

mousePressed

public void mousePressed(MouseEvent e)
When the mouse is pressed.
Specified by:
mousePressed in interface MouseListener
Parameters:
e - The MouseEvent.

mouseReleased

public void mouseReleased(MouseEvent e)
When the mouse is released.
Specified by:
mouseReleased in interface MouseListener
Parameters:
e - The MouseEvent.

componentHidden

public void componentHidden(ComponentEvent e)
When the component is hidden.
Specified by:
componentHidden in interface ComponentListener
Parameters:
e - The ComponentEvent

componentMoved

public void componentMoved(ComponentEvent e)
When the component is moved.
Specified by:
componentMoved in interface ComponentListener
Parameters:
e - The ComponentEvent

componentResized

public void componentResized(ComponentEvent e)
When the component is resized.
Specified by:
componentResized in interface ComponentListener
Parameters:
e - The ComponentEvent

componentShown

public void componentShown(ComponentEvent e)
When the component is shown.
Specified by:
componentShown in interface ComponentListener
Parameters:
e - The ComponentEvent