org.openpermis.editor.policy.view
Interface View

All Known Subinterfaces:
Editor, Tool
All Known Implementing Classes:
AbstractEditor, AbstractToolView, AbstractView, ActionEditor, AuthorityEditor, ContextView, DecisionTool, DomainEditor, ObligationEditor, PolicyView, ProblemListTool, RecentFilesTool, RoleAssignmentRuleEditor, RoleAssignmentRuleListTool, RoleAssignmentTool, RoleHierarchyEditor, RoleHierarchyListTool, TargetAccessRuleEditor, TargetAccessRuleListTool, TargetEditor

public interface View

Describes a user interface view element.

There are two types of views:

Views can be embedded in other views. An embedded view does not serve as a toplevel view but rather only exists as content in a parent view (see the related methods isEmbedded(), getParentView() and setParentView(View)).

Since:
0.1.0
0.9.0 added support for embedded views.

Method Summary
 void attach(ViewContext context)
          Attaches this object to the specified context.
 boolean canClose()
          Prompts the view to save unsaved changes before closing.
 void detach(ViewContext context)
          Detaches this object from the specified context.
 JComponent getContentPane()
          Returns the content pane of this view.
 JComponent getDefaultFocusComponent()
          Returns the component that should receive the focus once this view is activated.
 Icon getIcon()
          Returns the icon of this view.
 View getParentView()
          Returns the parent view or null if this is a toplevel view.
 String getTitle()
          Returns the title of this view.
 boolean isEmbedded()
          Check if this view is embedded in another view.
 void setParentView(View view)
          Sets the view this view is embedded in.
 

Method Detail

attach

void attach(ViewContext context)
Attaches this object to the specified context.

Parameters:
context - the context to attach the object to.
Since:
0.1.0

detach

void detach(ViewContext context)
Detaches this object from the specified context.

Parameters:
context - the context to attach the object to.
Since:
0.1.0

isEmbedded

boolean isEmbedded()
Check if this view is embedded in another view.

If this view is embedded the he parent 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.

Returns:
true if this view is embedded in another view, false if this view is a toplevel view.
See Also:
getParentView()
Since:
0.9.0

getParentView

View getParentView()
Returns the parent view or 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.

Returns:
the parent view or null.
Since:
0.9.0

setParentView

void setParentView(View view)
Sets the view this view is embedded in.

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.

Parameters:
view - the parent view to set.
Since:
0.9.0

getTitle

String getTitle()
Returns the title of this view.

Returns:
the title of this view.
Since:
0.1.0

getIcon

Icon getIcon()
Returns the icon of this view.

Returns:
the icon of this view.
Since:
0.1.0

getContentPane

JComponent getContentPane()
Returns the content pane of this view.

Returns:
the content pane of this view.
Since:
0.1.0

getDefaultFocusComponent

JComponent getDefaultFocusComponent()
Returns the component that should receive the focus once this view is activated.

Returns:
the component that should receive the focus once this view is activated.
Since:
0.9.0

canClose

boolean canClose()
Prompts the view to save unsaved changes before closing.

Returns:
true if the view may be closed, false otherwise.
Since:
0.1.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG