Contents
- Description
- Method Summary
- Method Details
- title(String)
- instructions(String)
- testTimeOut(long)
- rows(int)
- rowsAdd(int)
- columns(int)
- screenCapture()
- logArea()
- logArea(int)
- testUI(PassFailJFrame.WindowCreator)
- positionTestUI(PassFailJFrame.PositionWindows)
- positionTestUIRightRow()
- positionTestUIRightColumn()
- positionTestUIRightColumnCentered()
- positionTestUIBottomRow()
- positionTestUIBottomRowCentered()
- positionTestUIBottomColumn()
- testUI(PassFailJFrame.WindowListCreator)
- testUI(Window)
- testUI(Window...)
- testUI(List)
- testUI(PassFailJFrame.PanelCreator)
- splitUI(PassFailJFrame.PanelCreator)
- splitUIRight(PassFailJFrame.PanelCreator)
- splitUIBottom(PassFailJFrame.PanelCreator)
- position(PassFailJFrame.Position)
- build()
Class PassFailJFrame.Builder
java.lang.Object
PassFailJFrame.Builder
- Enclosing class:
PassFailJFrame
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
columns
(int columns) Sets the number of columns for displaying the instruction text.instructions
(String instructions) logArea()
Adds a log area below the "Pass", "Fail" buttons.logArea
(int rows) Adds a log area below the "Pass", "Fail" buttons.position
(PassFailJFrame.Position position) positionTestUI
(PassFailJFrame.PositionWindows positionWindows) Adds an implementation ofPositionWindows
which the framework will use to position multiple test UI windows.Positions the test UI windows in a column to the bottom of the instruction frame.Positions the test UI windows in a row to the bottom of the instruction frame.Positions the test UI windows in a row to the bottom of the instruction frame centering the row of the windows.Positions the test UI windows in a column to the right of the instruction frame.Positions the test UI windows in a column to the right of the instruction frame centering the stack of the windows.Positions the test UI windows in a row to the right of the instruction frame.rows
(int rows) Sets the number of rows for displaying the instruction text.rowsAdd
(int rowsAdd) Adds a certain number of rows for displaying the instruction text.splitUI
(PassFailJFrame.PanelCreator panelCreator) Adds aPanelCreator
which the framework will use to create a component with test UI and display it in a split pane.splitUIBottom
(PassFailJFrame.PanelCreator panelCreator) Adds aPanelCreator
which the framework will use to create a component with test UI and display it in the bottom of instruction UI.splitUIRight
(PassFailJFrame.PanelCreator panelCreator) Adds aPanelCreator
which the framework will use to create a component with test UI and display it to the right of instruction UI.testTimeOut
(long testTimeOut) Adds an already created test UI window.Adds an array of already created test UI windows.Adds a list of already created test UI windows.testUI
(PassFailJFrame.PanelCreator panelCreator) Adds aPanelCreator
which the framework will use to create a component and place it into a dialog.testUI
(PassFailJFrame.WindowCreator windowCreator) Adds aWindowCreator
which the framework will use to create the test UI window.testUI
(PassFailJFrame.WindowListCreator windowListCreator) Adds aWindowListCreator
which the framework will use to create a list of test UI windows.
-
Method Details
-
title
-
instructions
-
testTimeOut
-
rows
Sets the number of rows for displaying the instruction text. The default value is the number of lines in the text plus 1:((int) instructions.lines().count() + 1)
.- Parameters:
rows
- the number of rows for instruction text- Returns:
- this builder
-
rowsAdd
Adds a certain number of rows for displaying the instruction text.- Parameters:
rowsAdd
- the number of rows to add to the number of rows- Returns:
- this builder
- See Also:
-
columns
Sets the number of columns for displaying the instruction text.- Parameters:
columns
- the number of columns for instruction text- Returns:
- this builder
-
screenCapture
-
logArea
Adds a log area below the "Pass", "Fail" buttons.The log area can be controlled by
PassFailJFrame.log(String)
,PassFailJFrame.logClear()
andPassFailJFrame.logSet(String)
.- Returns:
- this builder
-
logArea
Adds a log area below the "Pass", "Fail" buttons.The log area can be controlled by
PassFailJFrame.log(String)
,PassFailJFrame.logClear()
andPassFailJFrame.logSet(String)
.The number of columns is taken from the number of columns in the instructional JTextArea.
- Parameters:
rows
- of the log area- Returns:
- this builder
-
testUI
Adds aWindowCreator
which the framework will use to create the test UI window.- Parameters:
windowCreator
- aWindowCreator
to create the test UI window- Returns:
- this builder
- Throws:
IllegalArgumentException
- ifwindowCreator
isnull
IllegalStateException
- if a window creator or a list of test windows is already set
-
positionTestUI
Adds an implementation ofPositionWindows
which the framework will use to position multiple test UI windows.- Parameters:
positionWindows
- an implementation ofPositionWindows
to position multiple test UI windows- Returns:
- this builder
- Throws:
IllegalArgumentException
- if thepositionWindows
parameter isnull
IllegalStateException
- if thepositionWindows
field is already set
-
positionTestUIRightRow
Positions the test UI windows in a row to the right of the instruction frame. The top of the windows is aligned to that of the instruction frame.- Returns:
- this builder
-
positionTestUIRightColumn
Positions the test UI windows in a column to the right of the instruction frame. The top of the first window is aligned to that of the instruction frame.- Returns:
- this builder
-
positionTestUIRightColumnCentered
Positions the test UI windows in a column to the right of the instruction frame centering the stack of the windows.- Returns:
- this builder
-
positionTestUIBottomRow
Positions the test UI windows in a row to the bottom of the instruction frame. The left of the first window is aligned to that of the instruction frame.- Returns:
- this builder
-
positionTestUIBottomRowCentered
Positions the test UI windows in a row to the bottom of the instruction frame centering the row of the windows.- Returns:
- this builder
-
positionTestUIBottomColumn
Positions the test UI windows in a column to the bottom of the instruction frame. The left of the first window is aligned to that of the instruction frame.- Returns:
- this builder
-
testUI
Adds aWindowListCreator
which the framework will use to create a list of test UI windows.- Parameters:
windowListCreator
- aWindowListCreator
to create test UI windows- Returns:
- this builder
- Throws:
IllegalArgumentException
- ifwindowListCreator
isnull
IllegalStateException
- if a window creator or a list of test windows is already set
-
testUI
Adds an already created test UI window. The window is positioned and shown automatically.- Parameters:
window
- a test UI window- Returns:
- this builder
-
testUI
Adds an array of already created test UI windows.- Parameters:
windows
- an array of test UI windows- Returns:
- this builder
-
testUI
Adds a list of already created test UI windows.- Parameters:
windows
- a list of test UI windows- Returns:
- this builder
- Throws:
IllegalArgumentException
- ifwindows
isnull
or the list containsnull
IllegalStateException
- if a window creator or a list of test windows is already set
-
testUI
Adds aPanelCreator
which the framework will use to create a component and place it into a dialog.- Parameters:
panelCreator
- aPanelCreator
to create a component with test UI- Returns:
- this builder
- Throws:
IllegalStateException
- if split UI was enabled using asplitUI
method
-
splitUI
Adds aPanelCreator
which the framework will use to create a component with test UI and display it in a split pane.By default, horizontal orientation is used, and test UI is displayed to the right of the instruction UI.
- Parameters:
panelCreator
- aPanelCreator
to create a component with test UI- Returns:
- this builder
- Throws:
IllegalStateException
- if aPanelCreator
is already setIllegalArgumentException
- ifpanelCreator
isnull
-
splitUIRight
Adds aPanelCreator
which the framework will use to create a component with test UI and display it to the right of instruction UI.- Parameters:
panelCreator
- aPanelCreator
to create a component with test UI- Returns:
- this builder
- Throws:
IllegalStateException
- if aPanelCreator
is already setIllegalArgumentException
- ifpanelCreator
isnull
-
splitUIBottom
Adds aPanelCreator
which the framework will use to create a component with test UI and display it in the bottom of instruction UI.- Parameters:
panelCreator
- aPanelCreator
to create a component with test UI- Returns:
- this builder
- Throws:
IllegalStateException
- if aPanelCreator
is already setIllegalArgumentException
- ifpanelCreator
isnull
-
position
-
build
-