|
org.netbeans.core.multiview/1 1.13 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| CloseOperationHandler | Handles closing of the MultiView component globally. |
| MultiViewDescription | Description of multi view element. |
| MultiViewElement | View element for multi view, provides the UI components to the multiview component. |
| SourceViewMarker | A marker interface for MultiViewDescription instances that allows to identify them
as containing source code. |
| Class Summary | |
|---|---|
| CloseOperationState | instances of this class describe the MultiViewElement's state when the component is about to be closed. |
| MultiViewElementCallback | Requester type of class, allowing implementors of MultiViewElement to send requests back to enclosing component and window system. |
| MultiViewFactory | Factory class for creating top components handling multi views. |
This SPI handles the lifecycle of a multiview component.
MultiViewDescriptions that
describe the content of the view.MultiViewDescription.createElement()MultiViewElement.canCloseElement().
The owner of the multiview component resolves the problems (silently or
by asking the user) in
CloseOperationHandler.resolveCloseOperation(org.netbeans.core.spi.multiview.CloseOperationState[])
MultiViewDescription instances
get serialized. Thus they need to implement Serializable. Then
for all MultiViewDescriptions that were opened (created their
MultiViewElement instances) and don't
declare PERSISTENCE_NEVER in their getPersistenceType() method, the
MultiViewElement instance gets persisted as well. CloseOperationHandler implementation for the multiview component, then you also ought to define it
Serializable.
MultiViewElementCallback on
creation or deserialization. (Please don't serialize with your
element's data, for performance reasons) It can be used during
lifecycle of the element. public void requestActive() {
if
(multiViewCallback != null) {
multiViewCallback.requestActive();
}
else {
super.requestActive();
}
} public JComponent
getToolbarRepresentation() {
if
(toolbar == null) {
JEditorPane pane = getEditorPane();
if (pane != null) {
Document doc = pane.getDocument();
if (doc instanceof NbDocument.CustomToolbar) {
toolbar = ((NbDocument.CustomToolbar)doc).createToolbar(pane);
}
}
if (toolbar == null) {
//attempt to create own toolbar?
toolbar = new JPanel();
}
}
return toolbar;
}
CloseOperationHandler.resolveCloseOperation(org.netbeans.core.spi.multiview.CloseOperationState[])
method implementation.
|
org.netbeans.core.multiview/1 1.13 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||