|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.javatest.exec.BasicSessionControl
public class BasicSessionControl
Class that encapsulate logic of user's actions on update session: operations on configuration and work directory. Some methods are added to preserve old functionality...
| Nested Class Summary | |
|---|---|
protected class |
BasicSessionControl.E_EditorVisibility
Event to be sent out when Editor become visible/invisible |
protected class |
BasicSessionControl.SessionView
|
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
BasicSessionControl(javax.swing.JComponent parent,
UIFactory uif,
TestSuite ts,
ContextManager cm)
Creates a control over new created session for the passed test suite. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public BasicSessionControl(javax.swing.JComponent parent,
UIFactory uif,
TestSuite ts,
ContextManager cm)
throws Session.Fault
parent - uif - ts - cm -
Session.Fault| Method Detail |
|---|
public Session getSession()
getSession in interface ET_SessionControlpublic javax.swing.JComponent getViewComponent()
getViewComponent in interface ET_SessionControlpublic java.util.List<javax.swing.Action> getToolBarActionList()
ET_Control
getToolBarActionList in interface ET_Controlpublic void save(java.util.Map m)
ET_Control
save in interface ET_Controlpublic void restore(java.util.Map m)
ET_Control
restore in interface ET_Controlpublic 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.Faultpublic void ensureInterviewUpToDate()
public void startTests(Parameters p)
startTests in interface ET_RunTestControl.Observerpublic void finishTests(Parameters p)
finishTests in interface ET_RunTestControl.Observerpublic 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_Controlprotected boolean initEditor()
protected InterviewEditor createInterviewEditor(InterviewParameters ip)
ip - parameters to be editedprotected UIFactory getUIFactory()
public void edit()
edit in interface ET_SessionControlpublic void configure()
configure in interface ET_SessionControlpublic boolean isConfiguring()
isConfiguring in interface ET_SessionControlprotected 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_Controlprotected boolean isEditorVisible()
public void changed(InterviewParameters p)
changed in interface InterviewEditor.Observerp -
public void changedVisibility(boolean isVisible,
InterviewEditor editor)
changedVisibility in interface InterviewEditor.ObserverisVisible - - 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.Faultpublic void updated(Session.Event ev)
Session.Observer
updated in interface Session.Observerev - - Event describing the change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||