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, isChildPopupFocusedpublic static final Key<VisualPosition> ANCHOR_POPUP_POSITION
public <T> IPopupChooserBuilder<T> createPopupChooserBuilder(java.util.List<? extends T> list)
createPopupChooserBuilder in class JBPopupFactorypublic ListPopup createConfirmation(java.lang.String title, java.lang.Runnable onYes, int defaultOptionIndex)
JBPopupFactorycreateConfirmation in class JBPopupFactorytitle - 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)
JBPopupFactorycreateConfirmation in class JBPopupFactorytitle - 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 JBPopupFactorypublic Balloon getParentBalloonFor(java.awt.Component c)
getParentBalloonFor in class JBPopupFactoryprotected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JList<T> list)
createPopupComponentAdapter in class JBPopupFactoryprotected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JTree tree)
createPopupComponentAdapter in class JBPopupFactoryprotected <T> PopupChooserBuilder.PopupComponentAdapter<T> createPopupComponentAdapter(PopupChooserBuilder<T> builder, javax.swing.JTable table)
createPopupComponentAdapter in class JBPopupFactorypublic ListPopup createConfirmation(java.lang.String title, java.lang.String yesText, java.lang.String noText, java.lang.Runnable onYes, java.lang.Runnable onNo, int defaultOptionIndex)
JBPopupFactorycreateConfirmation in class JBPopupFactorytitle - 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 JBPopupFactorypublic 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 JBPopupFactorypublic 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 JBPopupFactorypublic ListPopup createListPopup(ListPopupStep step)
JBPopupFactorycreateListPopup in class JBPopupFactorystep - the custom step for the list popup.public ListPopup createListPopup(ListPopupStep step, int maxRowCount)
JBPopupFactorycreateListPopup in class JBPopupFactorystep - 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 JBPopupFactorypublic TreePopup createTree(TreePopupStep aStep)
createTree in class JBPopupFactorypublic ComponentPopupBuilder createComponentPopupBuilder(javax.swing.JComponent content, javax.swing.JComponent preferableFocusComponent)
createComponentPopupBuilder in class JBPopupFactorypublic RelativePoint guessBestPopupLocation(DataContext dataContext)
JBPopupFactoryguessBestPopupLocation in class JBPopupFactorydataContext - the data context from which the location is determined.public RelativePoint guessBestPopupLocation(javax.swing.JComponent component)
guessBestPopupLocation in class JBPopupFactorypublic boolean isBestPopupLocationVisible(Editor editor)
isBestPopupLocationVisible in class JBPopupFactoryeditor - the editor over which the popup is shown.public RelativePoint guessBestPopupLocation(Editor editor)
JBPopupFactoryguessBestPopupLocation in class JBPopupFactoryeditor - the editor over which the popup is shown.public java.awt.Point getCenterOf(javax.swing.JComponent container,
javax.swing.JComponent content)
getCenterOf in class JBPopupFactorypublic java.util.List<JBPopup> getChildPopups(java.awt.Component component)
getChildPopups in class JBPopupFactorypublic boolean isPopupActive()
isPopupActive in class JBPopupFactorypublic BalloonBuilder createBalloonBuilder(javax.swing.JComponent content)
createBalloonBuilder in class JBPopupFactorypublic BalloonBuilder createDialogBalloonBuilder(javax.swing.JComponent content, java.lang.String title)
createDialogBalloonBuilder in class JBPopupFactorypublic 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 JBPopupFactorypublic BalloonBuilder createHtmlTextBalloonBuilder(java.lang.String htmlContent, MessageType messageType, javax.swing.event.HyperlinkListener listener)
createHtmlTextBalloonBuilder in class JBPopupFactory