|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.netbeans.modules.vcscore.util.VariableInputDialog
Dialog that enables users to set variable values before running the command.
Nested Class Summary | |
static interface |
VariableInputDialog.FilePromptDocumentListener
|
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 | |
static String |
PROP_VAR_CHANGED
This property (which name has the variable name appended) is fired when a variable value has changed. |
static String |
PROP_VARIABLES_CHANGED
This property (which name has the variable name appended) is fired when a variable value has changed. |
static String |
VAR_AUTO_FILL
The name of the variable, that contains pairs of variables and commands. |
static String |
VAR_CANCEL_DIALOG_BY_PRECOMMAND
When the value of this variable is true, the dialog will be canceled. |
static String |
VAR_PLEASE_WAIT_TEXT
The suffix of a variable name, that is checked for the text that is presented to the user while the pre-command is running. |
static String |
VAR_UPDATE_CHANGED_FROM_SELECTOR
When a map of variables contains this one (with value of true )
after the selector command finish, the components are updated with values
of returned variables. |
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.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
VariableInputDialog(VcsDescribedCommand dcmd,
VariableInputDescriptor inputDescriptor,
boolean expert,
Hashtable vars)
Creates new form VariableInputDialog. |
|
VariableInputDialog(VcsDescribedCommand dcmd,
VariableInputDescriptor inputDescriptor,
boolean expert,
Hashtable vars,
boolean rapidVariablesAssignment,
boolean dynamicVarChanges)
Creates new form VariableInputDialog. |
Method Summary | |
void |
addCloseListener(ActionListener closeListener)
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
ActionListener |
getActionListener()
|
VariableInputDialog.FilePromptDocumentListener |
getFilePromptDocumentListener()
|
VariableInputDescriptor |
getGlobalInputDescriptor()
Get the global input decriptor from which this dialog was created. |
Component |
getInitialFocusedComponent()
Get the component, that should have the initial focus in this dialog. |
VariableInputDescriptor |
getInputDescriptor()
Get the input decriptor from which this dialog was created. |
boolean |
getPromptForEachFile()
Whether to prompt for variables for each file separately or use these variables for all files. |
Hashtable |
getUserParamsValuesTable()
Get the table of additional user variables labels and values. |
String[] |
getVarAskValues()
Get the variable ask values. |
JPanel |
getVariableInputPanel()
Getter for the variable input panel. |
String[] |
getVarPromptValues()
Get the variable prompt values. |
boolean |
hasDefaults()
Tests currently edited values for being usable as defaults. |
boolean |
isValidInput()
Test, whether the input in this dialog is valid and variables can be assigned. |
void |
processActions()
|
void |
setCmdName(String cmdDisplayName)
|
void |
setComponentsToPreprocess(List componentsToPreprocess)
|
void |
setExec(String exec)
Deprecated. nop method |
void |
setExecutionContext(CommandExecutionContext executionContext,
Hashtable vars)
Set the VCS file system, that is needed to execute the selector command and the variables table. |
void |
setFilePromptDocumentListener(VariableInputDialog.FilePromptDocumentListener docListener)
|
void |
setFilePromptDocumentListener(VariableInputDialog.FilePromptDocumentListener docListener,
Object docIdentif)
|
void |
setGlobalInput(VariableInputDescriptor inputDescriptor)
|
void |
setPromptEach(boolean prompt)
Set whether the initial state of the check box for prompt on next file. |
void |
setUserParamsPromptLabels(Table varLabels,
String advancedName)
Create additional user labels and text fields. |
void |
showPromptEach(boolean show)
Set whether to show check box for prompt on next file. |
void |
storeDefaults()
Takes currently edited values and store them as new defaults. |
void |
updateVariableValues(Hashtable vars)
Use this method to supply new variable values to the components. |
void |
updateVariableValuesSubset(Hashtable vars)
Use this method to supply some new variable values to the components. |
VariableInputValidator |
validateComponents()
|
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 |
public static final String VAR_UPDATE_CHANGED_FROM_SELECTOR
true
)
after the selector command finish, the components are updated with values
of returned variables.
public static final String VAR_CANCEL_DIALOG_BY_PRECOMMAND
public static final String VAR_PLEASE_WAIT_TEXT
public static final String PROP_VAR_CHANGED
public static final String PROP_VARIABLES_CHANGED
public static final String VAR_AUTO_FILL
Constructor Detail |
public VariableInputDialog(VcsDescribedCommand dcmd, VariableInputDescriptor inputDescriptor, boolean expert, Hashtable vars)
dcmd
- the command that is subject of customizationinputDescriptor
- the input descriptorexpert
- the expert modevars
- the filesystem variablespublic VariableInputDialog(VcsDescribedCommand dcmd, VariableInputDescriptor inputDescriptor, boolean expert, Hashtable vars, boolean rapidVariablesAssignment, boolean dynamicVarChanges)
dcmd
- the command that is subject of customizationinputDescriptor
- the input descriptorexpert
- the expert modevars
- the filesystem variablesrapidVariablesAssignment
- If true, assign the variable values as soon as possible,
even before the user has finished explicitely the input (by focus lost, etc.).
Currently this makes any difference only for textfields, which listen on key typed
events and update the variables immediately.dynamicVarChanges
- Whether the variables might be updated via updateVariableValues(java.util.Hashtable)
method. The components will count with the possibility that the variable values
can change and therefore a more "interactive" mode will be set.Method Detail |
public void setFilePromptDocumentListener(VariableInputDialog.FilePromptDocumentListener docListener)
public void setFilePromptDocumentListener(VariableInputDialog.FilePromptDocumentListener docListener, Object docIdentif)
public void setCmdName(String cmdDisplayName)
public VariableInputDialog.FilePromptDocumentListener getFilePromptDocumentListener()
public VariableInputDescriptor getInputDescriptor()
null
.public VariableInputDescriptor getGlobalInputDescriptor()
null
.public Component getInitialFocusedComponent()
public final void storeDefaults()
public final boolean hasDefaults()
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
public VariableInputValidator validateComponents()
public ActionListener getActionListener()
public void addCloseListener(ActionListener closeListener)
public void processActions()
public boolean isValidInput()
public void setExecutionContext(CommandExecutionContext executionContext, Hashtable vars)
public void updateVariableValues(Hashtable vars)
public void updateVariableValuesSubset(Hashtable vars)
updateVariableValues(java.util.Hashtable)
method).
If you gonna call this method, you should create this object via
the constructor with "dynamicVarChanges" field, where you should
pass "true". Otherwise some components might not be updated correctly.
public void setExec(String exec)
public void setGlobalInput(VariableInputDescriptor inputDescriptor)
public void setUserParamsPromptLabels(Table varLabels, String advancedName)
varLabels
- Table of labels and default values.public void showPromptEach(boolean show)
show
- true to show, false not to showpublic void setPromptEach(boolean prompt)
prompt
- the initial statepublic String[] getVarPromptValues()
public String[] getVarAskValues()
public JPanel getVariableInputPanel()
public Hashtable getUserParamsValuesTable()
public boolean getPromptForEachFile()
public void setComponentsToPreprocess(List componentsToPreprocess)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |