|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
Raptor.ProofWindow
public class ProofWindow
Everything contained within each tab is a ProofWindow. This includes mainProofBox and the buttons for applying rules.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
ProofItem |
firstTMLine
|
boolean |
inProof
|
ProofBox |
mainProofBox
|
java.util.List<ProofBox> |
redoList
|
java.util.List<ProofLine> |
tempProofLines
|
java.util.List<ProofLine> |
TMProofLines
|
java.util.List<ProofBox> |
undoList
|
View |
view
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ProofWindow(View pFrame)
Creates a new ProofWindow |
|
ProofWindow(View pFrame,
java.lang.String pDeclarations,
java.lang.String pMethodPre,
java.lang.String pMethodPost,
java.lang.String pRetType,
java.lang.String pRes)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent pEvent)
Handles actions performed within the ProofWindow |
void |
addConstant()
Adds a Constant to the signature |
void |
addFunction()
Adds a Function to the signature |
void |
addPredicate()
Adds a Predicate to the signature |
void |
addToMainProofBox(ProofItem pItem)
Adds a ProofItem to the mainProofBox |
void |
addToPost(java.lang.String pInput)
Adds the input string to post |
void |
addToPre(java.lang.String pInput)
Adds the input string to pre |
void |
addToProgram(java.lang.String pInput)
Adds the input string to program |
void |
clearLastRuleSelected()
Resets the button which was last selected |
void |
clearLastSelectedLine()
Deselects the selected ProofItem |
void |
clearPostInput()
Clears the postcondition input |
void |
clearPreInput()
Clears the precondition input |
void |
clearProgramInput()
Clears the program input |
void |
commitSaveState()
Adds the temporarily stored copy of the ProofBox to the undo list and clears all the redo states. |
void |
deselectRule(javax.swing.JButton pRule)
Clears the button to be deselected |
void |
disableButtons()
Used when a TM rule is invoked which disables all rule buttons |
void |
displayAllSignature()
Updates the contents of all signature display boxes |
void |
enableButtons()
Used when a TM rule is completed which enables all rule buttons |
void |
finishedRule()
Performed when a rule application has been completed. |
void |
focusGained(java.awt.event.FocusEvent e)
Invoked when a component gains the keyboard focus |
void |
focusLost(java.awt.event.FocusEvent e)
Invoked when a component loses the keyboard focus |
javax.swing.JButton |
getLastRuleSelected()
Returns the button which was last selected |
java.lang.String |
getPost()
Gets the postcondition input |
java.lang.String |
getPre()
Gets the precondition input |
java.lang.String |
getProgram()
Gets the program input |
ProofBox |
getProofBox()
|
PanSignature |
getSignature()
Returns the signature of ProofWindow |
void |
inputProofMode()
Mode for inputting data into the proof. |
boolean |
isDone()
|
void |
keyPressed(java.awt.event.KeyEvent e)
Handle the key pressed event |
void |
keyReleased(java.awt.event.KeyEvent e)
Handle the key released event |
void |
keyTyped(java.awt.event.KeyEvent e)
Handle the key typed event |
void |
openProof(java.lang.String pFilename)
Deserializes the given/goal or proofBox from given file location. Please see the comment for saveProof, it may be a better idea to store the files in an XML format. |
void |
redo()
Redoes rules which have been undone |
void |
reloadProofBox()
Refreshes the outermost mainProofBox in the ProofWindow |
void |
saveProof(java.lang.String pFilename)
Serializes the given/goal or proofBox to given file location. I would prefer to encode this into XML. |
void |
selectRule(javax.swing.JButton pRule)
Sets the button which was last selected. |
void |
setLastSelectedLine(ProofItem pLine)
Changes the new selected ProofItem and deselects previous ones |
void |
setupMainProofBox()
Resets the mainProofBox display for solveProofMode() |
void |
showGlobalSignature()
Displays the global signature |
void |
showLocalSignature(PanSignature pLocalSig)
Displays the local signature |
void |
showSignature()
Shows the signature in sidebar |
void |
solveProofMode()
Mode for solving proof by applying rules. |
void |
undo()
Undoes rules which have been applied to the ProofBox. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public View view
public boolean inProof
public java.util.List<ProofLine> tempProofLines
public java.util.List<ProofLine> TMProofLines
public java.util.List<ProofBox> undoList
public java.util.List<ProofBox> redoList
public ProofBox mainProofBox
public ProofItem firstTMLine
Constructor Detail |
---|
public ProofWindow(View pFrame)
pFrame
- the View associated with the ProofWindowpublic ProofWindow(View pFrame, java.lang.String pDeclarations, java.lang.String pMethodPre, java.lang.String pMethodPost, java.lang.String pRetType, java.lang.String pRes)
Method Detail |
---|
public void inputProofMode()
public void solveProofMode()
public PanSignature getSignature()
public void actionPerformed(java.awt.event.ActionEvent pEvent)
actionPerformed
in interface java.awt.event.ActionListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void openProof(java.lang.String pFilename)
pFilename
- destination of saved filepublic void saveProof(java.lang.String pFilename)
pFilename
- destination of saved filepublic void undo()
public void redo()
public void commitSaveState()
public void reloadProofBox()
public void setupMainProofBox()
public void setLastSelectedLine(ProofItem pLine)
pLine
- the selected ProofLine or ProgramLinepublic void clearLastSelectedLine()
public javax.swing.JButton getLastRuleSelected()
public void clearLastRuleSelected()
public void selectRule(javax.swing.JButton pRule)
pRule
- last selected buttonpublic void deselectRule(javax.swing.JButton pRule)
pRule
- button which has been deselectedpublic void finishedRule()
public void displayAllSignature()
public void addPredicate()
public void addConstant()
public void addFunction()
public void clearPreInput()
public java.lang.String getPre()
public void addToPre(java.lang.String pInput)
pInput
- the precondition input Stringpublic void clearProgramInput()
public java.lang.String getProgram()
public void addToProgram(java.lang.String pInput)
pInput
- the program input Stringpublic void clearPostInput()
public java.lang.String getPost()
public void addToPost(java.lang.String pInput)
pInput
- the post input Stringpublic void addToMainProofBox(ProofItem pItem)
pItem
- new ProofItem to be addedpublic void showSignature()
public void showGlobalSignature()
public void showLocalSignature(PanSignature pLocalSig)
pLocalSig
- local signature to displaypublic void disableButtons()
public void enableButtons()
public boolean isDone()
public ProofBox getProofBox()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |