|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.view.AbstractView
org.openpermis.editor.policy.view.ContextView
public abstract class ContextView
Abstract view implementation that provides a view context.
Field Summary | |
---|---|
private DockControl |
dockControl
The dock control of this view context. |
private EventSupport<ViewContextListener> |
eventSupport
Event support used to notify view context listeners. |
private static org.slf4j.Logger |
LOGGER
The logger object of this class. |
Constructor Summary | |
---|---|
ContextView(org.jdesktop.application.ApplicationContext context,
AdapterTrader trader,
org.jdesktop.swingx.JXFrame frame)
Creates a context view for the specified application context. |
Method Summary | |
---|---|
protected void |
activateEditor(Editor editor)
Activates an already opened editor. |
void |
addViewContextListener(ViewContextListener listener)
Adds a listener for view context events. |
abstract boolean |
canEditPart(org.openpermis.policy.bean.PartBean part)
Tests if the part specified can be edited. |
boolean |
closeView(View view,
boolean force)
Closes the specified view. |
protected JComponent |
createContentPane()
Creates the content pane of this view. |
abstract Editor |
editPart(org.openpermis.policy.bean.PartBean part)
Opens an editor for the specified part. |
protected Set<Editor> |
getEditorViews()
Returns a set of all editor views. |
void |
openView(View view)
Opens the specified view. |
protected void |
refresh(org.openpermis.policy.bean.PolicyBean policy,
PolicyContext context)
Notifies all tool views managed that the policy and the dispatcher have changed. |
void |
removeViewContextListener(ViewContextListener listener)
Removes a listener from this view context. |
void |
updateViewTitle(View view)
Updates the title of the specified view. |
void |
viewActivated(View view)
Indicates that a view has been activated in a dock control. |
void |
viewClosed(View view)
Indicates that a view has been closed in a dock control. |
void |
viewDeactivated(View view)
Indicates that a view has been deactivated in a dock control. |
void |
viewOpened(View view)
Indicates that a view has been opened in a dock control. |
Methods inherited from class org.openpermis.editor.policy.view.AbstractView |
---|
attach, canClose, contentPaneCreated, detach, getActionMap, getAdapteeTrader, getContentPane, getIcon, getResourceMap, getTitle, getTitleParameters, getViewContext, label, showStatusError, toolBar, updateTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openpermis.editor.policy.gui.binding.ErrorReporter |
---|
showStatusError |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private final DockControl dockControl
private final EventSupport<ViewContextListener> eventSupport
Constructor Detail |
---|
public ContextView(org.jdesktop.application.ApplicationContext context, AdapterTrader trader, org.jdesktop.swingx.JXFrame frame)
context
- the application context used to lookup the action and resource map.frame
- the frame to attach the context view to.Method Detail |
---|
protected void refresh(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
policy
- the new policy that is active.context
- the policy context to use.protected Set<Editor> getEditorViews()
protected void activateEditor(Editor editor)
editor
- the editor to activate.protected JComponent createContentPane()
AbstractView
createContentPane
in class AbstractView
null
.public void addViewContextListener(ViewContextListener listener)
ViewContext
The same listener
object may be added more than once, and will be called as many
times as it is added.
If the listener
is null
, no action is taken.
addViewContextListener
in interface ViewContext
listener
- the listener to add, may be null
.public void removeViewContextListener(ViewContextListener listener)
ViewContext
If the same listener
was added more than once, it will be notified one less
time after being removed.
If the listener
is null
, or was never added, no action is taken.
removeViewContextListener
in interface ViewContext
listener
- the listener to be removed, may be null
.public abstract Editor editPart(org.openpermis.policy.bean.PartBean part)
ViewContext
If there is already an editor open, the editor will be shown.
editPart
in interface ViewContext
editPart
in class AbstractView
part
- the part to edit.
null
if the part cannot be edited.public abstract boolean canEditPart(org.openpermis.policy.bean.PartBean part)
ViewContext
There are part types for which there may be no editor type registered, in such a case
the part is not editable and calling ViewContext.editPart(PartBean)
will yield a null
editor. Use this method if you want to test prior to actually creating the editor.
canEditPart
in interface ViewContext
canEditPart
in class AbstractView
part
- the part to test.
true
if the part can be edited, false
otherwise.public void updateViewTitle(View view)
ViewContext
updateViewTitle
in interface ViewContext
view
- the view for which to update the title.public void openView(View view)
ViewContext
openView
in interface ViewContext
openView
in class AbstractView
view
- the view to be opened.public boolean closeView(View view, boolean force)
ViewContext
closeView
in interface ViewContext
closeView
in class AbstractView
view
- the view to be closed.force
- true
to force closing of the view.
true
if the view was closed, false
if the view denied closing.public void viewActivated(View view)
DockControlListener
viewActivated
in interface DockControlListener
view
- the view that has been activated.public void viewDeactivated(View view)
DockControlListener
viewDeactivated
in interface DockControlListener
view
- the view that has been deactivated.public void viewClosed(View view)
DockControlListener
viewClosed
in interface DockControlListener
view
- the view that has been closed.public void viewOpened(View view)
DockControlListener
viewOpened
in interface DockControlListener
view
- the view that has been opened.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG