|
org.netbeans.core.multiview/1 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MultiViewElement
View element for multi view, provides the UI components to the multiview component. Gets notified by the enclosing component about the changes in the lifecycle.
Method Summary | |
---|---|
CloseOperationState |
canCloseElement()
Element decides if it can be safely closed. |
void |
componentActivated()
Called when this multi view element is activated. |
void |
componentClosed()
Called only when multi view top component was closed. |
void |
componentDeactivated()
Called when this multi view element is deactivated. |
void |
componentHidden()
Called when this MultiViewElement was hidden. |
void |
componentOpened()
Called only when enclosing multi view top component was closed before and now is opened again for the first time. |
void |
componentShowing()
Called when this MultiViewElement is about to be shown. |
Action[] |
getActions()
Gets the actions which will appear in the popup menu of this component. |
Lookup |
getLookup()
Lookup for the MultiViewElement. |
JComponent |
getToolbarRepresentation()
Returns the visual component with the multi view element's toolbar.Should be relatively fast as it's called everytime the current perspective is switched. |
UndoRedo |
getUndoRedo()
UndoRedo support, Get the undo/redo support for this element. |
JComponent |
getVisualRepresentation()
Returns Swing visual representation of this multi view element. |
void |
setMultiViewCallback(MultiViewElementCallback callback)
Use the passed in callback instance for manipulating the enclosing multiview component, keep the instance around during lifecycle of the component if you want to automatically switch to this component etc. |
Method Detail |
---|
JComponent getVisualRepresentation()
JComponent getToolbarRepresentation()
Action[] getActions()
Subclasses are encouraged to use add the default TopComponent actions to the array of their own. These are accessible by calling MultiViewElementCallback.createDefaultActions()
public Action[] getActions() {
Action[] retValue;
// the multiviewObserver was passed to the element in setMultiViewCallback() method.
if (multiViewObserver != null) {
retValue = multiViewObserver.createDefaultActions();
// add you own custom actions here..
} else {
// fallback..
retValue = super.getActions();
}
return retValue;
}
Lookup getLookup()
void componentOpened()
void componentClosed()
void componentShowing()
void componentHidden()
void componentActivated()
void componentDeactivated()
UndoRedo getUndoRedo()
void setMultiViewCallback(MultiViewElementCallback callback)
CloseOperationState canCloseElement()
|
org.netbeans.core.multiview/1 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |