Class ToolBar

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----ToolBar

public class ToolBar
extends Container
implements MouseListener, MouseMotionListener, ToolTips
This class implements applet's toolbar of electrical components.


Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this component.
 o getTip(int)
Returns tool tip for the tool bar.
 o getTipLocation(Container)
Returns tool tip location for the tool bar.
 o mouseClicked(MouseEvent)
Handles the mouseClicked event - invokes properties dialog for double clicked element.
 o mouseDragged(MouseEvent)
Handles the mouseDragged event - updates event recorder.
 o mouseEntered(MouseEvent)
Handles the mouseEntered event - updates toolbar's elements appearance.
 o mouseExited(MouseEvent)
Handles the mouseExited event - updates tool tips information and toolbar's elements appearance.
 o mouseMoved(MouseEvent)
Handles the mouseMoved event - updates tool tips information.
 o mousePressed(MouseEvent)
Handles the mousePressed event - turns on element dragging mode.
 o mouseReleased(MouseEvent)
Handles the mouseReleased event - turns off drag mode and sends event to Matrix to get to new element.
 o removeActionListener(ActionListener)
Removes the specified action listener so that it no longer receives action events from this component.
 o sendEvent(String, int)
Function sends event (== command and one argument) to the system.
 o setSelected(MouseEvent)
Function on mouse event selects according tool for work or if mouse isn't over tool, sets selected to be null

Methods

 o setSelected
 public void setSelected(MouseEvent e)
Function on mouse event selects according tool for work or if mouse isn't over tool, sets selected to be null

 o sendEvent
 public void sendEvent(String command,
                       int modifiers)
Function sends event (== command and one argument) to the system.

Parameters:
command - command to send
modifiers - additional(optional) parameters.
 o mouseEntered
 public void mouseEntered(MouseEvent e)
Handles the mouseEntered event - updates toolbar's elements appearance.

Parameters:
e - the mouse event
 o mouseExited
 public void mouseExited(MouseEvent e)
Handles the mouseExited event - updates tool tips information and toolbar's elements appearance.

Parameters:
e - the mouse event
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Handles the mouseClicked event - invokes properties dialog for double clicked element.

Parameters:
e - the mouse event
 o mouseMoved
 public void mouseMoved(MouseEvent e)
Handles the mouseMoved event - updates tool tips information.

Parameters:
e - the mouse event
 o mousePressed
 public void mousePressed(MouseEvent e)
Handles the mousePressed event - turns on element dragging mode.

Parameters:
e - the mouse event
 o mouseReleased
 public void mouseReleased(MouseEvent e)
Handles the mouseReleased event - turns off drag mode and sends event to Matrix to get to new element.

Parameters:
e - the mouse event
 o mouseDragged
 public void mouseDragged(MouseEvent e)
Handles the mouseDragged event - updates event recorder.

Parameters:
e - the mouse event
 o addActionListener
 public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this component.

Parameters:
l - the action listener.
See Also:
ActionListener
 o removeActionListener
 public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this component.

Parameters:
l - the action listener.
See Also:
ActionListener
 o getTip
 public String getTip(int type)
Returns tool tip for the tool bar.

Returns:
tool tip.
 o getTipLocation
 public Point getTipLocation(Container painter)
Returns tool tip location for the tool bar.

Parameters:
painter - container which paints the tip.
Returns:
desired location for tool tip.