PanelConfiguration
Class RCImagePanel

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

public class RCImagePanel
extends PanelConfiguration
implements MouseListener

This class create a panel on which we can draw an image for the title of the applet.

Version:
1.0
Author:
Sebastien baehni
See Also:
FormsMakerPanel, Serialized Form

Field Summary
protected  boolean nullpointer
          To know if we had a nullpointerexception.
protected  ImageCanvas rcImageCanvas
          The canvas on which we draw the image.
protected  ToolPanel toolPanel
          The panel that display help messages.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
RCImagePanel()
          Second constructor.
RCImagePanel(Color backgroundColor)
          The constructor.
 
Method Summary
 void init(ToolPanel toolPanel)
          Initialization method used when we catch a nullpointer exception.
 void init(ToolPanel toolPanel, Image rcFilterImages)
          Initialization method.
 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.
 void paint(Graphics g)
          This method paint a message when the user try to run the applet in netscape.
 void update(Image image)
          This method update the image that is shown in the panel.
 
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, 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

toolPanel

protected ToolPanel toolPanel
The panel that display help messages.

rcImageCanvas

protected ImageCanvas rcImageCanvas
The canvas on which we draw the image.

nullpointer

protected boolean nullpointer
To know if we had a nullpointerexception.
Constructor Detail

RCImagePanel

public RCImagePanel(Color backgroundColor)
The constructor. It creates a new RCImagePanel with a ImageCanvas and an image on it.
Parameters:
backgroundColor - The background color of the panel.

RCImagePanel

public RCImagePanel()
Second constructor. It creates a new RCImagePanel with a ImageCanvas and an image on it. the background color of the panel is white.
Method Detail

init

public void init(ToolPanel toolPanel,
                 Image rcFilterImages)
Initialization method. We add the canvas and the mouse listener. At the end of the initialisation, we repaint the image.
Parameters:
toolPanel - The panel in which we display the help.
rcFilterImages - The image that show what the algorithm is based on.
See Also:
ToolPanel

init

public void init(ToolPanel toolPanel)
Initialization method used when we catch a nullpointer exception.
Parameters:
toolPanel - The panel in which we display the help.
See Also:
ToolPanel

paint

public void paint(Graphics g)
This method paint a message when the user try to run the applet in netscape. The netscape browser doesn't support the media tracker and nor to read a help message. We just put a message to the user to inform it.
Parameters:
g - The graphic context.
Overrides:
paint in class Container

update

public void update(Image image)
This method update the image that is shown in the panel.
Parameters:
image - The image that we must show in the panel.

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.