public class ConfigurableWrapper extends java.lang.Object implements SearchableConfigurable
SearchableConfigurable.Delegate, SearchableConfigurable.Merged, SearchableConfigurable.Parent
Configurable.Composite, Configurable.NoMargin, Configurable.NoScroll, Configurable.TopComponentController, Configurable.TopComponentProvider, Configurable.VariableProjectAppLevel, Configurable.WithEpDependencies
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<Configurable> |
COMPARATOR |
APPLICATION_CONFIGURABLE, PROJECT_CONFIGURABLE
Modifier and Type | Method and Description |
---|---|
ConfigurableWrapper |
addChild(Configurable configurable) |
void |
apply()
Stores the settings from the Swing form to the configurable component.
|
void |
cancel()
Called when 'Cancel' is pressed in the Settings dialog.
|
static <T> T |
cast(java.lang.Class<T> type,
UnnamedConfigurable configurable) |
javax.swing.JComponent |
createComponent()
Creates new Swing form that enables user to configure the settings.
|
static <T extends UnnamedConfigurable> |
createConfigurables(ExtensionPointName<? extends ConfigurableEP<T>> name) |
void |
disposeUIResources()
Notifies the configurable component that the Swing form will be closed.
|
java.lang.Runnable |
enableSearch(java.lang.String option) |
UnnamedConfigurable |
getConfigurable() |
java.lang.String |
getDisplayName()
Returns the visible name of the configurable component.
|
ConfigurableEP<?> |
getExtensionPoint() |
java.lang.String |
getHelpTopic()
Returns the topic in the help file which is shown when help for the configurable is requested.
|
java.lang.String |
getId()
Unique configurable id.
|
java.lang.Class<?> |
getOriginalClass()
When building an index of searchable options, it's important to know a class which caused the creation of a configurable.
|
java.lang.String |
getParentId() |
Project |
getProject() |
java.lang.String |
getProviderClass() |
UnnamedConfigurable |
getRawConfigurable() |
int |
getWeight() |
static boolean |
hasOwnContent(UnnamedConfigurable configurable) |
boolean |
isModified()
Indicates whether the Swing form was modified or not.
|
static boolean |
isNonDefaultProject(Configurable configurable) |
void |
reset()
Loads the settings from the configurable component to the Swing form.
|
java.lang.String |
toString() |
static <T extends UnnamedConfigurable> |
wrapConfigurable(ConfigurableEP<T> ep) |
static <T extends UnnamedConfigurable> |
wrapConfigurable(ConfigurableEP<T> ep,
boolean settings) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPreferredFocusedComponent, isModified, isModified, isModified, isModified
public static final java.util.Comparator<Configurable> COMPARATOR
public static <T extends UnnamedConfigurable> T wrapConfigurable(ConfigurableEP<T> ep)
public static <T extends UnnamedConfigurable> T wrapConfigurable(ConfigurableEP<T> ep, boolean settings)
public static <T extends UnnamedConfigurable> java.util.List<T> createConfigurables(ExtensionPointName<? extends ConfigurableEP<T>> name)
public static boolean hasOwnContent(UnnamedConfigurable configurable)
public static boolean isNonDefaultProject(Configurable configurable)
public static <T> T cast(java.lang.Class<T> type, UnnamedConfigurable configurable)
public UnnamedConfigurable getRawConfigurable()
public UnnamedConfigurable getConfigurable()
public int getWeight()
public java.lang.String getDisplayName()
Configurable
getDisplayName
in interface Configurable
public java.lang.String getProviderClass()
public Project getProject()
public java.lang.String getHelpTopic()
Configurable
getHelpTopic
in interface Configurable
null
if no help is availablepublic javax.swing.JComponent createComponent()
UnnamedConfigurable
Also this place is designed to allocate resources (subscriptions/listeners etc.)
createComponent
in interface UnnamedConfigurable
null
if it cannot be createdUnnamedConfigurable.disposeUIResources()
public boolean isModified()
UnnamedConfigurable
isModified
in interface UnnamedConfigurable
true
if the settings were modified, false
otherwisepublic void apply() throws ConfigurationException
UnnamedConfigurable
apply
in interface UnnamedConfigurable
ConfigurationException
- if values cannot be appliedpublic void reset()
UnnamedConfigurable
reset
in interface UnnamedConfigurable
public void disposeUIResources()
UnnamedConfigurable
disposeUIResources
in interface UnnamedConfigurable
public void cancel()
UnnamedConfigurable
cancel
in interface UnnamedConfigurable
public java.lang.String getId()
SearchableConfigurable
getId
in interface SearchableConfigurable
ConfigurableEP.id
public ConfigurableEP<?> getExtensionPoint()
public java.lang.String getParentId()
public ConfigurableWrapper addChild(Configurable configurable)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Runnable enableSearch(java.lang.String option)
enableSearch
in interface SearchableConfigurable
option
- setting search querypublic java.lang.Class<?> getOriginalClass()
SearchableConfigurable
CompositeConfigurable
.
getOriginalClass
in interface SearchableConfigurable