java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
nl.eelkespaak.gui.JFileField
public class JFileField
This component provides a text field for the manual input of a file, as well as an associated 'Browse' button, allowing the user to browse for a file and have its location show up automatically in the text field.
JFileChooser,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
JFileField()
Creates new form JFileField |
|
| Method Summary | |
|---|---|
int |
getBaseline(int w,
int h)
Implemented to make layout managers align the JFileField on the baseline of the included text field, rather than on the absolute bottom of the JPanel. |
String |
getExtensionFilter()
Returns the extension filter (a comma-separated string of extensions) that the JFileChooser should use when browsing for a file. |
int |
getFileSelectionMode()
Returns the file selection mode to be used by the JFileChooser. |
String |
getFileTypeName()
Returns the description of the file types the JFileChooser should be browsing for. |
String |
getText()
Returns the value of the text field. |
void |
setExtensionFilter(String extensionFilter)
Sets the extension filter (a comma-separated string of extensions) that the JFileChooser should use when browsing for a file. |
void |
setFileSelectionMode(int fileSelectionMode)
Sets the file selection mode to be used by the JFileChooser. |
void |
setFileTypeName(String fileTypeName)
Sets the description of the file types the JFileChooser should be browsing for. |
void |
setText(String text)
Sets the value of the text field. |
| 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 |
| Constructor Detail |
|---|
public JFileField()
| Method Detail |
|---|
public String getText()
public void setText(String text)
the - value to put in the text fieldpublic String getExtensionFilter()
public void setExtensionFilter(String extensionFilter)
extensionFilter - the extension filterpublic String getFileTypeName()
public void setFileTypeName(String fileTypeName)
fileTypeName - the file type descriptionpublic int getFileSelectionMode()
JFileChooser.getFileSelectionMode()public void setFileSelectionMode(int fileSelectionMode)
fileSelectionMode - the type of files to be displayedJFileChooser.setFileSelectionMode(int)
public int getBaseline(int w,
int h)
getBaseline in class JComponentw - h -