PanelConfiguration
Class ToolPanel

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

public class ToolPanel
extends PanelConfiguration
implements MouseListener

This class provides a panel where we can have help.

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

Field Summary
protected  Help help
          The help frame.
protected  Button helpButton
          A help button.
protected  MouseListener helpMouseListener
          The mouse listener for the help button.
protected  Panel helpPanel
          The panel for the help.
protected  TextArea textArea
          The area on which we draw help messages.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ToolPanel()
          The second constructor.
ToolPanel(Color backgroundColor)
          The first constructor.
 
Method Summary
 Help help()
          This method returns the help frame.
 boolean helpFrameOpen()
          This method returns if the help frame is open or not.
 void init()
          Initialisation of the panel used when we catch a nullpointerexception.
 void init(Image image, String fileName)
          Initialisation of the panel.
 void init(Image image, URL fileName)
          Initialisation of the panel.
protected  void initMouseListener()
          Initialisation of the mouse listener.
 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 setText(String string)
          This method set a help message on the TextArea.
 void setText(String string, Color color)
          This method set a help message on the TextArea with a specified color.
 
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

helpButton

protected Button helpButton
A help button.

textArea

protected TextArea textArea
The area on which we draw help messages.

helpPanel

protected Panel helpPanel
The panel for the help.

help

protected Help help
The help frame.
See Also:
Help

helpMouseListener

protected MouseListener helpMouseListener
The mouse listener for the help button.
Constructor Detail

ToolPanel

public ToolPanel(Color backgroundColor)
The first constructor. It adds the area and the button and set the layout of the ToolPanel.
Parameters:
backgroundColor - The background color of the panel.

ToolPanel

public ToolPanel()
The second constructor. It adds the area and the button and set the layout of the ToolPanel. The background color of the panel is white.
Method Detail

initMouseListener

protected void initMouseListener()
Initialisation of the mouse listener.

init

public void init(Image image,
                 URL fileName)
Initialisation of the panel. This method adds the mouse listener, and set the different properties for the TextArea ...
Parameters:
image - The help image.
fileName - The help file name.

init

public void init(Image image,
                 String fileName)
Initialisation of the panel. This method adds the mouse listener, and set the different properties for the TextArea ...
Parameters:
image - The help image.
fileName - The help file name.

init

public void init()
Initialisation of the panel used when we catch a nullpointerexception.

setText

public void setText(String string)
This method set a help message on the TextArea.
Parameters:
string - The help message.

setText

public void setText(String string,
                    Color color)
This method set a help message on the TextArea with a specified color.
Parameters:
string - The help message.
color - The color of the help message.

helpFrameOpen

public boolean helpFrameOpen()
This method returns if the help frame is open or not.
Returns:
True if the help frame is open. False otherwise.
See Also:
Help

help

public Help help()
This method returns the help frame.
Returns:
The help frame.
See Also:
Help

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.