public class BasicSessionControl extends java.lang.Object implements InterviewEditor.Observer, ET_RunTestControl.Observer, ET_SessionControl, Session.Observer
Modifier and Type | Class and Description |
---|---|
protected class |
BasicSessionControl.E_EditorVisibility
Event to be sent out when Editor become visible/invisible
|
protected class |
BasicSessionControl.SessionView |
Modifier and Type | Field and Description |
---|---|
protected ContextManager |
cm |
protected InterviewEditor |
interviewEditor |
protected javax.swing.JComponent |
parent |
protected SessionExt |
session |
protected javax.swing.JPanel |
sessionView |
protected TestSuite |
testSuite |
protected UIFactory |
uif |
Constructor and Description |
---|
BasicSessionControl(javax.swing.JComponent parent,
UIFactory uif,
TestSuite ts,
ContextManager cm)
Creates a control over new created session for the passed test suite.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyWorkDir(WorkDirectory wd)
Applies value of the selected work directory.
|
void |
changed(InterviewParameters p)
InterviewEditor.Observer method.
|
void |
changedVisibility(boolean isVisible,
InterviewEditor editor)
InterviewEditor.Observer method.
|
protected void |
checkExcludeListUpdate(javax.swing.JComponent parent,
boolean quietIfNoUpdate,
Parameters params) |
static Parameters |
clone(Parameters p)
Clones passed parameters.
|
void |
configure()
Causes a series of actions to be performed to complete configuration:
If session is already ready - does nothing. If work directory is not set - suggests creating or opening one Opens configuration editor. |
protected SessionExt |
createEmptySession()
Creates an empty configuration for the test suite.
|
protected InterviewEditor |
createInterviewEditor(InterviewParameters ip)
Creates an InterviewEditor instance.
|
protected ToolAction |
createNewWorkDirAction() |
protected javax.swing.JPanel |
createSessionView() |
protected ToolAction |
createSetWorkDirAction() |
protected boolean |
createWD()
Causes the dialog for new directory creating to appear.
|
void |
dispose() |
void |
edit()
Causes configuration editor to appear.
|
void |
ensureInterviewUpToDate() |
void |
finishTests(Parameters p)
Invoked when runTestHandler completed test execution
|
javax.swing.JMenu |
getMenu()
Returts menu to be added to the menu mar
|
protected boolean |
getNeedToAutoCheckExcludeList(Parameters params) |
Session |
getSession()
Returns the session object under control
|
java.util.List<javax.swing.Action> |
getToolBarActionList()
Returns list of actions to be added to the tool bar
|
protected UIFactory |
getUIFactory()
Method returning UIFactory to be used to create InterviewEditor instance.
|
javax.swing.JComponent |
getViewComponent()
Returns the panel reflecting the current state of the session
|
protected void |
initActions() |
protected boolean |
initEditor()
Initializes interviewEditor.
|
protected void |
initHistoryListeners() |
boolean |
isConfiguring() |
protected boolean |
isEditorVisible() |
void |
restore(java.util.Map m)
Restores saved state from the map
|
void |
restoreConfigFromWD(WorkDirectory wd)
Tries to restore latest available configuration for the session.
|
void |
save(java.util.Map m)
Saves current state to the map
|
protected boolean |
setWD()
Causes the dialog for work directory selecting to appear.
|
protected void |
showConfigureDialog() |
protected void |
showWorkDirDialog() |
void |
startTests(Parameters p)
Invoked when runTestHandler is going to start test execution
|
void |
updated(Session.Event ev)
Invoked when state of config has changed
|
void |
updateGUI()
Invoked when some change has happened
|
void |
whatToDoWhenConfigNotReadyButUserPressedStartButton(javax.swing.Action startAction) |
protected final SessionExt session
protected final TestSuite testSuite
protected UIFactory uif
protected javax.swing.JComponent parent
protected javax.swing.JPanel sessionView
protected InterviewEditor interviewEditor
protected ContextManager cm
public BasicSessionControl(javax.swing.JComponent parent, UIFactory uif, TestSuite ts, ContextManager cm) throws Session.Fault
parent
- uif
- ts
- cm
- Session.Fault
public Session getSession()
getSession
in interface ET_SessionControl
public javax.swing.JComponent getViewComponent()
getViewComponent
in interface ET_SessionControl
public java.util.List<javax.swing.Action> getToolBarActionList()
ET_Control
getToolBarActionList
in interface ET_Control
public void save(java.util.Map m)
ET_Control
save
in interface ET_Control
public void restore(java.util.Map m)
ET_Control
restore
in interface ET_Control
public void dispose()
dispose
in interface ET_Control
protected SessionExt createEmptySession() throws Session.Fault
Session.Fault
public static Parameters clone(Parameters p) throws Session.Fault
p
- instance to clone, might be null.Session.Fault
public void ensureInterviewUpToDate()
public void startTests(Parameters p)
startTests
in interface ET_RunTestControl.Observer
public void finishTests(Parameters p)
finishTests
in interface ET_RunTestControl.Observer
public void whatToDoWhenConfigNotReadyButUserPressedStartButton(javax.swing.Action startAction)
protected void checkExcludeListUpdate(javax.swing.JComponent parent, boolean quietIfNoUpdate, Parameters params)
protected boolean getNeedToAutoCheckExcludeList(Parameters params)
public javax.swing.JMenu getMenu()
ET_Control
getMenu
in interface ET_Control
protected boolean initEditor()
protected InterviewEditor createInterviewEditor(InterviewParameters ip)
ip
- parameters to be editedprotected UIFactory getUIFactory()
public void edit()
edit
in interface ET_SessionControl
public void configure()
configure
in interface ET_SessionControl
public boolean isConfiguring()
isConfiguring
in interface ET_SessionControl
protected void showWorkDirDialog()
protected void showConfigureDialog()
protected void initActions()
protected ToolAction createNewWorkDirAction()
protected ToolAction createSetWorkDirAction()
protected void initHistoryListeners()
protected javax.swing.JPanel createSessionView()
public void updateGUI()
ET_Control
updateGUI
in interface ET_Control
protected boolean isEditorVisible()
public void changed(InterviewParameters p)
changed
in interface InterviewEditor.Observer
p
- public void changedVisibility(boolean isVisible, InterviewEditor editor)
changedVisibility
in interface InterviewEditor.Observer
isVisible
- - true or falseeditor
- editor that changed the stateprotected boolean createWD()
protected boolean setWD()
protected void applyWorkDir(WorkDirectory wd)
wd
- public void restoreConfigFromWD(WorkDirectory wd) throws Session.Fault
wd
- Session.Fault
public void updated(Session.Event ev)
Session.Observer
updated
in interface Session.Observer
ev
- - Event describing the changeCopyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.