Class letterTool

java.lang.Object
  extended by letterTool
All Implemented Interfaces:
ourTool

public class letterTool
extends java.lang.Object
implements ourTool

The letterTool class represents letter tools. All texts are implemented by mouse events with x-coordinates and y-coordinates in parent frame. The class letterTool includes methods for clicking, dragging, and releasing the mouse. There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.


Field Summary
static boolean boldness
          Holds the state of the font's boldness.
static int currentFont
          Holds the size of the current Font.
static int currentSize
          Holds the state of the font's current size.
static boolean italicness
          Holds the state of the font's italicness.
 boolean ok_action
          The dialog is closed by OK.
 java.awt.Frame parentFrame
          A main frame that generates the letter tool frame.
static boolean underlineness
          Holds the state of the font's underlineness.
 
Constructor Summary
letterTool(java.awt.Frame parent)
          Creates a letterTool and initializes a newly created java.awt.Frame object so that it represents a copy of the argument java.awt.Frame There are no OS/Hardware dependencies and no variances.
 
Method Summary
 void clickAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
          Allows the user to click the mouse using the letterTool.
 void dragAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
          Allows the user to drag the mouse, using the letter Tool.
 void mouseReleaseAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
          Allows the user to release the mouse, using the letter Tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFrame

public java.awt.Frame parentFrame
A main frame that generates the letter tool frame.


currentFont

public static int currentFont
Holds the size of the current Font.


boldness

public static boolean boldness
Holds the state of the font's boldness.


underlineness

public static boolean underlineness
Holds the state of the font's underlineness.


italicness

public static boolean italicness
Holds the state of the font's italicness.


currentSize

public static int currentSize
Holds the state of the font's current size.


ok_action

public boolean ok_action
The dialog is closed by OK.

Constructor Detail

letterTool

public letterTool(java.awt.Frame parent)
Creates a letterTool and initializes a newly created java.awt.Frame object so that it represents a copy of the argument java.awt.Frame There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.

Parameters:
parent - frame to initialize the letter tool
Method Detail

clickAction

public void clickAction(java.awt.event.MouseEvent mevt,
                        main_canvas theCanvas)
Allows the user to click the mouse using the letterTool. The parameters passed in are a MouseEvent, which holds the coordinates of where the mouse was clicked, and the main_canvas, where it will be drawn. There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.

Specified by:
clickAction in interface ourTool
Parameters:
mevt - contains information about the mouse event including x-coordinates and y-coordinates
theCanvas - main canvas

dragAction

public void dragAction(java.awt.event.MouseEvent mevt,
                       main_canvas theCanvas)
Allows the user to drag the mouse, using the letter Tool. Since this is the letterTool and dragging is unnecessary, this method was not implemented. However, it was created because it implements OurTool. There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.

Specified by:
dragAction in interface ourTool
Parameters:
mevt - object contains information about the mouse event including x-coordinates and y-coordinates
theCanvas - main canvas

mouseReleaseAction

public void mouseReleaseAction(java.awt.event.MouseEvent mevt,
                               main_canvas theCanvas)
Allows the user to release the mouse, using the letter Tool. Since this is the letterTool and releasing the mouse is unnecessary, this method was not implemented. However, it was created because it implements OurTool. There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.

Specified by:
mouseReleaseAction in interface ourTool
Parameters:
mevt - object contains information about the mouse event including x-coordinates and y-coordinates
theCanvas - main canvas