be.ac.vub.cocompose.eclipse.actions
Class ExportAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended byorg.eclipse.gef.ui.actions.WorkbenchPartAction
          extended byorg.eclipse.gef.ui.actions.EditorPartAction
              extended byorg.eclipse.gef.ui.actions.SelectionAction
                  extended bybe.ac.vub.cocompose.eclipse.actions.ExportAction
All Implemented Interfaces:
Disposable, IAction, UpdateAction

public class ExportAction
extends SelectionAction

Exports the current model in another file format. Currently supports EPS and SVG.

Since:
0.2.9
Version:
0.2.11, 18/05/2004
Author:
Dennis Wagelaar

Field Summary
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ExportAction(IWorkbenchPart part)
          Creates a CoComposePasteAction.
 
Method Summary
protected  boolean calculateEnabled()
           
protected  Object getContents()
          Gets printing contents.
 IFile getFile()
          Gets the file to which the EPS is exported.
protected  RootEditPart getRootEditPart()
          Retrieves the root editpart of the current model.
protected  void handleSelectionChanged()
           
protected  void init()
           
 void performSaveEPS(IProgressMonitor monitor)
          Performs saving an EPS file.
 void performSaveSVG(IProgressMonitor monitor)
          Performs saving an SVG file.
 void run()
           
protected  void setContents(Object o)
          Sets printing contents.
protected  String stripFilename(IFile file)
          Gets the filename stripped from its extension.
 
Methods inherited from class org.eclipse.gef.ui.actions.SelectionAction
dispose, getSelectedObjects, getSelection, setSelection, setSelectionProvider, update
 
Methods inherited from class org.eclipse.gef.ui.actions.EditorPartAction
getEditorPart, setEditorPart
 
Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction
execute, getCommandStack, getWorkbenchPart, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPart
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportAction

public ExportAction(IWorkbenchPart part)
Creates a CoComposePasteAction.

Parameters:
part - the CoCompose editor.
Method Detail

run

public void run()
See Also:
IAction.run()

performSaveEPS

public void performSaveEPS(IProgressMonitor monitor)
Performs saving an EPS file.

Parameters:
monitor -

performSaveSVG

public void performSaveSVG(IProgressMonitor monitor)
Performs saving an SVG file.

Parameters:
monitor -

getRootEditPart

protected RootEditPart getRootEditPart()
Retrieves the root editpart of the current model.

Returns:
the root editpart of the current model.

handleSelectionChanged

protected void handleSelectionChanged()
See Also:
SelectionAction.handleSelectionChanged()

calculateEnabled

protected boolean calculateEnabled()
See Also:
WorkbenchPartAction.calculateEnabled()

init

protected void init()
See Also:
WorkbenchPartAction.init()

getFile

public IFile getFile()
Gets the file to which the EPS is exported.

Returns:
the file to which the EPS is exported.

stripFilename

protected String stripFilename(IFile file)
Gets the filename stripped from its extension.

Parameters:
file - the file to get the name for.
Returns:
the filename stripped from its extension.

getContents

protected Object getContents()
Gets printing contents.

Returns:
printing contents.

setContents

protected void setContents(Object o)
Sets printing contents.

Parameters:
o - printing contents.