public class PopupFactoryImpl extends JBPopupFactory
Modifier and Type | Class and Description |
---|---|
static class |
PopupFactoryImpl.ActionGroupPopup |
static class |
PopupFactoryImpl.ActionItem |
JBPopupFactory.ActionSelectionAid
Modifier and Type | Field and Description |
---|---|
static Key<java.awt.Point> |
ANCHOR_POPUP_POINT
If corresponding value is defined for an
Editor , popups shown for the editor will be located at specified point. |
static Key<VisualPosition> |
ANCHOR_POPUP_POSITION
Allows to get an editor position for which a popup with auxiliary information might be shown.
|
Constructor and Description |
---|
PopupFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
ListPopup |
createActionGroupPopup(java.lang.String title,
ActionGroup actionGroup,
DataContext dataContext,
boolean showNumbers,
boolean showDisabledActions,
boolean honorActionMnemonics,
java.lang.Runnable disposeCallback,
int maxRowCount,
Condition<? super AnAction> preselectActionCondition) |
ListPopup |
createActionGroupPopup(java.lang.String title,
ActionGroup actionGroup,
DataContext dataContext,
JBPopupFactory.ActionSelectionAid aid,
boolean showDisabledActions,
java.lang.Runnable disposeCallback,
int maxRowCount,
Condition<? super AnAction> preselectActionCondition,
java.lang.String actionPlace) |
ListPopupStep<PopupFactoryImpl.ActionItem> |
createActionsStep(ActionGroup actionGroup,
DataContext dataContext,
java.lang.String actionPlace,
boolean showNumbers,
boolean showDisabledActions,
java.lang.String title,
java.awt.Component component,
boolean honorActionMnemonics,
int defaultOptionIndex,
boolean autoSelectionEnabled) |
BalloonBuilder |
createBalloonBuilder(javax.swing.JComponent content) |
ComponentPopupBuilder |
createComponentPopupBuilder(javax.swing.JComponent content,
javax.swing.JComponent preferableFocusComponent) |
ListPopup |
createConfirmation(java.lang.String title,
java.lang.Runnable onYes,
int defaultOptionIndex)
Creates a popup with the specified title and two options, Yes and No.
|
ListPopup |
createConfirmation(java.lang.String title,
java.lang.String yesText,
java.lang.String noText,
java.lang.Runnable onYes,
int defaultOptionIndex)
Creates a popup allowing to choose one of two specified options and execute code when one of them is selected.
|
ListPopup |
createConfirmation(java.lang.String title,
java.lang.String yesText,
java.lang.String noText,
java.lang.Runnable onYes,
java.lang.Runnable onNo,
int defaultOptionIndex)
Creates a popup allowing to choose one of two specified options and execute code when either of them is selected.
|
BalloonBuilder |
createDialogBalloonBuilder(javax.swing.JComponent content,
java.lang.String title) |
BalloonBuilder |
createHtmlTextBalloonBuilder(java.lang.String htmlContent,
javax.swing.Icon icon,
java.awt.Color textColor,
java.awt.Color fillColor,
javax.swing.event.HyperlinkListener listener) |
BalloonBuilder |
createHtmlTextBalloonBuilder(java.lang.String htmlContent,
MessageType messageType,
javax.swing.event.HyperlinkListener listener) |
ListPopup |
createListPopup(ListPopupStep step)
Creates a custom list popup with the specified step.
|
ListPopup |
createListPopup(ListPopupStep step,
int maxRowCount)
Creates a custom list popup with the specified step.
|
JBPopup |
createMessage(java.lang.String text) |
<T> IPopupChooserBuilder<T> |
createPopupChooserBuilder(java.util.List<? extends T> list) |
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> |
createPopupComponentAdapter(PopupChooserBuilder<T> builder,
javax.swing.JList<T> list) |
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> |
createPopupComponentAdapter(PopupChooserBuilder<T> builder,
javax.swing.JTable table) |
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> |
createPopupComponentAdapter(PopupChooserBuilder<T> builder,
javax.swing.JTree tree) |
TreePopup |
createTree(JBPopup parent,
TreePopupStep aStep,
java.lang.Object parentValue) |
TreePopup |
createTree(TreePopupStep aStep) |
java.awt.Point |
getCenterOf(javax.swing.JComponent container,
javax.swing.JComponent content) |
java.util.List<JBPopup> |
getChildPopups(java.awt.Component component) |
Balloon |
getParentBalloonFor(java.awt.Component c) |
RelativePoint |
guessBestPopupLocation(DataContext dataContext)
Returns the location where a popup with the specified data context is displayed.
|
RelativePoint |
guessBestPopupLocation(Editor editor)
Returns the location where a popup invoked from the specified editor should be displayed.
|
RelativePoint |
guessBestPopupLocation(javax.swing.JComponent component) |
boolean |
isBestPopupLocationVisible(Editor editor) |
boolean |
isPopupActive() |
createActionGroupPopup, createActionGroupPopup, createActionGroupPopup, createActionGroupPopup, createActionsStep, createActionsStep, createHtmlTextBalloonBuilder, createListPopupBuilder, createPopupChooserBuilder, getChildFocusedPopup, getInstance, isChildPopupFocused
public static final Key<VisualPosition> ANCHOR_POPUP_POSITION
public <T> IPopupChooserBuilder<T> createPopupChooserBuilder(java.util.List<? extends T> list)
createPopupChooserBuilder
in class JBPopupFactory
public ListPopup createConfirmation(java.lang.String title, java.lang.Runnable onYes, int defaultOptionIndex)
JBPopupFactory
createConfirmation
in class JBPopupFactory
title
- the title of the popup.onYes
- the runnable which is executed when the Yes option is selected.defaultOptionIndex
- the index of the option which is selected by default.public ListPopup createConfirmation(java.lang.String title, java.lang.String yesText, java.lang.String noText, java.lang.Runnable onYes, int defaultOptionIndex)
JBPopupFactory
createConfirmation
in class JBPopupFactory
title
- the title of the popup.yesText
- the title for the Yes option.noText
- the title for the No option.onYes
- the runnable which is executed when the Yes option is selected.defaultOptionIndex
- the index of the option which is selected by default.public JBPopup createMessage(java.lang.String text)
createMessage
in class JBPopupFactory
public Balloon getParentBalloonFor(java.awt.Component c)
getParentBalloonFor
in class JBPopupFactory
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JList<T> list)
createPopupComponentAdapter
in class JBPopupFactory
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JTree tree)
createPopupComponentAdapter
in class JBPopupFactory
protected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JTable table)
createPopupComponentAdapter
in class JBPopupFactory
public ListPopup createConfirmation(java.lang.String title, java.lang.String yesText, java.lang.String noText, java.lang.Runnable onYes, java.lang.Runnable onNo, int defaultOptionIndex)
JBPopupFactory
createConfirmation
in class JBPopupFactory
title
- the title of the popup.yesText
- the title for the Yes option.noText
- the title for the No option.onYes
- the runnable which is executed when the Yes option is selected.onNo
- the runnable which is executed when the No option is selected.defaultOptionIndex
- the index of the option which is selected by default.public ListPopup createActionGroupPopup(java.lang.String title, ActionGroup actionGroup, DataContext dataContext, JBPopupFactory.ActionSelectionAid aid, boolean showDisabledActions, java.lang.Runnable disposeCallback, int maxRowCount, Condition<? super AnAction> preselectActionCondition, java.lang.String actionPlace)
createActionGroupPopup
in class JBPopupFactory
public ListPopup createActionGroupPopup(java.lang.String title, ActionGroup actionGroup, DataContext dataContext, boolean showNumbers, boolean showDisabledActions, boolean honorActionMnemonics, java.lang.Runnable disposeCallback, int maxRowCount, Condition<? super AnAction> preselectActionCondition)
createActionGroupPopup
in class JBPopupFactory
public ListPopupStep<PopupFactoryImpl.ActionItem> createActionsStep(ActionGroup actionGroup, DataContext dataContext, java.lang.String actionPlace, boolean showNumbers, boolean showDisabledActions, java.lang.String title, java.awt.Component component, boolean honorActionMnemonics, int defaultOptionIndex, boolean autoSelectionEnabled)
createActionsStep
in class JBPopupFactory
public ListPopup createListPopup(ListPopupStep step)
JBPopupFactory
createListPopup
in class JBPopupFactory
step
- the custom step for the list popup.public ListPopup createListPopup(ListPopupStep step, int maxRowCount)
JBPopupFactory
createListPopup
in class JBPopupFactory
step
- the custom step for the list popup.maxRowCount
- the number of visible rows to show in the popup (if the popup has more items,
a scrollbar will be displayed).public TreePopup createTree(JBPopup parent, TreePopupStep aStep, java.lang.Object parentValue)
createTree
in class JBPopupFactory
public TreePopup createTree(TreePopupStep aStep)
createTree
in class JBPopupFactory
public ComponentPopupBuilder createComponentPopupBuilder(javax.swing.JComponent content, javax.swing.JComponent preferableFocusComponent)
createComponentPopupBuilder
in class JBPopupFactory
public RelativePoint guessBestPopupLocation(DataContext dataContext)
JBPopupFactory
guessBestPopupLocation
in class JBPopupFactory
dataContext
- the data context from which the location is determined.public RelativePoint guessBestPopupLocation(javax.swing.JComponent component)
guessBestPopupLocation
in class JBPopupFactory
public boolean isBestPopupLocationVisible(Editor editor)
isBestPopupLocationVisible
in class JBPopupFactory
editor
- the editor over which the popup is shown.public RelativePoint guessBestPopupLocation(Editor editor)
JBPopupFactory
guessBestPopupLocation
in class JBPopupFactory
editor
- the editor over which the popup is shown.public java.awt.Point getCenterOf(javax.swing.JComponent container, javax.swing.JComponent content)
getCenterOf
in class JBPopupFactory
public java.util.List<JBPopup> getChildPopups(java.awt.Component component)
getChildPopups
in class JBPopupFactory
public boolean isPopupActive()
isPopupActive
in class JBPopupFactory
public BalloonBuilder createBalloonBuilder(javax.swing.JComponent content)
createBalloonBuilder
in class JBPopupFactory
public BalloonBuilder createDialogBalloonBuilder(javax.swing.JComponent content, java.lang.String title)
createDialogBalloonBuilder
in class JBPopupFactory
public BalloonBuilder createHtmlTextBalloonBuilder(java.lang.String htmlContent, javax.swing.Icon icon, java.awt.Color textColor, java.awt.Color fillColor, javax.swing.event.HyperlinkListener listener)
createHtmlTextBalloonBuilder
in class JBPopupFactory
public BalloonBuilder createHtmlTextBalloonBuilder(java.lang.String htmlContent, MessageType messageType, javax.swing.event.HyperlinkListener listener)
createHtmlTextBalloonBuilder
in class JBPopupFactory