de.cau.cs.kieler.kev.views
Class KevView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by de.cau.cs.kieler.kev.views.KevView
All Implemented Interfaces:
IAdaptable, IExecutableExtension, IPersistable, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public class KevView
extends ViewPart

The KEV-view which holds the EclipseJSVGCanvas for SVG document manipulation.

Rating proposed yellow
(2010-02-17)

Field Summary
static int BUTTON_BOTH
          The value that identifies the both buttons.
static int BUTTON_OPEN_WIZARD
          The value that identifies the OpenWizard button.
static int BUTTON_REFRESH
          The value that identifies the Refresh button.
static String ID
          ID declares the name of the KEV-View.
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
KevView()
          The constructor.
 
Method Summary
 void createPartControl(Composite parent)
          This is a callback that will allow us to create the viewer and initialize it.
 void disableButton(int id)
          Disable the openWizardAction.
 void dispose()
          Does some code-wrapup before calling the super method.
 void enableButton(int id)
          Enable the openWizardAction.
 KevComposite getComposite()
          Returns the current KEVComposite.
 org.apache.batik.swing.JSVGCanvas getSVGCanvas()
          Returns the current EclipseJSVGCanvas.
 void setFocus()
          Sets the focus to the KevComposite.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

BUTTON_OPEN_WIZARD

public static final int BUTTON_OPEN_WIZARD
The value that identifies the OpenWizard button.

See Also:
Constant Field Values

BUTTON_REFRESH

public static final int BUTTON_REFRESH
The value that identifies the Refresh button.

See Also:
Constant Field Values

BUTTON_BOTH

public static final int BUTTON_BOTH
The value that identifies the both buttons.

See Also:
Constant Field Values

ID

public static final String ID
ID declares the name of the KEV-View.

See Also:
Constant Field Values
Constructor Detail

KevView

public KevView()
The constructor.

Method Detail

createPartControl

public void createPartControl(Composite parent)
This is a callback that will allow us to create the viewer and initialize it.

Specified by:
createPartControl in interface IWorkbenchPart
Specified by:
createPartControl in class WorkbenchPart
Parameters:
parent - the Composite. This method is called by Eclipse.

enableButton

public void enableButton(int id)
Enable the openWizardAction.

Parameters:
id - indicates which button should be enabled

disableButton

public void disableButton(int id)
Disable the openWizardAction.

Parameters:
id - indicates which button should be disabled

setFocus

public void setFocus()
Sets the focus to the KevComposite.

Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

dispose

public void dispose()
Does some code-wrapup before calling the super method.

Specified by:
dispose in interface IWorkbenchPart
Overrides:
dispose in class WorkbenchPart

getComposite

public KevComposite getComposite()
Returns the current KEVComposite.

Returns:
svg, the current KEVComposite object.
See Also:
KevComposite

getSVGCanvas

public org.apache.batik.swing.JSVGCanvas getSVGCanvas()
Returns the current EclipseJSVGCanvas. Better to call it directly from the static instance: EclipseJSVGCanvas.getInstance()

Returns:
EclipseJSVGCanvas, the current EclipseJSVGCanvas.
See Also:
EclipseJSVGCanvas