public class PathInputPart extends AbstractPart
Use setForSaveAs(boolean) to specify if the path is for saving
a file (by default it is assumed the path is for saving a file). That choice
affect which browsing dialog is invoked when using the browse button.
container, enabledOnSelection, labelFlushed, labelNextToInput, masterPart, paramDescriptor, vertical, withLabel| Constructor and Description |
|---|
PathInputPart(ParameterDescriptor paramDescriptor,
String browseTitle,
boolean forSaveAs)
Creates a new PathInputPart object with a given parameter descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkType()
Checks the types supported by this UI part.
|
String |
getBrowseTitle()
Gets the title of the path browsing dialog.
|
String |
getFilterExtensions()
Gets the extensions to use for the browse filter.
|
String |
getFilterNames()
Gets the names to used for the browse filter.
|
boolean |
isAllowEmpty()
Indicates if the input text can be empty.
|
boolean |
isForSaveAs()
Indicates if the path is to save a file (vs to open one).
|
void |
setAllowEmpty(boolean allowEmpty)
Sets the flag indicating if the input text can be empty.
|
void |
setBrowseFilters(String filterNames,
String filterExtensions)
Sets the names and extensions to use for the browse filter.
|
void |
setBrowseTitle(String browseTitle)
Sets the title of the path browsing dialog.
|
void |
setForSaveAs(boolean forSaveAs)
Sets the flag indicating if the path is to save a file (vs to open one).
|
getContainer, getDisplayName, getMasterPart, getName, getParent, getReadMethod, getShortDescription, getType, getWriteMethod, isEnabledOnSelection, isLabelFlushed, isLabelNextToInput, isVertical, isWithLabel, setContainer, setDisplayName, setLabelFlushed, setLabelNextToInput, setMasterPart, setShortDescription, setVertical, setWithLabelpublic PathInputPart(ParameterDescriptor paramDescriptor, String browseTitle, boolean forSaveAs)
paramDescriptor - the parameter descriptor for this UI part.browseTitle - the title to use for the path browsing dialog.forSaveAs - true if the path is to save a file (vs to open one).protected void checkType()
AbstractPartcheckType in class AbstractPartpublic String getFilterNames()
public String getFilterExtensions()
public void setBrowseFilters(String filterNames, String filterExtensions)
"Documents (*.txt;*.odt)\tAll Files (*.*)" and
*.txt;*.odt\t*.*".filterNames - the names to use for the browse filter.filterExtensions - the extensions to use for the browse filter.public String getBrowseTitle()
public void setBrowseTitle(String browseTitle)
browseTitle - the new title of the path browsing dialog.public boolean isForSaveAs()
public void setForSaveAs(boolean forSaveAs)
forSaveAs - true if the path is to save a file (vs to open one).public boolean isAllowEmpty()
public void setAllowEmpty(boolean allowEmpty)
allowEmpty - true if the input text can be empty, false otherwise.Copyright © 2021. All rights reserved.