|
||||||||||
| 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
edu.neu.ccs.gui.DisplayPanel
edu.neu.ccs.gui.TablePanel
edu.neu.ccs.jpf.MethodGUI
This class implements the GUI for a Method that is non-trivial, that is, has a return value and/or non-trivial parameters.
As of 2.5.0, uses requestObject rather than
demandObject internally so a user may cancel
evaluation if a parse error is detected while reading one
of the method parameters.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
(package private) JPFApplication |
application
The associated JPFApplication. |
protected Action |
evaluate
The evaluate action. |
protected JButton |
evaluateButton
The evaluate button. |
private static int |
gapSize
The gap between cells in the GUI. |
private static int |
maxCols
The maximum number of columns. |
protected Method |
method
The method used to define this MethodGUI. |
private static int |
minTFVWidth
The minimum text field view width. |
protected String |
name
The method name. |
protected int |
orientation
The MethodGUI orientation. |
protected PaintSwatch |
paintView
The return view for Paint. |
protected String[] |
parameterTypeNames
The parameter type names. |
protected Class[] |
parameterTypes
The parameter types. |
protected TypedView[] |
parameterViews
The parameter views. |
protected Class |
returnType
The return type. |
protected String |
returnTypeName
The return type name. |
protected TypedView |
returnView
The return view for everything but Paint. |
private static int |
swatchSize
The size of a paint swatch. |
private static int |
TFVWidth
The text field view width. |
| Fields inherited from class edu.neu.ccs.gui.TablePanel |
DEFAULT_ALIGNMENT, DEFAULT_ORIENTATION, tg |
| Fields inherited from class edu.neu.ccs.gui.DisplayPanel |
background, codec, CODEC |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface edu.neu.ccs.console.ConsoleAware |
console |
| Fields inherited from interface edu.neu.ccs.gui.Displayable |
DEFAULT_VIEW_STATE, VIEW_STATE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
protected |
MethodGUI(JPFApplication application,
Method method)
Constructs the MethodGUI using the given Method. |
protected |
MethodGUI(JPFApplication application,
Method method,
int orientation)
Constructs the MethodGUI using the given Method and orientation. |
| Method Summary | |
protected void |
buildHorizontalGUI()
Install the views in the GUI using a horizontal arrangement. |
protected void |
buildParameterViews()
Build the array of views for the method parameters. |
protected void |
buildReturnView()
Build the view for the return value. |
protected void |
buildTable()
Build the GUI TablePanel. |
protected void |
buildVerticalGUI()
Install the views in the GUI using a vertical arrangement. |
protected JComponent |
createActionIcon()
|
protected void |
createEvaluate()
Create the evaluate action for the Evaluate button in the GUI. |
protected JComponent |
createInputIcon()
|
protected JComponent |
createOutputIcon()
|
protected void |
createReturnView(Class c)
Return a typed view appropriate for the given class that is specific for return values. |
protected TypedView |
createView(Class c)
Return a typed view appropriate for the given class that may do input or return values. |
protected void |
evaluate()
The evaluate method executed by the evaluate action. |
protected void |
evaluateVoid()
The evaluate method in the case of void return. |
protected void |
evaluateWithReturn()
The evaluate method in the case of non-void return. |
protected void |
extractInformation()
Extract the important information about the method. |
protected Object |
extractParameterValue(TypedView view,
Class c)
Return the user input as an object from the typed view being used to obtain data for the given class. |
protected Object[] |
extractParameterValues()
Return the array of user input values from the parameter views. |
protected String |
getErrorPrompt(Class c)
Return an error prompt customized for the given class. |
protected Object |
getReturnView()
Return the current view for the return type object. |
protected void |
setSizeParameters()
Set the text field view width and the maximum columns. |
protected void |
showReturnValue(Object value)
Display the return value in the return view. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
JPFApplication application
protected Method method
protected String name
protected Class returnType
protected String returnTypeName
protected Class[] parameterTypes
protected String[] parameterTypeNames
protected int orientation
protected TypedView[] parameterViews
protected TypedView returnView
protected PaintSwatch paintView
protected Action evaluate
protected JButton evaluateButton
private static int minTFVWidth
private static int TFVWidth
private static int maxCols
private static int gapSize
private static int swatchSize
| Constructor Detail |
protected MethodGUI(JPFApplication application,
Method method)
protected MethodGUI(JPFApplication application,
Method method,
int orientation)
| Method Detail |
protected void extractInformation()
protected void buildTable()
protected void buildVerticalGUI()
protected void buildHorizontalGUI()
protected TypedView createView(Class c)
protected void createReturnView(Class c)
protected void buildParameterViews()
protected void buildReturnView()
protected Object getReturnView()
protected String getErrorPrompt(Class c)
protected JComponent createInputIcon()
protected JComponent createActionIcon()
protected JComponent createOutputIcon()
protected Object extractParameterValue(TypedView view,
Class c)
throws CancelledException
CancelledException
protected Object[] extractParameterValues()
throws CancelledException
CancelledExceptionprotected void showReturnValue(Object value)
protected void createEvaluate()
protected void evaluate()
protected void evaluateVoid()
protected void evaluateWithReturn()
protected void setSizeParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||