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