|
||||||||||
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 com.jbbres.lib.actions.tools.swing.JNewFileSelection
public class JNewFileSelection
An swing object that can be used to allow the user to select a file.
The object is composed of a JTextField
where the user can enter
the name of the file and a JComboBox
where he can select the
directory. the text field accepts the Variable
objects by drag
and drop, and the combo box display the list of the variables containing a
file, and allows the user to choose its own directory if he wishes so.
v1.1.0:
JXFileChooser
instead of JXFileChooser
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_FILE_NAME
The Constant PROPERTY_FILE_NAME. |
static java.lang.String |
PROPERTY_FOLDER
The Constant PROPERTY_FOLDER. |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 | |
---|---|
JNewFileSelection()
Create the JFileCreation . |
|
JNewFileSelection(java.io.File defaultFile)
Create the JFileCreation . |
|
JNewFileSelection(java.lang.String defaultPath)
Create the JFileCreation . |
|
JNewFileSelection(Workflow workflow)
Create the JFileCreation . |
|
JNewFileSelection(Workflow workflow,
java.io.File defaultFile)
Create the JFileCreation . |
|
JNewFileSelection(Workflow workflow,
java.io.File defaultFile,
boolean diplayPath)
Create the JFileCreation . |
|
JNewFileSelection(Workflow workflow,
java.lang.String defaultPath)
Create the JFileCreation . |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addActionListener(java.awt.event.ActionListener l)
Add a file selection listener. |
void |
addStaticFolder(java.io.File folder)
Add a static folder to the "in folder" list. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
void |
displayPath(boolean d)
If TRUE the whole path of the file will be display. |
void |
fireActionPerformed()
Reports a file selection. |
java.io.File |
getCurrentDirectory()
Returns the current directory. |
java.lang.String |
getFileName()
Gets the file name. |
java.lang.String |
getFileNamelabelText()
Returns the text displayed in front of the field where the user can input the file name. |
java.lang.String |
getFolderLabelText()
Returns the text displayed in front of the field where the user can select the destination folder. |
java.util.Properties |
getProperties()
|
java.io.File |
getSelectedDirectory()
Returns the selected directory. |
java.io.File |
getSelectedFile()
Returns the selected file. |
java.lang.String |
getSelectedFilePath()
Return the selected path. |
Workflow |
getWorkflow()
Gets the workflow. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
isEditable()
Returns the boolean indicating whether this Component is editable or not. |
boolean |
isPathDisplayed()
Return TRUE if the whole path of the file will be display. |
void |
removeActionListener(java.awt.event.ActionListener l)
Remove a file selection listener. |
void |
removeStaticFolder(java.io.File folder)
Remove a static folder. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
setCurrentDirectory(java.io.File dir)
Sets the current directory. |
void |
setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this Component should be editable. |
void |
setEnabled(boolean enabled)
|
void |
setFileName(java.lang.String fileName)
Sets the file name. |
void |
setFileNameLabelText(java.lang.String text)
Set the text displayed in front of the field where the user can input the file name. |
void |
setFolderLabelText(java.lang.String text)
Set the text displayed in front of the field where the user can input select the destination folder. |
void |
setProperties(java.util.Properties properties)
|
void |
setSelectedDirectory(java.io.File directory)
Sets the selected directory. |
void |
setSelectedFile(java.io.File file)
Sets the selected file. |
void |
setSelectedFilePath(java.lang.String path)
Set the current path and the current selected file. |
void |
setWorkflow(Workflow workflow)
Sets the workflow. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_FILE_NAME
public static final java.lang.String PROPERTY_FOLDER
Constructor Detail |
---|
public JNewFileSelection(Workflow workflow)
JFileCreation
.
workflow
- - Associated workflow.public JNewFileSelection(Workflow workflow, java.io.File defaultFile)
JFileCreation
.
workflow
- - Associated workflow.defaultFile
- - default filepublic JNewFileSelection(Workflow workflow, java.lang.String defaultPath)
JFileCreation
.
workflow
- - Associated workflow.defaultPath
- - Stringpublic JNewFileSelection()
JFileCreation
.setWorkflow
method.
public JNewFileSelection(java.lang.String defaultPath)
JFileCreation
.setWorkflow
method.
defaultPath
- - Stringpublic JNewFileSelection(java.io.File defaultFile)
JFileCreation
.setWorkflow
method.
defaultFile
- - Filepublic JNewFileSelection(Workflow workflow, java.io.File defaultFile, boolean diplayPath)
JFileCreation
.
workflow
- - Associated workflow.defaultFile
- - FilediplayPath
- - if TRUE
the whole path of the file is
displayed. Otherwise only the file name.Method Detail |
---|
public void setFileNameLabelText(java.lang.String text)
text
- - text to be displayed in front of the field where the user
can input the file namepublic java.lang.String getFileNamelabelText()
public java.lang.String getFolderLabelText()
public void setFolderLabelText(java.lang.String text)
text
- - text to be displayed in front of the field where the user
can select the destination folderpublic void setWorkflow(Workflow workflow)
workflow
- - the new workflowpublic Workflow getWorkflow()
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
public void setEditable(boolean editable)
editable
- - the boolean to be setpublic boolean isEditable()
public void addStaticFolder(java.io.File folder)
folder
- - folder to be addedremoveStaticFolder(java.io.File)
public void removeStaticFolder(java.io.File folder)
folder
- - folder to be removed.addStaticFolder(java.io.File)
public void setSelectedFilePath(java.lang.String path)
path
- (String) Path of the selected file.public java.lang.String getSelectedFilePath()
public void setSelectedFile(java.io.File file)
file
- the new selected filepublic java.io.File getSelectedFile()
null
public void displayPath(boolean d)
TRUE
the whole path of the file will be display.
d
- - If TRUE
the whole path of the file will be
displaypublic boolean isPathDisplayed()
TRUE
if the whole path of the file will be display.
public void setFileName(java.lang.String fileName)
fileName
- the new file namepublic java.lang.String getFileName()
public void setSelectedDirectory(java.io.File directory)
directory
- the new selected directorypublic java.io.File getSelectedDirectory()
public void setCurrentDirectory(java.io.File dir)
dir
- - the current directory to point topublic java.io.File getCurrentDirectory()
public java.util.Properties getProperties()
getProperties
in interface com.jbbres.lib.PropertiesOwner
public void setProperties(java.util.Properties properties)
setProperties
in interface com.jbbres.lib.PropertiesOwner
public void addActionListener(java.awt.event.ActionListener l)
l
- - FilesSelectionListenerpublic void removeActionListener(java.awt.event.ActionListener l)
l
- - FilesSelectionListenerpublic void fireActionPerformed()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |