com.mindtree.techworks.insight.gui.action
Class LoadLocalFileAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.mindtree.techworks.insight.gui.action.LoadLocalFileAction
All Implemented Interfaces:
ReceiverListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class LoadLocalFileAction
extends javax.swing.AbstractAction
implements ReceiverListener

The LoadLocalFileAction class is an AbstractAction derivative that provides ability to load files from the local or mounted file systems. Provide a file chooser that may be used to load log files into the Insight.

Version:
1.0, 04/10/25
Author:
Regunath B
See Also:
Insight, 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
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Overriden super class method
 void addNamespaceForLoad(LogNamespace namespace)
          Adds the specified LogNamespace for load
 void browseAndLoadLocalFiles()
          Displays a JFileChooser for loacl and mounted file systems.
 void endLoadEventNotification(LogNamespace[] namespaces, int infoFlag)
          ReceiverListener interface method implementation.
static LoadLocalFileAction getInstance()
          Accessor method to obtain instance of this class
 AbstractReceiver getReceiver()
          Returns the currently active AbstractReceiver, if any, or null otherwise
 void initialize(Insight insightInstance)
          Initializes this LoadFileAction the first time.
 void loadNamespaces()
          Loads the LogNamespace(s) that have been added for load
 void LoadOnFileSelection(java.lang.String fileName)
          Launches insight with the log file passed.
 void startLoadEventNotification(LogNamespace[] namespaces)
          ReceiverListener interface method implementation.
 void startupReceiver(LogNamespace namespace)
          Starts up the Receiver with the specified parameters
 
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
 

Method Detail

getInstance

public static final LoadLocalFileAction getInstance()
Accessor method to obtain instance of this class

Returns:
singleton instance of this class

initialize

public void initialize(Insight insightInstance)
Initializes this LoadFileAction the first time. Subsequent calls are ignored

Parameters:
insightInstance - the Insight that created an instance of this class

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Overriden super class method

Specified by:
actionPerformed in interface java.awt.event.ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

startupReceiver

public void startupReceiver(LogNamespace namespace)
Starts up the Receiver with the specified parameters

Parameters:
namespace - the LogNamespace for load

startLoadEventNotification

public void startLoadEventNotification(LogNamespace[] namespaces)
ReceiverListener interface method implementation.

Specified by:
startLoadEventNotification in interface ReceiverListener
Parameters:
namespaces - LogNamespace of the Files or sources that the Receiver has started interpreting
See Also:
ReceiverListener.startLoadEventNotification(LogNamespace[])

endLoadEventNotification

public void endLoadEventNotification(LogNamespace[] namespaces,
                                     int infoFlag)
ReceiverListener interface method implementation.

Specified by:
endLoadEventNotification in interface ReceiverListener
Parameters:
namespaces - LogNamespace s of the Files or sources that the Receiver has interpreted.
infoFlag - flag identifier that denotes the status of the load operation
See Also:
ReceiverListener.endLoadEventNotification(LogNamespace[], int)

addNamespaceForLoad

public void addNamespaceForLoad(LogNamespace namespace)
Adds the specified LogNamespace for load

Parameters:
namespace - the LogNamespace for load

loadNamespaces

public void loadNamespaces()
Loads the LogNamespace(s) that have been added for load

See Also:
addNamespaceForLoad(LogNamespace)

browseAndLoadLocalFiles

public void browseAndLoadLocalFiles()
Displays a JFileChooser for loacl and mounted file systems. The selected files are loaded into Insight.


LoadOnFileSelection

public void LoadOnFileSelection(java.lang.String fileName)
Launches insight with the log file passed.

Parameters:
fileName - - log file's absolute path.

getReceiver

public AbstractReceiver getReceiver()
Returns the currently active AbstractReceiver, if any, or null otherwise

Returns:
Returns null or the receiver.


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.