public class AbstractExtractMethodDialog<T> extends DialogWrapper implements ExtractMethodSettings<T>
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction
CANCEL_EXIT_CODE, CLOSE_EXIT_CODE, DEFAULT_ACTION, DIALOG_CONTENT_PANEL_PROPERTY, ERROR_FOREGROUND_COLOR, FOCUSED_ACTION, IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, myCancelAction, myCheckBoxDoNotShowDialog, myDisposable, myHelpAction, myOKAction, myPerformAction, myPreferredFocusedComponent, NEXT_USER_EXIT_CODE, OK_EXIT_CODE
Constructor and Description |
---|
AbstractExtractMethodDialog(Project project,
java.lang.String defaultName,
CodeFragment fragment,
T[] visibilityVariants,
ExtractMethodValidator validator,
ExtractMethodDecorator<T> decorator,
FileType type) |
Modifier and Type | Method and Description |
---|---|
protected javax.swing.Action [] |
createActions()
Creates actions for dialog.
|
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
static AbstractVariableData[] |
createVariableDataByNames(java.util.List<java.lang.String> args) |
static java.util.Map<java.lang.String,AbstractVariableData> |
createVariableMap(AbstractVariableData[] data) |
protected void |
doOKAction()
This method is invoked by default implementation of "OK" action.
|
AbstractVariableData [] |
getAbstractVariableData() |
protected java.lang.String |
getHelpId()
Returns the help identifier, or
null if no help is available. |
java.lang.String |
getMethodName() |
javax.swing.JComponent |
getPreferredFocusedComponent() |
T |
getVisibility() |
protected void |
init() |
addKeyListener, addMouseListener, addMouseListener, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, createButtonsPanel, createCancelAction, createContentPane, createContentPaneBorder, createDefaultActions, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createNorthPanel, createPeer, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createSouthPanel, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDimensionServiceKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHorizontalStretch, getInitialLocation, getLocation, getOKAction, getOwner, getPeer, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getTypeAheadTimeoutMs, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, initValidation, isAutoAdjustable, isCenterStrictedToPreferredSize, isDisposed, isModal, isModalProgress, isMoveHelpButtonLeft, isNorthStrictedToPreferredSize, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isSouthStrictedToPreferredSize, isToDispatchTypeAhead, isTypeAheadEnabled, isVisible, layoutButtonsPanel, pack, postponeValidation, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setButtonsMargin, setCancelButtonIcon, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setErrorInfoAll, setErrorText, setErrorText, setHelpTooltip, setHorizontalStretch, setInitialLocationCallback, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setResizable, setSize, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, show, showAndGet, showAndGetOk, startTrackingValidation, toBack, toBeShown, toFront, unregisterKeyboardActions, updateErrorInfo, validate
public AbstractExtractMethodDialog(Project project, java.lang.String defaultName, CodeFragment fragment, T[] visibilityVariants, ExtractMethodValidator validator, ExtractMethodDecorator<T> decorator, FileType type)
protected void init()
init
in class DialogWrapper
public javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent
in class DialogWrapper
public static AbstractVariableData[] createVariableDataByNames(java.util.List<java.lang.String> args)
public static java.util.Map<java.lang.String,AbstractVariableData> createVariableMap(AbstractVariableData[] data)
protected javax.swing.Action [] createActions()
DialogWrapper
DialogWrapper.getHelpId()
returns non-null value.
Each action is represented by JButton
created by DialogWrapper.createJButtonForAction(Action)
.
These buttons are then placed into south panel
of dialog.createActions
in class DialogWrapper
DialogWrapper.createSouthPanel()
,
DialogWrapper.createJButtonForAction(javax.swing.Action)
protected void doOKAction()
DialogWrapper
OK_EXIT_CODE
. This is convenient place to override functionality of "OK" action.
Note that the method does nothing if "OK" action isn't enabled.doOKAction
in class DialogWrapper
protected java.lang.String getHelpId()
DialogWrapper
null
if no help is available.getHelpId
in class DialogWrapper
protected javax.swing.JComponent createCenterPanel()
DialogWrapper
null
value. In this case there will be no options panel.createCenterPanel
in class DialogWrapper
public java.lang.String getMethodName()
getMethodName
in interface ExtractMethodSettings<T>
public AbstractVariableData [] getAbstractVariableData()
getAbstractVariableData
in interface ExtractMethodSettings<T>
public T getVisibility()
getVisibility
in interface ExtractMethodSettings<T>