PanelConfiguration
Class TitlePanel

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

public class TitlePanel
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  ImageCanvas titleCanvas
          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
TitlePanel()
          Second constructor.
TitlePanel(Color backgroundColor)
          The constructor.
 
Method Summary
 void init(ToolPanel toolPanel)
          Initialization method used when we catch a nullpointerexception.
 void init(ToolPanel toolPanel, Image image)
          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.
 
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

toolPanel

protected ToolPanel toolPanel
The panel that display help messages.

titleCanvas

protected ImageCanvas titleCanvas
The canvas on which we draw the image.
Constructor Detail

TitlePanel

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

TitlePanel

public TitlePanel()
Second constructor. It creates a new TitlePanel 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 image)
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 are going to display the help text.
image - The title image.
See Also:
ToolPanel

init

public void init(ToolPanel toolPanel)
Initialization method used when we catch a nullpointerexception. We add the canvas and the mouse listener.
Parameters:
toolPanel - The panel in which we are going to display the help text.
See Also:
ToolPanel

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.