public class ContentManagerImpl extends java.lang.Object implements ContentManager, java.beans.PropertyChangeListener, Disposable.Parent
Modifier and Type | Class and Description |
---|---|
static interface |
ContentManagerImpl.ContentUiProducer |
Disposable.Parent
Constructor and Description |
---|
ContentManagerImpl(boolean canCloseContents,
Project project,
Disposable parentDisposable,
ContentManagerImpl.ContentUiProducer contentUiProducer) |
ContentManagerImpl(ContentUI contentUI,
boolean canCloseContents,
Project project)
WARNING: as this class adds listener to the ProjectManager which is removed on projectClosed event, all instances of this class
must be created on already OPENED projects, otherwise there will be memory leak!
|
ContentManagerImpl(ContentUI contentUI,
boolean canCloseContents,
Project project,
Disposable parentDisposable) |
Modifier and Type | Method and Description |
---|---|
void |
addContent(Content content) |
void |
addContent(Content content,
int order) |
void |
addContentManagerListener(ContentManagerListener l) |
void |
addDataProvider(DataProvider provider) |
void |
addSelectedContent(Content content) |
void |
beforeTreeDispose() |
boolean |
canCloseAllContents() |
boolean |
canCloseContents() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
Content |
findContent(java.lang.String displayName) |
java.util.List<AnAction> |
getAdditionalPopupActions(Content content) |
java.lang.String |
getCloseActionName() |
java.lang.String |
getCloseAllButThisActionName()
Returns the localized name of the "Close All but This" action.
|
javax.swing.JComponent |
getComponent() |
Content |
getContent(int index) |
Content |
getContent(javax.swing.JComponent component) |
int |
getContentCount() |
Content [] |
getContents() |
ContentFactory |
getFactory() |
int |
getIndexOfContent(Content content) |
java.lang.String |
getNextContentActionName() |
java.lang.String |
getPreviousContentActionName() |
ActionCallback |
getReady(java.lang.Object requestor) |
Content |
getSelectedContent() |
Content [] |
getSelectedContents() |
boolean |
isDisposed() |
boolean |
isSelected(Content content) |
boolean |
isSingleSelection() |
void |
propertyChange(java.beans.PropertyChangeEvent event) |
void |
removeAllContents(boolean dispose) |
boolean |
removeContent(Content content,
boolean dispose) |
ActionCallback |
removeContent(Content content,
boolean dispose,
boolean requestFocus,
boolean forcedFocus) |
void |
removeContentManagerListener(ContentManagerListener l) |
void |
removeFromSelection(Content content) |
ActionCallback |
requestFocus(Content content,
boolean forced) |
ActionCallback |
selectNextContent() |
ActionCallback |
selectPreviousContent() |
void |
setSelectedContent(Content content) |
void |
setSelectedContent(Content content,
boolean requestFocus) |
void |
setSelectedContent(Content content,
boolean requestFocus,
boolean forcedFocus) |
ActionCallback |
setSelectedContent(Content content,
boolean requestFocus,
boolean forcedFocus,
boolean implicit) |
ActionCallback |
setSelectedContentCB(Content content) |
ActionCallback |
setSelectedContentCB(Content content,
boolean requestFocus) |
ActionCallback |
setSelectedContentCB(Content content,
boolean requestFocus,
boolean forcedFocus) |
public ContentManagerImpl(ContentUI contentUI, boolean canCloseContents, Project project)
public ContentManagerImpl(ContentUI contentUI, boolean canCloseContents, Project project, Disposable parentDisposable)
public ContentManagerImpl(boolean canCloseContents, Project project, Disposable parentDisposable, ContentManagerImpl.ContentUiProducer contentUiProducer)
public boolean canCloseContents()
canCloseContents
in interface ContentManager
public javax.swing.JComponent getComponent()
getComponent
in interface ContentManager
public ActionCallback getReady(java.lang.Object requestor)
public void addContent(Content content, int order)
addContent
in interface ContentManager
public void addContent(Content content)
addContent
in interface ContentManager
public boolean removeContent(Content content, boolean dispose)
removeContent
in interface ContentManager
public ActionCallback removeContent(Content content, boolean dispose, boolean requestFocus, boolean forcedFocus)
removeContent
in interface ContentManager
forcedFocus
- unusedpublic void removeAllContents(boolean dispose)
removeAllContents
in interface ContentManager
public int getContentCount()
getContentCount
in interface ContentManager
public Content [] getContents()
getContents
in interface ContentManager
public Content findContent(java.lang.String displayName)
findContent
in interface ContentManager
public Content getContent(int index)
getContent
in interface ContentManager
public Content getContent(javax.swing.JComponent component)
getContent
in interface ContentManager
public int getIndexOfContent(Content content)
getIndexOfContent
in interface ContentManager
public java.lang.String getCloseActionName()
getCloseActionName
in interface ContentManager
public java.lang.String getCloseAllButThisActionName()
ContentManager
getCloseAllButThisActionName
in interface ContentManager
public java.lang.String getPreviousContentActionName()
getPreviousContentActionName
in interface ContentManager
public java.lang.String getNextContentActionName()
getNextContentActionName
in interface ContentManager
public java.util.List<AnAction> getAdditionalPopupActions(Content content)
getAdditionalPopupActions
in interface ContentManager
public boolean canCloseAllContents()
canCloseAllContents
in interface ContentManager
public void addSelectedContent(Content content)
addSelectedContent
in interface ContentManager
public void removeFromSelection(Content content)
removeFromSelection
in interface ContentManager
public boolean isSelected(Content content)
isSelected
in interface ContentManager
public Content [] getSelectedContents()
getSelectedContents
in interface ContentManager
public Content getSelectedContent()
getSelectedContent
in interface ContentManager
public void setSelectedContent(Content content, boolean requestFocus)
setSelectedContent
in interface ContentManager
public ActionCallback setSelectedContentCB(Content content, boolean requestFocus)
setSelectedContentCB
in interface ContentManager
public void setSelectedContent(Content content, boolean requestFocus, boolean forcedFocus)
setSelectedContent
in interface ContentManager
forcedFocus
- unusedpublic ActionCallback setSelectedContentCB(Content content, boolean requestFocus, boolean forcedFocus)
setSelectedContentCB
in interface ContentManager
forcedFocus
- unusedpublic ActionCallback setSelectedContent(Content content, boolean requestFocus, boolean forcedFocus, boolean implicit)
setSelectedContent
in interface ContentManager
requestFocus
- whether content will request focus after selectionforcedFocus
- unusedimplicit
- if true
and content cannot be focused (e.g. it's minimized at the moment) ActionCallback.REJECTED
will be returnedpublic ActionCallback setSelectedContentCB(Content content)
setSelectedContentCB
in interface ContentManager
public void setSelectedContent(Content content)
setSelectedContent
in interface ContentManager
public ActionCallback selectPreviousContent()
selectPreviousContent
in interface ContentManager
public ActionCallback selectNextContent()
selectNextContent
in interface ContentManager
public void addContentManagerListener(ContentManagerListener l)
addContentManagerListener
in interface ContentManager
public void removeContentManagerListener(ContentManagerListener l)
removeContentManagerListener
in interface ContentManager
public ActionCallback requestFocus(Content content, boolean forced)
requestFocus
in interface ContentManager
forced
- unusedpublic void addDataProvider(DataProvider provider)
addDataProvider
in interface ContentManager
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public ContentFactory getFactory()
getFactory
in interface ContentManager
public void beforeTreeDispose()
beforeTreeDispose
in interface Disposable.Parent
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isDisposed()
isDisposed
in interface ContentManager
public boolean isSingleSelection()
isSingleSelection
in interface ContentManager