|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.uif.AbstractView
com.jgoodies.skeleton.view.editor.EditorView
public final class EditorView
A container that wraps Editor
instances with a JScrollPane,
which in turn is wrapped by a SimpleInternalFrame
.
It keeps track of a collection of editors to be able to update
the UIs of invisible editors when the look&feel changes.
SwingUtilities#updateComponentTreeUI
updates
only editors that are in the component tree. Since we have only
the active editor in the component tree, we must update other
editors by hand.
An alternative implementation is to use a CardPanel
that has all editors in the component tree, but displays one of them
and hides all others.
Refers to a PresentationChooser
that selects
an Editor appropriate for the currently selected domain object.
NavigationModel
,
Editor
,
SwingUtilities.updateComponentTreeUI(java.awt.Component)
Constructor Summary | |
---|---|
EditorView(MainModel mainModel)
Constructs an EditorView for the given main model. |
Method Summary | |
---|---|
void |
addEditor(Class domainType,
Editor editor)
Adds an Editor to this EditorView . |
protected JComponent |
buildPanel()
|
void |
setActiveEditor(Editor newEditor)
Shows the specified Editor : sets the icon,
title, tool bar, and finally switches the viewport's view. |
Methods inherited from class com.jgoodies.uif.AbstractView |
---|
getPanel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditorView(MainModel mainModel)
mainModel
- used to observe selection changesMethod Detail |
---|
protected JComponent buildPanel()
buildPanel
in class com.jgoodies.uif.AbstractView
public void addEditor(Class domainType, Editor editor)
Editor
to this EditorView
.
domainType
- the key used to register the editor for lookupeditor
- the editor to addpublic void setActiveEditor(Editor newEditor)
Editor
: sets the icon,
title, tool bar, and finally switches the viewport's view.
newEditor
- the editor to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |