|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.gui.dock.DockControl
public class DockControl
Control that manages all dockables and the swing components of the main frame.
Nested Class Summary | |
---|---|
private class |
DockControl.ViewMonitor<T extends bibliothek.gui.dock.common.intern.DefaultCDockable>
Monitor for views and dockables. |
Field Summary | |
---|---|
private bibliothek.gui.dock.common.CControl |
control
The common control of the docking framework wrapped by this class. |
private Map<Editor,DockControl.ViewMonitor<EditorDockable>> |
editors
The editors managed by this control. |
private EventSupport<DockControlListener> |
eventSupport
The event support of this dock control. |
private EditorFactory |
factory
Factory used to create new editor dockables. |
private Map<Tool,DockControl.ViewMonitor<ToolDockable>> |
tools
The tools managed by this control. |
private static String |
WORKING_AREA
Unique string identifier for the working area. |
private bibliothek.gui.dock.common.CWorkingArea |
workingArea
The working area used by this dock control. |
Constructor Summary | |
---|---|
DockControl(JFrame frame)
Creates a new dock control for the specified owner frame. |
Method Summary | |
---|---|
void |
addDockControlListener(DockControlListener listener)
Adds a listener for dock control events. |
private boolean |
closeEditorView(Editor view,
boolean force)
Removes the dockable responsible for the view specified. |
private boolean |
closeToolView(Tool view,
boolean force)
Removes the dockable responsible for the view specified. |
boolean |
closeView(View view,
boolean force)
Removes the dockable responsible for the view specified. |
private bibliothek.gui.dock.common.CControl |
createControl(JFrame frame)
Creates a new control that is used internally to manage dockables. |
private EditorFactory |
createFactory()
Creates the factory used to create new editor dockables. |
private bibliothek.gui.dock.common.CWorkingArea |
createWorkingArea(bibliothek.gui.dock.common.CControl ccontrol,
EditorFactory editorFactory)
Creates a new working area at the specified control for the given factory. |
private void |
fireViewActivated(View view)
Fires an event that the specified view has been activated. |
private void |
fireViewClosed(View view)
Fires an event that the specified view has been closed. |
private void |
fireViewDeactivated(View view)
Fires an event that the specified view has been deactivated. |
private void |
fireViewOpened(View view)
Fires an event that the specified view has been opened. |
JComponent |
getContentArea()
Returns the content area of this dock control. |
Set<Editor> |
getEditorViews()
Returns a set of all editor views currently attached to this dock control. |
Set<Tool> |
getToolViews()
Returns a set of all tool views currently attached to this dock control. |
Set<View> |
getViews()
Returns all view currently attached to this dock control. |
boolean |
isViewOpen(View view)
Checks if a view is open. |
private void |
openEditorView(Editor view)
Creates a new editor dockable for the specified view and displays the view in the center of the working area. |
private void |
openToolView(Tool view)
Creates a new tool dockable for the specified view and displays the view at the given location. |
void |
openView(View view)
Creates a dockable of appropriate type for the specified view and displays it. |
void |
removeDockControlListener(DockControlListener listener)
Removes a listener from this dock control. |
void |
updateViewTitle(View view)
Updates the title of the dockable this view is attached to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String WORKING_AREA
"WorkingArea"
CWorkingArea
,
Constant Field Valuesprivate final bibliothek.gui.dock.common.CControl control
private final EditorFactory factory
private final bibliothek.gui.dock.common.CWorkingArea workingArea
private final EventSupport<DockControlListener> eventSupport
private final Map<Editor,DockControl.ViewMonitor<EditorDockable>> editors
private final Map<Tool,DockControl.ViewMonitor<ToolDockable>> tools
Constructor Detail |
---|
public DockControl(JFrame frame)
frame
- the frame used as owner for externally opened views.Method Detail |
---|
public void addDockControlListener(DockControlListener listener)
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.
listener
- the listener to add, may be null
.public void removeDockControlListener(DockControlListener listener)
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.
listener
- the listener to be removed, may be null
.private void fireViewOpened(View view)
view
- the view that has been opened.private void fireViewClosed(View view)
view
- the view that has been closed.private void fireViewActivated(View view)
view
- the view that has been activated.private void fireViewDeactivated(View view)
view
- the view that has been deactivated.private EditorFactory createFactory()
private bibliothek.gui.dock.common.CControl createControl(JFrame frame)
frame
- the frame used as owner for externally opened views.
private bibliothek.gui.dock.common.CWorkingArea createWorkingArea(bibliothek.gui.dock.common.CControl ccontrol, EditorFactory editorFactory)
ccontrol
- the control at which to create the working area.editorFactory
- the editor factory to use.
public JComponent getContentArea()
The content area contains all tool and editor dockables and serves as the main content of the editor window.
public void updateViewTitle(View view)
view
- the view for which to update the title.public void openView(View view)
If the view is already open it is activated.
Supports Tool
and Editor
views.
view
- the view to display.
IllegalArgumentException
- if the view type is not supported.private void openEditorView(Editor view)
view
- the view for which to create the editor dockable.private void openToolView(Tool view)
view
- the view to display as a tool dockable.public Set<View> getViews()
null
.public boolean isViewOpen(View view)
view
- the view to check.
true
if the view is open.public Set<Tool> getToolViews()
null
.public Set<Editor> getEditorViews()
null
.public boolean closeView(View view, boolean force)
view
- the view to remove.force
- true
to force closing the view.
true
if the dockable was removed.private boolean closeEditorView(Editor view, boolean force)
view
- the view to remove.force
- true
to force closing the view.
true
if the dockable was removed.private boolean closeToolView(Tool view, boolean force)
view
- the view to remove.force
- true
to force closing the view.
true
if the dockable was removed.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG