com.github.croesch.micro_debug.gui.actions
Class BrowsePathForTextFieldAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.github.croesch.micro_debug.gui.actions.BrowsePathForTextFieldAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public final class BrowsePathForTextFieldAction
extends AbstractAction

AbstractAction that opens a file chooser when performed and passes the result to a text component.

Since:
Date: Mar 9, 2012
Author:
croesch
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
BrowsePathForTextFieldAction(JTextComponent comp, Component p)
          Constructs this AbstractAction that opens a file chooser when performed and passes the result to a text component.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Opens a file chooser to browse the file and sets the result to the text component.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowsePathForTextFieldAction

public BrowsePathForTextFieldAction(JTextComponent comp,
                                    Component p)
Constructs this AbstractAction that opens a file chooser when performed and passes the result to a text component.

Parameters:
comp - the text component that'll received the fetched information from the file chooser
p - the parent component for adjusting the file chooser, may be null
Since:
Date: Mar 9, 2012
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Opens a file chooser to browse the file and sets the result to the text component.

Parameters:
e - the event that caused this action to be performed
Since:
Date: Mar 9, 2012


Copyright © 2012. All Rights Reserved.