public class RunnerLayoutUiImpl extends java.lang.Object implements Disposable.Parent, RunnerLayoutUi, LayoutStateDefaults, LayoutViewOptions, DataProvider
Disposable.Parent
RunnerLayoutUi.Factory
Modifier and Type | Field and Description |
---|---|
static Key<java.lang.String> |
CONTENT_TYPE |
STARTUP
Constructor and Description |
---|
RunnerLayoutUiImpl(Project project,
Disposable parent,
java.lang.String runnerId,
java.lang.String runnerTitle,
java.lang.String sessionName) |
Modifier and Type | Method and Description |
---|---|
Content |
addContent(Content content) |
Content |
addContent(Content content,
boolean applyDefaults,
int defaultTabId,
PlaceInGrid defaultPlace,
boolean defaultIsMinimized) |
Content |
addContent(Content content,
int defaultTabId,
PlaceInGrid defaultPlace,
boolean defaultIsMinimized) |
RunnerLayoutUi |
addListener(ContentManagerListener listener,
Disposable parent) |
void |
attractBy(java.lang.String condition) |
void |
beforeTreeDispose() |
LayoutStateDefaults |
cancelContentAttraction(java.lang.String condition)
Cancels attractions previously scheduled by
LayoutStateDefaults.initContentAttraction(java.lang.String, java.lang.String) to be performed
when condition happens. |
void |
clearAttractionBy(java.lang.String condition) |
Content |
createContent(java.lang.String contentId,
ComponentWithActions withActions,
java.lang.String displayName,
javax.swing.Icon icon,
javax.swing.JComponent toFocus) |
Content |
createContent(java.lang.String id,
javax.swing.JComponent component,
java.lang.String displayName,
javax.swing.Icon icon,
javax.swing.JComponent focusable) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
Content |
findContent(java.lang.String key) |
java.util.List<AnAction> |
getActions() |
javax.swing.JComponent |
getComponent() |
ContentManager |
getContentManager() |
Content [] |
getContents() |
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
LayoutStateDefaults |
getDefaults() |
RunnerLayout |
getLayout() |
AnAction |
getLayoutActions() |
AnAction [] |
getLayoutActionsList() |
LayoutViewOptions |
getOptions() |
AnAction |
getSettingsActions() |
AnAction [] |
getSettingsActionsList() |
LayoutStateDefaults |
initContentAttraction(java.lang.String contentId,
java.lang.String condition,
LayoutAttractionPolicy policy)
Schedules an attraction specified by
policy for a content with contentId . |
LayoutStateDefaults |
initTabDefaults(int id,
java.lang.String text,
javax.swing.Icon icon)
Sets default tab text and icon for a tab with given
tabId . |
boolean |
isDisposed() |
boolean |
isToFocus(Content content,
java.lang.String condition) |
boolean |
removeContent(Content content,
boolean dispose) |
void |
removeContent(java.lang.String id,
boolean dispose) |
void |
removeListener(ContentManagerListener listener) |
ActionCallback |
selectAndFocus(Content content,
boolean requestFocus,
boolean forced) |
ActionCallback |
selectAndFocus(Content content,
boolean requestFocus,
boolean forced,
boolean implicit) |
LayoutViewOptions |
setAdditionalFocusActions(ActionGroup group) |
LayoutViewOptions |
setAttractionPolicy(java.lang.String contentId,
LayoutAttractionPolicy policy) |
void |
setBouncing(Content content,
boolean activate) |
LayoutViewOptions |
setConditionAttractionPolicy(java.lang.String condition,
LayoutAttractionPolicy policy) |
void |
setContentToolbarBefore(boolean value) |
LayoutViewOptions |
setLeftToolbar(ActionGroup leftToolbar,
java.lang.String place) |
void |
setLeftToolbarVisible(boolean value) |
LayoutViewOptions |
setMinimizeActionEnabled(boolean enabled) |
LayoutViewOptions |
setMoveToGridActionEnabled(boolean enabled) |
LayoutViewOptions |
setTabPopupActions(ActionGroup group) |
LayoutViewOptions |
setToDisposeRemoveContent(boolean toDispose) |
LayoutViewOptions |
setToFocus(Content content,
java.lang.String condition) |
LayoutViewOptions |
setTopLeftToolbar(ActionGroup actions,
java.lang.String place) |
LayoutViewOptions |
setTopRightToolbar(ActionGroup actions,
java.lang.String place) |
LayoutViewOptions |
setTopToolbar(ActionGroup actions,
java.lang.String place)
Deprecated.
|
void |
updateActionsNow() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initContentAttraction, initFocusContent, initFocusContent
public static final Key<java.lang.String> CONTENT_TYPE
public RunnerLayoutUiImpl(Project project, Disposable parent, java.lang.String runnerId, java.lang.String runnerTitle, java.lang.String sessionName)
@Deprecated public LayoutViewOptions setTopToolbar(ActionGroup actions, java.lang.String place)
setTopToolbar
in interface LayoutViewOptions
public LayoutViewOptions setTopLeftToolbar(ActionGroup actions, java.lang.String place)
setTopLeftToolbar
in interface LayoutViewOptions
public LayoutViewOptions setTopRightToolbar(ActionGroup actions, java.lang.String place)
setTopRightToolbar
in interface LayoutViewOptions
public LayoutStateDefaults initTabDefaults(int id, java.lang.String text, javax.swing.Icon icon)
LayoutStateDefaults
tabId
.
Default tab text will be used if it wasn't set explicitly for a tab, e.g. using
Content.setDisplayName(String)
for content associated with the tab.initTabDefaults
in interface LayoutStateDefaults
public LayoutStateDefaults initContentAttraction(java.lang.String contentId, java.lang.String condition, LayoutAttractionPolicy policy)
LayoutStateDefaults
policy
for a content with contentId
. The attraction will be
performed when condition
happens.
This method also cancels all previously scheduled attractions associated with condition
.initContentAttraction
in interface LayoutStateDefaults
contentId
- String identifying a content
condition
- String identifying a moment of time to perform the content attraction, e.g.
LayoutViewOptions.STARTUP
on content UI showingpolicy
- LayoutAttractionPolicy instancepublic LayoutStateDefaults cancelContentAttraction(java.lang.String condition)
LayoutStateDefaults
LayoutStateDefaults.initContentAttraction(java.lang.String, java.lang.String)
to be performed
when condition
happens.cancelContentAttraction
in interface LayoutStateDefaults
condition
- String identifying a moment of time, e.g.
LayoutViewOptions.STARTUP
on content UI showingpublic Content addContent(Content content)
addContent
in interface RunnerLayoutUi
public Content addContent(Content content, int defaultTabId, PlaceInGrid defaultPlace, boolean defaultIsMinimized)
addContent
in interface RunnerLayoutUi
public Content addContent(Content content, boolean applyDefaults, int defaultTabId, PlaceInGrid defaultPlace, boolean defaultIsMinimized)
public Content createContent(java.lang.String id, javax.swing.JComponent component, java.lang.String displayName, javax.swing.Icon icon, javax.swing.JComponent focusable)
createContent
in interface RunnerLayoutUi
public Content createContent(java.lang.String contentId, ComponentWithActions withActions, java.lang.String displayName, javax.swing.Icon icon, javax.swing.JComponent toFocus)
createContent
in interface RunnerLayoutUi
public javax.swing.JComponent getComponent()
getComponent
in interface RunnerLayoutUi
public RunnerLayout getLayout()
public void updateActionsNow()
updateActionsNow
in interface RunnerLayoutUi
public void beforeTreeDispose()
beforeTreeDispose
in interface Disposable.Parent
public void dispose()
Disposable
dispose
in interface Disposable
public ContentManager getContentManager()
getContentManager
in interface RunnerLayoutUi
public ActionCallback selectAndFocus(Content content, boolean requestFocus, boolean forced)
selectAndFocus
in interface RunnerLayoutUi
public ActionCallback selectAndFocus(Content content, boolean requestFocus, boolean forced, boolean implicit)
selectAndFocus
in interface RunnerLayoutUi
public boolean removeContent(Content content, boolean dispose)
removeContent
in interface RunnerLayoutUi
public boolean isToFocus(Content content, java.lang.String condition)
isToFocus
in interface LayoutViewOptions
public LayoutViewOptions setToFocus(Content content, java.lang.String condition)
setToFocus
in interface LayoutViewOptions
public void attractBy(java.lang.String condition)
attractBy
in interface RunnerLayoutUi
public void clearAttractionBy(java.lang.String condition)
clearAttractionBy
in interface RunnerLayoutUi
public void removeContent(java.lang.String id, boolean dispose)
public AnAction getLayoutActions()
getLayoutActions
in interface LayoutViewOptions
public AnAction [] getLayoutActionsList()
getLayoutActionsList
in interface LayoutViewOptions
public LayoutViewOptions setTabPopupActions(ActionGroup group)
setTabPopupActions
in interface LayoutViewOptions
public LayoutViewOptions setLeftToolbar(ActionGroup leftToolbar, java.lang.String place)
setLeftToolbar
in interface LayoutViewOptions
public Content findContent(java.lang.String key)
findContent
in interface RunnerLayoutUi
public RunnerLayoutUi addListener(ContentManagerListener listener, Disposable parent)
addListener
in interface RunnerLayoutUi
public void removeListener(ContentManagerListener listener)
removeListener
in interface RunnerLayoutUi
public void setBouncing(Content content, boolean activate)
setBouncing
in interface RunnerLayoutUi
public boolean isDisposed()
isDisposed
in interface RunnerLayoutUi
public LayoutViewOptions setMinimizeActionEnabled(boolean enabled)
setMinimizeActionEnabled
in interface LayoutViewOptions
public LayoutViewOptions setToDisposeRemoveContent(boolean toDispose)
public LayoutViewOptions setMoveToGridActionEnabled(boolean enabled)
setMoveToGridActionEnabled
in interface LayoutViewOptions
public LayoutViewOptions setAttractionPolicy(java.lang.String contentId, LayoutAttractionPolicy policy)
setAttractionPolicy
in interface LayoutViewOptions
public LayoutViewOptions setConditionAttractionPolicy(java.lang.String condition, LayoutAttractionPolicy policy)
setConditionAttractionPolicy
in interface LayoutViewOptions
public LayoutStateDefaults getDefaults()
getDefaults
in interface RunnerLayoutUi
public LayoutViewOptions getOptions()
getOptions
in interface RunnerLayoutUi
public LayoutViewOptions setAdditionalFocusActions(ActionGroup group)
setAdditionalFocusActions
in interface LayoutViewOptions
public AnAction getSettingsActions()
getSettingsActions
in interface LayoutViewOptions
public AnAction [] getSettingsActionsList()
getSettingsActionsList
in interface LayoutViewOptions
public Content [] getContents()
getContents
in interface RunnerLayoutUi
public java.lang.Object getData(java.lang.String dataId)
DataProvider
PlatformDataKeys
class.getData
in interface DataProvider
dataId
- the data identifier for which the value is requested.public void setLeftToolbarVisible(boolean value)
public void setContentToolbarBefore(boolean value)
public java.util.List<AnAction> getActions()