Pandora
Class ProofItem

java.lang.Object
  extended by Pandora.ProofItem
All Implemented Interfaces:
java.awt.event.MouseListener, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
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 parentWindow)
          Constructs a ProofItem.
ProofItem(ProofWindow parentWindow, ProofBox parentBox)
          Constructs a ProofItem.
 
Method Summary
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 line)
          Returns the line number for next ProofItem.
 void setParentBox(ProofBox parentBox)
          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 parentWindow)
Constructs a ProofItem.

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

ProofItem

public ProofItem(ProofWindow parentWindow,
                 ProofBox parentBox)
Constructs a ProofItem.

Parameters:
parentWindow - The ProofWindow that the item is inside.
parentBox - 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 parentBox)
Sets the ProofBox that contains this ProofItem.

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

recalculateLineNum

public abstract int recalculateLineNum(int line)
Returns the line number for next ProofItem.

Parameters:
line - The line number of the this ProofItem.

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