|
![]() |
||||||||
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.
Constructor Summary | |
---|---|
AbstractView(ApplicationContext context,
Adapter 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. |
Editor |
createEditor(org.openpermis.policy.bean.PartBean part)
|
protected FormBuilder |
createFormBuilder()
Creates a form builder that is configured for use with this view. |
protected org.jdesktop.beansbinding.Converter<String,String> |
createTranslationConverter(String prefix)
Creates a translation converter for the specified prefix. |
void |
detach(ViewContext theContext)
Detaches this view from the specified context. |
protected Editor |
editPart(org.openpermis.policy.bean.PartBean part)
|
protected Action |
getAction(String name)
Convenience method to retrieve an action by name. |
protected ActionMap |
getActionMap()
Returns the application action map of this view class and instance. |
Adapter |
getAdapteeTrader()
Returns the adaptee trader of this view class. |
protected ApplicationContext |
getApplicationContext()
Returns the context of the application that owns this view. |
JComponent |
getContentPane()
Returns the Swing content pane of this view. |
protected ControlFactory |
getControlFactory()
Returns the control factory that can create controls for this view. |
JComponent |
getDefaultFocusComponent()
Returns the default focus component. |
Icon |
getIcon()
Returns the icon of this view. |
View |
getParentView()
Returns the parent view or null if this is a toplevel 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. |
boolean |
isEmbedded()
Check if this view is embedded in another view. |
protected void |
openView(View view)
|
protected void |
setEnabled(boolean enabled)
Enables or disables all controls in this view. |
void |
setParentView(View view)
Sets the view this view is embedded in. |
void |
showStatusError(String message)
Shows an error message. |
protected void |
updateTitle()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractView(ApplicationContext context, Adapter trader)
context
- the application context used to lookup the action and resource map.trader
- the adaptee trader of this view class.Method Detail |
---|
public Adapter getAdapteeTrader()
protected ApplicationContext getApplicationContext()
protected org.jdesktop.application.ResourceMap getResourceMap()
protected ActionMap getActionMap()
protected ControlFactory getControlFactory()
protected Action getAction(String name)
Bascially corresponds to getActionMap().get(name).
Note: If the action does not exist an error message including stack trace is logged and an action that does nothing is returned.
name
- the name of the action to retrieve.
protected abstract JComponent createContentPane()
null
.protected ViewContext getViewContext()
null
.protected void openView(View view)
protected boolean closeView(View view, boolean force)
public Editor createEditor(org.openpermis.policy.bean.PartBean part)
protected Editor editPart(org.openpermis.policy.bean.PartBean part)
public boolean canEditPart(org.openpermis.policy.bean.PartBean part)
protected void updateTitle()
protected org.jdesktop.beansbinding.Converter<String,String> createTranslationConverter(String prefix)
prefix
- the prefix for all input strings in the translation map.
protected FormBuilder createFormBuilder()
protected void setEnabled(boolean enabled)
enabled
- true
to enable, false
to disable.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 boolean isEmbedded()
View
If this view is embedded the he parent view (View.getParentView()
is set to a
non-null
value. If embedded the view is not a fully functional toplevel view, but
rather its content pane is embedded in the parent view.
isEmbedded
in interface View
true
if this view is embedded in another view,
false
if this view is a toplevel view.View.getParentView()
public View getParentView()
View
null
if this is a toplevel view.
The parent view is only set if this view is embedded in another view. If embedded the view is not a fully functional toplevel view, but rather its content pane is embedded in the parent view.
getParentView
in interface View
null
.public void setParentView(View view)
View
The parent view is only set if this view is embedded in another view. If embedded the view is not a fully functional toplevel view, but rather its content pane is embedded in the parent view.
setParentView
in interface View
view
- the parent view to set.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 JComponent getDefaultFocusComponent()
The default implementation returns the component (declared as a member variable) that
has the DefaultFocus
annotation.
getDefaultFocusComponent
in interface View
null
if none could be found.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 |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG