|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ptc.wgmecad.BrowseEditFileControl
Created by IntelliJ IDEA. User: barky Date: Dec 30, 2002 Time: 4:28:41 PM To change this template use Options | File Templates.
Nested Class Summary |
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 | |
private JButton |
browse
|
String |
browseText
|
private JTextField |
edit
|
static String |
FILE_PATH
an event the parent of this control can subscribe to |
private FileFilter |
filter
|
private LocationControl |
locationControl
|
(package private) static org.apache.log4j.Logger |
logger
|
private boolean |
selectDirectories
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
BrowseEditFileControl()
default constructor selects files and has no filtering. |
|
BrowseEditFileControl(FileFilter filter,
boolean selectDirectories,
LocationControl locationControl)
Adds some params for specialization |
Method Summary | |
void |
addFileSelectionListner(ActionListener listener)
allow parent controls to listen for events |
void |
addFocusListener(FocusListener l)
|
private void |
createComponents()
|
void |
filterForExtensions(String filterLabel,
String[] exts)
Create a filter and set it on this control filtering for the extensions passed in. |
String |
getText()
|
private void |
onBrowse()
|
void |
setMargin(Insets i)
|
void |
setText(String text)
|
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 FILE_PATH
private JTextField edit
private JButton browse
public String browseText
private boolean selectDirectories
private FileFilter filter
private LocationControl locationControl
static org.apache.log4j.Logger logger
Constructor Detail |
public BrowseEditFileControl()
public BrowseEditFileControl(FileFilter filter, boolean selectDirectories, LocationControl locationControl)
filter
- - optional paramterer - can be null - will be applied to the file-chooserselectDirectories
- - allows only the selection of directories if trueMethod Detail |
public void setMargin(Insets i)
private void createComponents()
public void addFileSelectionListner(ActionListener listener)
listener
- public void addFocusListener(FocusListener l)
public String getText()
public void setText(String text)
private void onBrowse()
public void filterForExtensions(String filterLabel, String[] exts)
filterLabel
- - what to display as the filter nameexts
- - an array of strings of extensions including the '.'. e.g. I18N.getStr( "Extension_txt" ), ".bak" etc. Note that there
can be no embeded '.'s in these extensions. ".foo.bak" will not work!
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |