Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.elexis.developer.resources.view
Class SampleView

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 ch.elexis.developer.resources.view.SampleView
All Implemented Interfaces:
GlobalEventDispatcher.IActivationListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class SampleView
extends org.eclipse.ui.part.ViewPart
implements GlobalEventDispatcher.IActivationListener

This is a sample view to demonstrate how to connect to elexis's event scheduler and how to display elexis's data types. We implement IActivationListener to be informed, wenn the user can see our View. All UI funktions should only be active in that case.


Field Summary
static java.lang.String ID
          We make a String constant for the ID to reference it from the perspective
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SampleView()
           
 
Method Summary
 void activation(boolean mode)
          From IActivationListener: the view was activated or inactivated
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          This is the right place to create all UI elements.
 void dispose()
          On disposal,the IActivationListener MUST be unregistered.
 void setFocus()
           
 void visible(boolean mode)
          From IActivationListener: The View changes visibility Our listeners need only to be active,if gthe view is visible.
 
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

ID

public static final java.lang.String ID
We make a String constant for the ID to reference it from the perspective

See Also:
Constant Field Values
Constructor Detail

SampleView

public SampleView()
Method Detail

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
This is the right place to create all UI elements. The parent composite already has a GridLayout.

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

dispose

public void dispose()
On disposal,the IActivationListener MUST be unregistered. Also, our RestrictedAction must be unregistered from the AutoAdapt queue to prevent memory leaks.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

activation

public void activation(boolean mode)
From IActivationListener: the view was activated or inactivated

Specified by:
activation in interface GlobalEventDispatcher.IActivationListener
Parameters:
mode -

visible

public void visible(boolean mode)
From IActivationListener: The View changes visibility Our listeners need only to be active,if gthe view is visible. So we untregister them if the view disappears to save resources. If the view becomes visible again, we must send an event, because the listeners don't know what happend, before the start listening

Specified by:
visible in interface GlobalEventDispatcher.IActivationListener
Parameters:
mode - true: the view becomes visible. false: the view becomes invisible

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013