public class GEntryFileName extends GContainer implements GDisplay, GReadWrite, GListener, GClear
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GEntryFileName()
Constructor by default.
|
GEntryFileName(String widgetId,
boolean isRelative,
String label,
String iniVal,
String varName,
int width,
String titleFileChooser,
String description,
String suffix)
Constructor
|
GEntryFileName(String label,
String value)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(GEvent e)
Called after the event is processed.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
clear()
Called when the element is to be cleared, so it can perform the actions required to return to the last
saved/loaded values.
|
static String |
correctFileName(String iniName,
String iniLocalDir)
Method to extract the relative name with "/" rather than "\" and to test also if the file exists !
|
static String |
correctFileName(String iniName,
String iniLocalDir,
boolean testExist)
Method to extract the relative name with "/" rather than "\" and to test also if the file exists !
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
generic()
The prototype of the generic function that shall exist in all the descendants.
|
File |
getFile()
Method to get the selected file.
|
String |
getFileName()
Method to get the selected file name.
|
GIntervalAbstract.GStatus |
getStatus()
Get the status of the widget.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
static File |
selectFileWithChooser(int type,
String iniPath,
boolean blockDir,
String title,
String tooltipTex,
String description,
String suffix)
Opens a JFileChooser to select a file.
|
void |
setForcedStatus(GIntervalAbstract.GStatus status)
Set the status of the widget.
|
void |
updateStatus()
Update the status of the field applying the defined file name.
|
void |
write()
Implementaion of the routines that allow the component to be saved to a configuration file.
|
putactivateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setEnabled, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GEntryFileName(String widgetId, boolean isRelative, String label, String iniVal, String varName, int width, String titleFileChooser, String description, String suffix)
widgetId - Identifier of the widgetisRelative - Relative name if true (absolute else)label - labeliniVal - initial valuevarName - variable name in the XML filewidth - entry area widthtitleFileChooser - title of the file chooser paneldescription - description of the type of files to searchsuffix - suffix of the filespublic GEntryFileName()
public void display()
throws GException
GDisplaydisplay in interface GDisplayGException - in case of problem while reading the value from file.public void generic()
throws GException
GContainergeneric in class GContainerGException - In case of problem.public void read()
throws GException
GReadWriteread in interface GReadWriteGException - in case of problem while reading the value from file.public void write()
throws GException
GReadWritewrite in interface GReadWriteGException - in case of problem while writing the value to file.public void before(GEvent e) throws GException
GListenerbefore in interface GListenere - event to processed.GException - in case there is a problem managing the event.public void after(GEvent e) throws GException
GListenerafter in interface GListenere - processed event.GException - in case there is a problem managing the event.public void updateStatus()
public void setForcedStatus(GIntervalAbstract.GStatus status)
setForcedStatus in class GComponentstatus - the new status of the widget.public GIntervalAbstract.GStatus getStatus()
getStatus in class GComponentpublic void clear()
throws GException
GClearclear in interface GClearGException - in case of problem while clearing the values.public static File selectFileWithChooser(int type, String iniPath, boolean blockDir, String title, String tooltipTex, String description, String suffix)
type - JFileChooser typeiniPath - initial directory pathblockDir - block inside the directory path if truetitle - sub window titletooltipTex - tooltip textdescription - descriptionsuffix - file suffix (may be null)public static String correctFileName(String iniName, String iniLocalDir)
iniName - initial file full nameiniLocalDir - local directory pathpublic static String correctFileName(String iniName, String iniLocalDir, boolean testExist)
iniName - initial file full nameiniLocalDir - local directory pathtestExist - test if the file exists if truepublic String getFileName()
public File getFile()
Copyright © 2024. All rights reserved.