|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.fosstrak.llrp.commander.views.TableViewPart
org.fosstrak.llrp.commander.views.MessageboxView
public class MessageboxView
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 | |
|---|---|
static int |
COL_MSG_ADAPTER
column for the adapter. |
static int |
COL_MSG_COMMENT
Column ID for Message Comments. |
static int |
COL_MSG_ID
Column ID for Message ID. |
static int |
COL_MSG_MARK
Column ID for User Marks. |
static int |
COL_MSG_READER
Column ID for Message Type. |
static int |
COL_MSG_TIME
Column ID for Message Issue Time. |
static int |
COL_MSG_TYPE
Column ID for Message Type. |
static int |
COL_STATUS_CODE
Column ID for Status Code. |
protected org.eclipse.swt.widgets.Display |
display
access to the display is needed by the asyncExec/syncExec API to allow multi-threaded access to the SWT widget |
static java.lang.String |
ICON_AUTO_REFRESH
the name of the auto refresh icon. |
| Fields inherited from class org.fosstrak.llrp.commander.views.TableViewPart |
|---|
TAG_COLUMN, TAG_NUMBER, TAG_WIDTH |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
MessageboxView()
The constructor. |
|
| Method Summary | |
|---|---|
protected void |
createActions()
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
This is a callback that will allow us to create the viewer and initialize it. |
void |
dispose()
Dispose the view. |
protected void |
fillContextMenu(org.eclipse.jface.action.IMenuManager manager)
|
protected void |
fillLocalToolBar(org.eclipse.jface.action.IToolBarManager manager)
|
org.eclipse.swt.widgets.Display |
getDisplay()
return a handle to the display of this widget. |
int |
getDisplayNumMessages()
|
java.lang.String |
getSelectedAdapter()
|
java.lang.String |
getSelectedReader()
|
void |
selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
Triggered when user change the reader in Reader Management View. |
void |
setDisplayNumMessages(int displayNumMessages)
|
void |
updateViewer(boolean reload)
Refresh the message list in the viewer from selected adapter or reader. |
| Methods inherited from class org.fosstrak.llrp.commander.views.TableViewPart |
|---|
contributeToActionBars, createColumns, fillLocalPullDown, getTable, getViewer, hookEvents, hookMenus, init, restoreColumnWidths, saveColumnWidths, saveState, selectionChanged, setColumnHeaders, setColumnLayouts, setDoubleClickAction, setFocus |
| Methods inherited from class org.eclipse.ui.part.ViewPart |
|---|
checkSite, getViewSite, init, 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 |
|---|
public static final int COL_MSG_MARK
public static final int COL_MSG_ID
public static final int COL_MSG_ADAPTER
public static final int COL_MSG_READER
public static final int COL_MSG_TYPE
public static final int COL_STATUS_CODE
public static final int COL_MSG_TIME
public static final int COL_MSG_COMMENT
public static final java.lang.String ICON_AUTO_REFRESH
protected org.eclipse.swt.widgets.Display display
| Constructor Detail |
|---|
public MessageboxView()
| Method Detail |
|---|
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl in interface org.eclipse.ui.IWorkbenchPartcreatePartControl in class TableViewPartpublic org.eclipse.swt.widgets.Display getDisplay()
protected void fillContextMenu(org.eclipse.jface.action.IMenuManager manager)
fillContextMenu in class TableViewPartprotected void fillLocalToolBar(org.eclipse.jface.action.IToolBarManager manager)
fillLocalToolBar in class TableViewPartprotected void createActions()
createActions in class TableViewPartpublic void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.WorkbenchPart
public void selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
selectionChanged in interface org.eclipse.ui.ISelectionListenerpublic void updateViewer(boolean reload)
reload - flag whether to reload the whole list of messages. if set
to true all the messages get loaded from the backend, otherwise just the
new messages get added to the view.public void setDisplayNumMessages(int displayNumMessages)
displayNumMessages - the displayNumMessages to setpublic int getDisplayNumMessages()
public final java.lang.String getSelectedAdapter()
public final java.lang.String getSelectedReader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||