|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.Page
roneditor.AbstractMultiViewerPage
roneditor.ruleview.RulePage
public class RulePage
This is an implementation of AbstractPageBookView
to display
Rule
s.
It uses ObjectNetViewEditPartFactory
and
RulePageContextMenuProvider
, configures the keyhandler and creates
actions to move ONNode
s by pressing keys.
On model change nothing is done.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class roneditor.AbstractMultiViewerPage |
---|
AbstractMultiViewerPage.MultiViewerPageViewer |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
org.eclipse.emf.common.notify.Adapter.Internal |
Constructor Summary | |
---|---|
RulePage(ronmodel.Rule rule,
org.eclipse.ui.IEditorPart editor)
|
Method Summary | |
---|---|
protected void |
createActions()
To be implemented by subclasses. |
protected ContextMenuProviderWithActionRegistry |
createContextMenuProvider(org.eclipse.gef.EditPartViewer viewer)
Subclasses must implement to specify the ContextMenuProviderWithActionRegistry that should be used by this
page's GraphicalViewer s and is responsible to show the created
actions in the context menu. |
protected org.eclipse.gef.EditPartFactory |
createEditPartFactory()
Subclasses must implement to specify the EditPartFactory that
should be used by this page's GraphicalViewer s. |
protected org.eclipse.gef.palette.PaletteRoot |
createPaletteRoot()
Subclasses must implement to specify the PaletteRoot that should
be used by this page's EditDomain and which defines the contents
of the palette. |
int |
getNumberOfViewers()
A RulePage shows three nets: NAC , LHS and
RHS of the Rule . |
ronmodel.Rule |
getRule()
|
protected int[] |
getThumbSashWeights()
The two values in the returned array specify how the flyout composite's space is being divided between the palette entries and the thumbnail in the palette. |
org.eclipse.emf.ecore.EObject[] |
getViewerContents()
A RulePage shows the first NAC of the Rule and
the LHS and RHS . |
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
|
protected void |
setupKeyHandler(org.eclipse.gef.KeyHandler kh)
Subclasses must implement to associate KeyStroke s with Actions
in the passed KeyHandler } which is the one used for the
GraphicalViewers . |
Methods inherited from class org.eclipse.ui.part.Page |
---|
getSite, makeContributions, setActionBars |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RulePage(ronmodel.Rule rule, org.eclipse.ui.IEditorPart editor)
Method Detail |
---|
protected void createActions()
AbstractMultiViewerPage
AbstractMultiViewerPage.getActionRegistry()
. WorkbenchPartAction
s should get the editor (AbstractMultiViewerPage.getEditor()
)
as workbench part in their constructor. RetargetAction
s you may use
AbstractMultiViewerPage.registerHandleForEditorAction(String)
with a string that matches
both the RetargetAction
's and the handle's ID.
In
AbstractMultiViewerPage.setCurrentViewer(roneditor.AbstractMultiViewerPage.MultiViewerPageViewer)
the AbstractMultiViewerPage.currentViewer
will be set with
SelectionAction.setSelectionProvider(ISelectionProvider)
for
SelectionAction
s.
createActions
in class AbstractMultiViewerPage
to find out which actions will be created by
default.
protected void setupKeyHandler(org.eclipse.gef.KeyHandler kh)
AbstractMultiViewerPage
KeyStroke
s with Actions
in the passed KeyHandler
} which is the one used for the
GraphicalViewers
.
setupKeyHandler
in class AbstractMultiViewerPage
AbstractMultiViewerPage.createGraphicalViewerComposite()
protected org.eclipse.gef.EditPartFactory createEditPartFactory()
AbstractMultiViewerPage
EditPartFactory
that
should be used by this page's GraphicalViewer
s.
createEditPartFactory
in class AbstractMultiViewerPage
EditPartFactory
for the GraphicalViewer
s of
this page.AbstractMultiViewerPage.createGraphicalViewerComposite()
protected ContextMenuProviderWithActionRegistry createContextMenuProvider(org.eclipse.gef.EditPartViewer viewer)
AbstractMultiViewerPage
ContextMenuProviderWithActionRegistry
that should be used by this
page's GraphicalViewer
s and is responsible to show the created
actions in the context menu.
createContextMenuProvider
in class AbstractMultiViewerPage
viewer
- The graphical viewer for context menu provider
ContextMenuProviderWithActionRegistry
for the
specified GraphicalViewer
.AbstractMultiViewerPage.createGraphicalViewerComposite()
protected org.eclipse.gef.palette.PaletteRoot createPaletteRoot()
AbstractMultiViewerPage
PaletteRoot
that should
be used by this page's EditDomain
and which defines the contents
of the palette.
createPaletteRoot
in class AbstractMultiViewerPage
PaletteRoot
for the EditDomain
of this page.protected int[] getThumbSashWeights()
AbstractMultiViewerPage
return new int[] { Palette_Weight, Thumb_Weight };
getThumbSashWeights
in class AbstractMultiViewerPage
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
public int getNumberOfViewers()
RulePage
shows three nets: NAC
, LHS
and
RHS
of the Rule
.
getNumberOfViewers
in class AbstractMultiViewerPage
AbstractMultiViewerPage.getViewerContents()
,
AbstractMultiViewerPage.createGraphicalViewerComposite()
public org.eclipse.emf.ecore.EObject[] getViewerContents()
RulePage
shows the first NAC
of the Rule
and
the LHS
and RHS
.
getViewerContents
in class AbstractMultiViewerPage
AbstractMultiViewerPage.viewers
.AbstractMultiViewerPage.setViewersContents(int, EObject)
,
AbstractMultiViewerPage.createGraphicalViewerComposite()
public ronmodel.Rule getRule()
Rule
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |