com.sun.javatest.exec
public class InterviewEditor extends ToolDialog
Modifier and Type | Class and Description |
---|---|
static interface |
InterviewEditor.Observer
For private communication with SessionControl, not for broadcast outside
of core JT.
|
ToolDialog.Restorer
Modifier and Type | Field and Description |
---|---|
protected ContextManager |
contextManager |
static int |
DEFAULT_MODE |
protected java.lang.String |
ext |
static int |
FULL_MODE |
protected InterviewParameters |
mainConfig |
static int |
STD_CONCURRENCY_MODE |
static int |
STD_ENVIRONMENT_MODE |
static int |
STD_EXCLUDE_LIST_MODE |
static int |
STD_KEYWORDS_MODE |
static int |
STD_MODE |
static int |
STD_PRIOR_STATUS_MODE |
static int |
STD_TESTS_MODE |
static int |
STD_TIMEOUT_FACTOR_MODE |
static int |
TEMPLATE_FULL_MODE |
protected boolean |
templateMode
Deprecated.
|
protected InterviewParameters |
viewConfig |
DIALOG, FRAME, FREE, MODAL, MODAL_APPLICATION, MODAL_DOCUMENT, MODAL_TOOLKIT, parent, tool, uif
Constructor and Description |
---|
InterviewEditor(javax.swing.JComponent parent,
UIFactory uif,
InterviewParameters ip) |
InterviewEditor(javax.swing.JComponent parent,
UIFactory uif,
InterviewParameters ip,
ContextManager cm) |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(InterviewEditor.Observer o)
Registers new observer
|
static java.io.File |
checkLoadConfigFileDefaults(ContextManager cm)
Checks default settings relate to config file load fron the default location
|
void |
close() |
static void |
copy(InterviewParameters from,
InterviewParameters to) |
protected javax.swing.JMenu |
createFileMenu() |
void |
dispose()
Dispose of any window system resources used by the dialog.
|
void |
doClose() |
protected void |
doSave(java.io.File file)
Does actual save work.
|
void |
edit(int mode)
Show dialog.
|
static boolean |
equal(InterviewParameters a,
InterviewParameters b)
Compares two InterviewParameters objects for equivalence.
|
protected java.lang.String |
getExtention()
Returns extension for files to be saved.
|
int |
getFileChooserMode() |
protected java.lang.String |
getHistoryFileName()
Returns file name to store history of configuration files.
|
protected java.lang.String |
getRestorerWindowKey(boolean isFullView) |
protected void |
initGUI()
Initialize the GUI, by calling the various setXXX methods.
|
boolean |
isRunPending() |
void |
loadAndEdit(java.io.File f) |
void |
loadConfig()
Show choose file dialog and then load new file.
|
protected void |
loadConfig0(boolean ask)
Show choose file dialog and then load new file.
|
void |
loadConfigFromFile(java.io.File file)
Updates viewConfig, notifies observers of the change.
|
void |
newConfig()
Starts editing new config.
|
protected void |
notifyObservers()
Notifies registered observers of the change happened to viewConfig
|
protected void |
notifyObserversOfVisibility(boolean isVisible)
Notifies registered observers of setVisible() method has been called.
|
protected void |
perform(java.lang.String cmd) |
void |
removeObserver(InterviewEditor.Observer o)
Removes observer from the list
|
void |
revert() |
void |
save() |
void |
saveAs() |
void |
setCheckExcludeListListener(java.awt.event.ActionListener l) |
void |
setCustomRenderers(java.util.Map renderersMap) |
void |
setRunPending(boolean b) |
void |
setVisible(boolean isVisible)
Specify whether the dialog should be made visible on the screen or not.
|
void |
show() |
void |
show(java.awt.event.ActionListener closeListener) |
void |
show(int mode) |
void |
show(int mode,
java.awt.event.ActionListener closeListener,
boolean isTemplateMode) |
void |
updateMenu() |
protected void |
updateTitle() |
protected void |
windowClosingAction(java.awt.AWTEvent e)
this method invokes in Window/JInternalFrame listener (depends on dialog variable
instance).
|
disableDefaultDisposeHandler, getBody, getButtons, getDefaultButton, getDialogParent, getJMenuBar, getLocation, getRestorer, getSize, getTitle, getTool, isShowing, isVisible, pack, setBody, setButtons, setComponentListener, setDefaultCloseOperation, setHelp, setI18NTitle, setI18NTitle, setI18NTitle, setJMenuBar, setLocation, setLocation, setRestorer, setSize, setSize, setTool, setTool
public static final int DEFAULT_MODE
public static final int FULL_MODE
public static final int STD_MODE
public static final int STD_TESTS_MODE
public static final int STD_EXCLUDE_LIST_MODE
public static final int STD_KEYWORDS_MODE
public static final int STD_PRIOR_STATUS_MODE
public static final int STD_ENVIRONMENT_MODE
public static final int STD_CONCURRENCY_MODE
public static final int STD_TIMEOUT_FACTOR_MODE
public static final int TEMPLATE_FULL_MODE
@Deprecated protected boolean templateMode
protected ContextManager contextManager
protected InterviewParameters mainConfig
protected InterviewParameters viewConfig
protected java.lang.String ext
public InterviewEditor(javax.swing.JComponent parent, UIFactory uif, InterviewParameters ip)
public InterviewEditor(javax.swing.JComponent parent, UIFactory uif, InterviewParameters ip, ContextManager cm)
protected java.lang.String getExtention()
protected java.lang.String getHistoryFileName()
protected java.lang.String getRestorerWindowKey(boolean isFullView)
public void newConfig()
public void edit(int mode)
public int getFileChooserMode()
public void loadConfig()
protected void loadConfig0(boolean ask)
ask
- if true, dialog asking whether to save changes will appear
in case of unsaved changes.public void loadAndEdit(java.io.File f)
f
- public void loadConfigFromFile(java.io.File file)
file
- File to load.public void save()
public void saveAs()
protected void doSave(java.io.File file) throws Interview.Fault, java.io.IOException
Interview.Fault
java.io.IOException
public void revert()
public void setRunPending(boolean b)
public boolean isRunPending()
public void show()
public void updateMenu()
public void show(int mode)
public void show(java.awt.event.ActionListener closeListener)
public void show(int mode, java.awt.event.ActionListener closeListener, boolean isTemplateMode)
public void setVisible(boolean isVisible)
ToolDialog
setVisible
in class ToolDialog
isVisible
- True if the dialog should be made visible, false if is should
be made invisible.ToolDialog.isVisible()
public void close()
public void doClose()
protected void windowClosingAction(java.awt.AWTEvent e)
ToolDialog
windowClosingAction
in class ToolDialog
public void setCheckExcludeListListener(java.awt.event.ActionListener l)
public static boolean equal(InterviewParameters a, InterviewParameters b)
a
- first interviewb
- second interviewpublic void addObserver(InterviewEditor.Observer o)
o
- - observer to be added to the listpublic void removeObserver(InterviewEditor.Observer o)
o
- - observer to be removed from the listprotected void notifyObservers()
protected void notifyObserversOfVisibility(boolean isVisible)
public void dispose()
ToolDialog
dispose
in class ToolDialog
protected void initGUI()
ToolDialog
initGUI
in class ToolDialog
protected javax.swing.JMenu createFileMenu()
protected void updateTitle()
protected void perform(java.lang.String cmd)
public static void copy(InterviewParameters from, InterviewParameters to) throws Interview.Fault
Interview.Fault
public static java.io.File checkLoadConfigFileDefaults(ContextManager cm)
cm
- ContextManager
object defining current harness' context. The following methods
affect this method functionality:
getDefaultConfigLoadPath()
getAllowConfigLoadOutsideDefault()
IllegalArgumentException
- if the following configuration errors found:
getDefaultConfigLoadPath()
returns null
when getAllowConfigLoadOutsideDefault()
returns false
getDefaultConfigLoadPath()
returns not absolute path
getDefaultConfigLoadPath()
returns a file (not a directory)
ContextManager.setDefaultConfigLoadPath(java.io.File)
,
ContextManager.setAllowConfigLoadOutsideDefault(boolean state)
,
ContextManager.getDefaultConfigLoadPath()
,
ContextManager.getAllowConfigLoadOutsideDefault()
public void setCustomRenderers(java.util.Map renderersMap)
Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.