|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ui.part.WorkbenchPart org.eclipse.ui.part.ViewPart de.nierbeck.timeTrack.views.TimeTrackView
public class TimeTrackView
This sample class demonstrates how to plug-in a new workbench view. The view shows data obtained from the model. The sample creates a dummy model on the fly, but a real implementation would connect to the model available either in this or another plug-in (e.g. the workspace). The view is connected to the model using a content provider.
The view uses a label provider to define how model objects should be presented in the view. Each view can present the same model objects using different labels and icons, if needed. Alternatively, a single label provider can be shared between views in order to ensure that objects of the same type are presented in the same way everywhere.
Field Summary |
---|
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
TimeTrackView()
The constructor. |
Method Summary | |
---|---|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
This is a callback that will allow us to create the viewer and initialize it. |
org.eclipse.jface.viewers.TableViewer |
getTableViewer()
Method for the test case |
void |
setFocus()
Passing the focus request to the viewer's control. |
void |
update(java.util.Observable o,
java.lang.Object arg)
updates the listeners |
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 |
---|
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
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, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
---|
public TimeTrackView()
Method Detail |
---|
public final org.eclipse.jface.viewers.TableViewer getTableViewer()
public final void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
parent
- - the Parent Compositepublic final void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.WorkbenchPart
public final void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- - the Observablearg
- - the argument
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |