java.lang.Object |
↳ |
javax.swing.AbstractAction |
|
↳ |
org.mbari.awt.event.ActionAdapter |
|
|
↳ |
vars.query.ui.actions.SaveFramegrabsAction |
Class Overview
Use as:
// Create an array of URLS representing images that you want to save
URLS[] urls = new URL[]{new URL"http://someserver/somepath/image1.jpg"),
new URL("http://someserver/somepath/image2.png")};
// Initialize the action and set the parameters (URLs, and directory to save images to)
SaveFramegrabsAction action = new SaveFramegrabsAction();
action.setUrls(urls);
action.setSaveLocation("/Users/bob/someimages")
action.doAction();
Summary
[Expand]
Inherited Constants |
From interface
javax.swing.Action
String |
ACCELERATOR_KEY |
|
String |
ACTION_COMMAND_KEY |
|
String |
DEFAULT |
|
String |
DISPLAYED_MNEMONIC_INDEX_KEY |
|
String |
LARGE_ICON_KEY |
|
String |
LONG_DESCRIPTION |
|
String |
MNEMONIC_KEY |
|
String |
NAME |
|
String |
SELECTED_KEY |
|
String |
SHORT_DESCRIPTION |
|
String |
SMALL_ICON |
|
|
[Expand]
Inherited Fields |
From class
javax.swing.AbstractAction
protected
SwingPropertyChangeSupport |
changeSupport |
|
protected
boolean |
enabled |
|
|
Public Methods |
static
void
|
copy(URL src, File dst)
Copies the contents of a URL to a local file.
|
void
|
doAction()
|
static
boolean
|
doesImageExist(URL url)
Checks to see if the images is available at the url
|
void
|
setProgressMonitor(ProgressMonitor progressMonitor)
|
void
|
setSaveLocation(File saveLocation)
|
void
|
setUrls(URL[] urls)
Set the URL of to be downloaded.
|
[Expand]
Inherited Methods |
From class
org.mbari.awt.event.ActionAdapter
final
void
|
actionPerformed(ActionEvent arg0)
|
abstract
void
|
doAction()
|
|
From class
javax.swing.AbstractAction
synchronized
void
|
addPropertyChangeListener(PropertyChangeListener arg0)
|
Object
|
clone()
|
void
|
firePropertyChange(String arg0, Object arg1, Object arg2)
|
Object[]
|
getKeys()
|
synchronized
PropertyChangeListener[]
|
getPropertyChangeListeners()
|
Object
|
getValue(String arg0)
|
boolean
|
isEnabled()
|
void
|
putValue(String arg0, Object arg1)
|
synchronized
void
|
removePropertyChangeListener(PropertyChangeListener arg0)
|
void
|
setEnabled(boolean arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
java.awt.event.ActionListener
abstract
void
|
actionPerformed(ActionEvent arg0)
|
|
From interface
javax.swing.Action
abstract
void
|
addPropertyChangeListener(PropertyChangeListener arg0)
|
abstract
Object
|
getValue(String arg0)
|
abstract
boolean
|
isEnabled()
|
abstract
void
|
putValue(String arg0, Object arg1)
|
abstract
void
|
removePropertyChangeListener(PropertyChangeListener arg0)
|
abstract
void
|
setEnabled(boolean arg0)
|
|
From interface
org.mbari.awt.event.IAction
|
Constants
public
static
final
String
ACTION_NAME
Constant Value:
"Download Images"
Public Constructors
public
SaveFramegrabsAction
()
Public Methods
public
static
void
copy
(URL src, File dst)
Copies the contents of a URL to a local file.
Parameters
src
| The URL that we want to retrieve |
dst
| The destination to where we want to save the url. All intermediate
directories will be created as needed. |
public
static
boolean
doesImageExist
(URL url)
Checks to see if the images is available at the url
Returns
- true if the image can be downloaded. false otherwise.
public
void
setProgressMonitor
(ProgressMonitor progressMonitor)
public
void
setSaveLocation
(File saveLocation)
public
void
setUrls
(URL[] urls)
Set the URL of to be downloaded.
Parameters
urls
| A collection of URL objects. Each URL should correspond to a framegrab that is to be downloaded.
|