org.fopps.ui.actions
Class CompileAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.fopps.ui.actions.BaseAction
              |
              +--org.fopps.ui.actions.ItemAction
                    |
                    +--org.fopps.ui.actions.CompileAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.lang.Comparable, CompilationListener, java.util.EventListener, java.awt.event.ItemListener, java.io.Serializable

public class CompileAction
extends ItemAction
implements CompilationListener

Compiles one or more products

Author:
Oliver Wieland
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.fopps.ui.actions.BaseAction
GROUP, selectedItems
 
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
CompileAction(ActionHandler pListener)
           
CompileAction(java.lang.String name, ActionHandler pListener)
           
CompileAction(java.lang.String name, javax.swing.Icon icon, ActionHandler pListener)
           
 
Method Summary
 boolean acceptSelection()
          Indicates, if an action is able to work with the selected items.
 void actionPerformed(java.awt.event.ActionEvent e)
           
 boolean addToPopup()
          Determines, if action should appear in popup menu
 void compilationError(CompilationEvent pEvent, java.lang.Throwable pException)
          Called if an error occurred during compilation
 void compilationFinished(CompilationEvent pEvent)
          Called if compilation finished
 void compilationStarted(CompilationEvent pEvent)
          Called if compilation started
 void fileCopied(CompilationEvent pEvent, java.lang.String pSource, java.lang.String pDest)
          Called if a file was copied to the target directory
 void fileGenerated(CompilationEvent pEvent, java.lang.String pDest)
          Called if a file was generated
 void fileSkipped(CompilationEvent pEvent, java.lang.String pSource)
          Called if a file was skipped (e. g. file not found)
 
Methods inherited from class org.fopps.ui.actions.ItemAction
itemsNeeded
 
Methods inherited from class org.fopps.ui.actions.BaseAction
addToMenu, addToToolBar, clearSelection, compareTo, getAccelerator, getActionHandler, getApplication, getContainer, getGroup, getIcon, getLocaleName, getLongDescription, getMnemonic, getName, getSelectedItems, getSelectionSize, getShortDescription, isStringPropertySet, isTogglable, itemInSelection, itemStateChanged, setAccelerator, setAccelerator, setAcceleratorWithAlt, setAcceleratorWithCtrl, setAcceleratorWithShift, setGroup, setLocaleName, setLongDescription, setMnemonic, setMnemonic, setShortDescription, toString, updateState
 
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, wait, wait, wait
 

Constructor Detail

CompileAction

public CompileAction(ActionHandler pListener)

CompileAction

public CompileAction(java.lang.String name,
                     ActionHandler pListener)

CompileAction

public CompileAction(java.lang.String name,
                     javax.swing.Icon icon,
                     ActionHandler pListener)
Method Detail

acceptSelection

public boolean acceptSelection()
Indicates, if an action is able to work with the selected items. If acceptSelection returns false, the action will be disabled. This method is called after every selection change. ItemAction's accept selection which contain only intsances of AbstractItem

Overrides:
acceptSelection in class ItemAction
Returns:
true, if action is able to operate on current selection

addToPopup

public boolean addToPopup()
Determines, if action should appear in popup menu

Specified by:
addToPopup in class BaseAction
Returns:
true, if action should added to context menu, otherwise false

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class BaseAction
See Also:
ActionListener.actionPerformed(ActionEvent)

fileGenerated

public void fileGenerated(CompilationEvent pEvent,
                          java.lang.String pDest)
Called if a file was generated

Specified by:
fileGenerated in interface CompilationListener
Parameters:
pEvent - The compilation event
pDest - Name of the destination file

fileSkipped

public void fileSkipped(CompilationEvent pEvent,
                        java.lang.String pSource)
Called if a file was skipped (e. g. file not found)

Specified by:
fileSkipped in interface CompilationListener
Parameters:
pEvent - The compilation event
pSource - Name of the source file

fileCopied

public void fileCopied(CompilationEvent pEvent,
                       java.lang.String pSource,
                       java.lang.String pDest)
Called if a file was copied to the target directory

Specified by:
fileCopied in interface CompilationListener
Parameters:
pEvent - The compilation event
pSource - Name of the source file
pDest - Name of the destination file

compilationStarted

public void compilationStarted(CompilationEvent pEvent)
Called if compilation started

Specified by:
compilationStarted in interface CompilationListener
Parameters:
pEvent - The compilation event

compilationFinished

public void compilationFinished(CompilationEvent pEvent)
Called if compilation finished

Specified by:
compilationFinished in interface CompilationListener
Parameters:
pEvent - The compilation event

compilationError

public void compilationError(CompilationEvent pEvent,
                             java.lang.Throwable pException)
Called if an error occurred during compilation

Specified by:
compilationError in interface CompilationListener
Parameters:
pEvent - The compilation event
pException - The raised exception


Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.