Raptor
Class ProofItem

java.lang.Object
  extended by Raptor.ProofItem
All Implemented Interfaces:
java.awt.event.MouseListener, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
ProgramLine, ProofBox, ProofLine

public abstract class ProofItem
extends java.lang.Object
implements java.awt.event.MouseListener, java.io.Serializable

Extended by ProofBox and ProofLine.

See Also:
Serialized Form

Constructor Summary
ProofItem(ProofWindow pParentWindow)
          Constructs a ProofItem.
ProofItem(ProofWindow pParentWindow, ProofBox pParentBox)
          Constructs a ProofItem.
 
Method Summary
 void deselectLine()
          Carries out the methods required to show and record that a ProgramLine has been deselected
 void deselectLineNoClear()
          Carries out the methods required to show and record that a ProgramLine has been deselected without clearing the last selected item for the ProofWindow.
abstract  javax.swing.JPanel display()
          Returns a JPanel containing this ProofItem.
 void displayColour()
          Sets the display colour of the ProofItem depending on if the item is selected.
 ProofBox getParentBox()
          Returns the ProofBox that contains the current ProofItem.
 ProofWindow getParentWindow()
          Returns the ProofWindow that contains this ProofItem.
 void mouseClicked(java.awt.event.MouseEvent e)
          Responds to a ProofItem with a mouse listener being clicked.
 void mouseEntered(java.awt.event.MouseEvent e)
          Responds to an object with a mouse listener when a mouse over occurs.
 void mouseExited(java.awt.event.MouseEvent e)
          Responds to an object with a mouse listener when a mouse over occurs.
 void mousePressed(java.awt.event.MouseEvent e)
          Responds to an object with a mouse listener being clicked.
 void mouseReleased(java.awt.event.MouseEvent e)
          Responds to an object with a mouse listener being clicked.
abstract  int[] recalculateLineNum(int pThisLine, int pNextLine)
          Returns the line number for next ProofItem.
 void setParentBox(ProofBox pParentBox)
          Sets the ProofBox that contains this ProofItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProofItem

public ProofItem(ProofWindow pParentWindow)
Constructs a ProofItem.

Parameters:
pParentWindow - The ProofWindow that the item is inside.

ProofItem

public ProofItem(ProofWindow pParentWindow,
                 ProofBox pParentBox)
Constructs a ProofItem.

Parameters:
pParentWindow - The ProofWindow that the item is inside.
pParentBox - The outer ProofBox that contains this ProofItem.
Method Detail

getParentWindow

public ProofWindow getParentWindow()
Returns the ProofWindow that contains this ProofItem.


getParentBox

public ProofBox getParentBox()
Returns the ProofBox that contains the current ProofItem.


setParentBox

public void setParentBox(ProofBox pParentBox)
Sets the ProofBox that contains this ProofItem.

Parameters:
pParentBox - The ProofBox that the item is inside.

recalculateLineNum

public abstract int[] recalculateLineNum(int pThisLine,
                                         int pNextLine)
Returns the line number for next ProofItem.

Parameters:
pThisLine - The line number of the this ProofItem.
pNextLine - the line number of this ProgramLine

deselectLine

public void deselectLine()
Carries out the methods required to show and record that a ProgramLine has been deselected


deselectLineNoClear

public void deselectLineNoClear()
Carries out the methods required to show and record that a ProgramLine has been deselected without clearing the last selected item for the ProofWindow. This prevents looping.


display

public abstract javax.swing.JPanel display()
Returns a JPanel containing this ProofItem.


displayColour

public void displayColour()
Sets the display colour of the ProofItem depending on if the item is selected.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Responds to a ProofItem with a mouse listener being clicked.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
e - the object with a mouse listener that was clicked

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Responds to an object with a mouse listener when a mouse over occurs.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
e - the object with a mouse listener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Responds to an object with a mouse listener when a mouse over occurs.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
e - the object with a mouse listener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Responds to an object with a mouse listener being clicked.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - the object with a mouse listener that was clicked

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Responds to an object with a mouse listener being clicked.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - the object with a mouse listener that was clicked