|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.view.AbstractView
public abstract class AbstractView
Abstract base class for views.
Field Summary | |
---|---|
private ActionMap |
actionMap
The action map attached to this view instance. |
private JComponent |
contentPane
The content pane of this view, lazily initialized. |
private ViewContext |
context
The context this view is attached to. |
private org.jdesktop.application.ResourceMap |
resourceMap
The resource map attached to this view instance. |
private AdapterTrader |
trader
The adapter trader of this view. |
private static String |
VIEW_ICON
Resource key for the view icon. |
private static String |
VIEW_TITLE
Resource key for the title of this view. |
Constructor Summary | |
---|---|
AbstractView(org.jdesktop.application.ApplicationContext context,
AdapterTrader trader)
Creates an abstract view that operates on an action and resource map derived from the implementation class of this view. |
Method Summary | |
---|---|
void |
attach(ViewContext theContext)
Attaches this view to the specified context. |
boolean |
canClose()
Prompts the view to save unsaved changes before closing. |
boolean |
canEditPart(org.openpermis.policy.bean.PartBean part)
|
protected boolean |
closeView(View view,
boolean force)
|
protected void |
contentPaneCreated()
Hook called after the content pane has been created. |
protected abstract JComponent |
createContentPane()
Creates the content pane of this view. |
void |
detach(ViewContext theContext)
Detaches this view from the specified context. |
protected Editor |
editPart(org.openpermis.policy.bean.PartBean part)
|
protected ActionMap |
getActionMap()
Returns the application action map of this view class and instance. |
AdapterTrader |
getAdapteeTrader()
Returns the adaptee trader of this view class. |
JComponent |
getContentPane()
Returns the Swing content pane of this view. |
Icon |
getIcon()
Returns the icon of this view. |
protected org.jdesktop.application.ResourceMap |
getResourceMap()
Returns the context resource map of this view class. |
String |
getTitle()
Returns the title of this view. |
Object[] |
getTitleParameters()
Returns the parameters for the title of this view. |
protected ViewContext |
getViewContext()
Returns the view context of this view. |
protected JLabel |
label(String name)
Factory method to create a label with properties defined in the resource map. |
protected void |
openView(View view)
|
void |
showStatusError(String message)
Shows an error message. |
protected JToolBar |
toolBar(String name)
Factory method to create a tool bar with properties defined in the resource map. |
protected void |
updateTitle()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String VIEW_TITLE
"View.title"
private static final String VIEW_ICON
"View.icon"
private final ActionMap actionMap
getActionMap()
private final org.jdesktop.application.ResourceMap resourceMap
getResourceMap()
private ViewContext context
private AdapterTrader trader
private JComponent contentPane
getContentPane()
Constructor Detail |
---|
public AbstractView(org.jdesktop.application.ApplicationContext context, AdapterTrader trader)
context
- the application context used to lookup the action and resource map.Method Detail |
---|
public AdapterTrader getAdapteeTrader()
protected org.jdesktop.application.ResourceMap getResourceMap()
protected ActionMap getActionMap()
protected abstract JComponent createContentPane()
null
.protected ViewContext getViewContext()
null
.protected void openView(View view)
protected boolean closeView(View view, boolean force)
protected Editor editPart(org.openpermis.policy.bean.PartBean part)
public boolean canEditPart(org.openpermis.policy.bean.PartBean part)
protected void updateTitle()
protected JLabel label(String name)
name
- the name of the label as it appears in the resource map.
protected JToolBar toolBar(String name)
name
- the name of the toolbar as it appears in the resource map.
public void attach(ViewContext theContext)
attach
in interface View
theContext
- the context to attach this view to.public void detach(ViewContext theContext)
detach
in interface View
theContext
- the context to detach this view from.public Object[] getTitleParameters()
The default implementations returns an empty array.
null
.public String getTitle()
getTitle
in interface View
public Icon getIcon()
getIcon
in interface View
protected void contentPaneCreated()
public final JComponent getContentPane()
getContentPane
in interface View
public boolean canClose()
View
canClose
in interface View
true
if the view may be closed, false
otherwise.public void showStatusError(String message)
ErrorReporter
showStatusError
in interface ErrorReporter
message
- the message to display.
|
![]() |
||||||||
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