net.pandoragames.far.ui.swing.component.listener
Class ActionView

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.pandoragames.far.ui.swing.component.listener.ActionView
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Resetable

public class ActionView
extends javax.swing.AbstractAction
implements java.awt.event.MouseListener, Resetable

Opens the "viewer" that visualises the matches of a (regex) search pattern. The pattern is taken from the currently active form, FindForm or ReplaceForm.

Author:
Olivier Wehner
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, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionView(javax.swing.JFrame rootWindow, SwingConfig swingConfig)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Opens a FileView dialog if the current form is not null.
 boolean isReady()
           
 void mouseClicked(java.awt.event.MouseEvent e)
          Empty dummy implementation.
 void mouseEntered(java.awt.event.MouseEvent e)
          Empty dummy implementation.
 void mouseExited(java.awt.event.MouseEvent e)
          Empty dummy implementation.
 void mousePressed(java.awt.event.MouseEvent e)
          Empty dummy implementation.
 void mouseReleased(java.awt.event.MouseEvent event)
          If the event source is a JTable (i.e.
 void reset()
          Disables this action.
 void setEnabled(boolean enabled)
          Overwrites the super implementation to keep the component state aligned with the state of the environment.
 void setForm(FARForm findORreplace)
          Sets the currently active FARForm.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionView

public ActionView(javax.swing.JFrame rootWindow,
                  SwingConfig swingConfig)
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Overwrites the super implementation to keep the component state aligned with the state of the environment. This method may be called to refresh the component state.

Specified by:
setEnabled in interface javax.swing.Action
Overrides:
setEnabled in class javax.swing.AbstractAction

setForm

public void setForm(FARForm findORreplace)
Sets the currently active FARForm. This may be null if the currently active OperationForm is not a FARForm. If the form is null, the action will be disabled.

Parameters:
findORreplace - active FARForm or null

reset

public void reset()
Disables this action. Called when the application is reset to its original state.

Specified by:
reset in interface Resetable

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Opens a FileView dialog if the current form is not null.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
If the event source is a JTable (i.e. if this MouseAdapter listens on one), the currently selected row is pulled from it, assuming that the table model is of type FileSetTableModel.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
event - triggering this call

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Empty dummy implementation.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Empty dummy implementation.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Empty dummy implementation.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Empty dummy implementation.

Specified by:
mousePressed in interface java.awt.event.MouseListener

isReady

public boolean isReady()