public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract implements EditorOptionsProvider, SchemesModel<EditorColorsScheme>, Configurable.WithEpDependencies
SearchableConfigurable.Delegate, SearchableConfigurable.Merged, SearchableConfigurable.ParentConfigurable.Composite, Configurable.NoMargin, Configurable.NoScroll, Configurable.TopComponentController, Configurable.TopComponentProvider, Configurable.VariableProjectAppLevel, Configurable.WithEpDependenciesSearchableConfigurable.Parent.Abstract| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
static java.lang.String |
SCOPES_GROUP
Deprecated.
Use
getScopesGroup() instead |
APPLICATION_CONFIGURABLE, PROJECT_CONFIGURABLE| Constructor and Description |
|---|
ColorAndFontOptions() |
| Modifier and Type | Method and Description |
|---|---|
void |
addImportedScheme(EditorColorsScheme imported) |
void |
addListener(ColorAndFontSettingsListener listener) |
void |
apply()
Stores the settings from the Swing form to the configurable component.
|
Configurable [] |
buildConfigurables() |
static boolean |
canBeDeleted(EditorColorsScheme scheme) |
boolean |
canDeleteScheme(EditorColorsScheme scheme) |
boolean |
canDuplicateScheme(EditorColorsScheme scheme) |
boolean |
canRenameScheme(EditorColorsScheme scheme) |
boolean |
canResetScheme(EditorColorsScheme scheme) |
boolean |
containsScheme(java.lang.String name,
boolean projectScheme) |
javax.swing.JComponent |
createComponent()
Creates new Swing form that enables user to configure the settings.
|
protected java.util.List<ColorAndFontPanelFactory> |
createPanelFactories() |
boolean |
differsFromDefault(EditorColorsScheme scheme) |
void |
disposeUIResources()
Notifies the configurable component that the Swing form will be closed.
|
NewColorAndFontPanel |
findPage(java.lang.String pageName) |
SearchableConfigurable |
findSubConfigurable(java.lang.Class pageClass) |
SearchableConfigurable |
findSubConfigurable(java.lang.String pageName) |
EditorSchemeAttributeDescriptor[] |
getCurrentDescriptions() |
java.util.Collection<BaseExtensionPointName<?>> |
getDependencies() |
java.lang.String |
getDisplayName()
Returns the visible name of the configurable component.
|
static java.lang.String |
getFontConfigurableName() |
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.util.Collection<EditorColorsScheme> |
getOrderedSchemes() |
java.util.Collection<EditorColorsScheme> |
getSchemes() |
static java.lang.String |
getScopesGroup() |
EditorColorsScheme |
getSelectedScheme() |
boolean |
hasOwnContent() |
boolean |
isModified()
Indicates whether the Swing form was modified or not.
|
boolean |
isProjectScheme(EditorColorsScheme scheme) |
static boolean |
isReadOnly(EditorColorsScheme scheme) |
void |
removeScheme(EditorColorsScheme scheme) |
void |
reset()
Loads the settings from the configurable component to the Swing form.
|
void |
resetFromChild() |
boolean |
saveSchemeAs(EditorColorsScheme editorScheme,
java.lang.String name) |
static boolean |
selectOrEditColor(DataContext context,
java.lang.String search,
java.lang.Class<?> type)
Shows a requested page to edit a color settings.
|
static boolean |
selectOrEditColor(DataContext context,
java.lang.String search,
java.lang.String name)
Shows a requested page to edit a color settings.
|
EditorColorsScheme |
selectScheme(java.lang.String name) |
void |
stateChanged() |
static void |
writeTempScheme(EditorColorsScheme colorsScheme) |
static void |
writeTempScheme(Element scheme,
EditorColorsScheme parentScheme) |
getConfigurablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenableSearch, getOriginalClassgetPreferredFocusedComponent, isModified, isModified, isModified, isModifiedcancelisVisiblepublic static final java.lang.String ID
@Deprecated public static final java.lang.String SCOPES_GROUP
getScopesGroup() insteadpublic void addListener(ColorAndFontSettingsListener listener)
public void stateChanged()
public java.lang.String getDisplayName()
ConfigurablegetDisplayName in interface Configurablepublic boolean isModified()
UnnamedConfigurableisModified in interface UnnamedConfigurableisModified in class SearchableConfigurable.Parent.Abstracttrue if the settings were modified, false otherwisepublic EditorColorsScheme selectScheme(java.lang.String name)
public EditorColorsScheme getSelectedScheme()
public EditorSchemeAttributeDescriptor[] getCurrentDescriptions()
public boolean canDuplicateScheme(EditorColorsScheme scheme)
canDuplicateScheme in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.public boolean canResetScheme(EditorColorsScheme scheme)
canResetScheme in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.SchemesModel.differsFromDefault(Scheme)public boolean canDeleteScheme(EditorColorsScheme scheme)
canDeleteScheme in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.public boolean isProjectScheme(EditorColorsScheme scheme)
isProjectScheme in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.false if project schemes are not supported.public boolean canRenameScheme(EditorColorsScheme scheme)
canRenameScheme in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.public boolean containsScheme(java.lang.String name,
boolean projectScheme)
containsScheme in interface SchemesModel<EditorColorsScheme>name - The scheme to check.projectScheme - Level of the scheme to check. If schemes model does not support project level schemes
then the parameter is always equal to false.public boolean differsFromDefault(EditorColorsScheme scheme)
differsFromDefault in interface SchemesModel<EditorColorsScheme>scheme - The scheme to check.SchemesModel.canResetScheme(Scheme)
returns true.public java.util.Collection<BaseExtensionPointName<?>> getDependencies()
getDependencies in interface Configurable.WithEpDependenciespublic static boolean isReadOnly(EditorColorsScheme scheme)
public static boolean canBeDeleted(EditorColorsScheme scheme)
public java.util.Collection<EditorColorsScheme> getOrderedSchemes()
public java.util.Collection<EditorColorsScheme> getSchemes()
public boolean saveSchemeAs(EditorColorsScheme editorScheme, java.lang.String name)
public void addImportedScheme(EditorColorsScheme imported)
public void removeScheme(EditorColorsScheme scheme)
removeScheme in interface SchemesModel<EditorColorsScheme>public void apply()
throws ConfigurationException
UnnamedConfigurableapply in interface UnnamedConfigurableapply in class SearchableConfigurable.Parent.AbstractConfigurationException - if values cannot be appliedpublic javax.swing.JComponent createComponent()
UnnamedConfigurableAlso this place is designed to allocate resources (subscriptions/listeners etc.)
createComponent in interface UnnamedConfigurablecreateComponent in class SearchableConfigurable.Parent.Abstractnull if it cannot be createdUnnamedConfigurable.disposeUIResources()public boolean hasOwnContent()
hasOwnContent in interface SearchableConfigurable.Parentpublic Configurable [] buildConfigurables()
buildConfigurables in class SearchableConfigurable.Parent.Abstractprotected java.util.List<ColorAndFontPanelFactory> createPanelFactories()
public static java.lang.String getFontConfigurableName()
public void reset()
UnnamedConfigurablereset in interface UnnamedConfigurablepublic void resetFromChild()
public void disposeUIResources()
UnnamedConfigurabledisposeUIResources in interface UnnamedConfigurabledisposeUIResources in class SearchableConfigurable.Parent.Abstractpublic java.lang.String getHelpTopic()
ConfigurablegetHelpTopic in interface Configurablenull if no help is availablepublic static void writeTempScheme(EditorColorsScheme colorsScheme)
public static void writeTempScheme(Element scheme,
EditorColorsScheme parentScheme)
public java.lang.String getId()
SearchableConfigurablegetId in interface SearchableConfigurableConfigurableEP.idpublic SearchableConfigurable findSubConfigurable(java.lang.Class pageClass)
public SearchableConfigurable findSubConfigurable(java.lang.String pageName)
public NewColorAndFontPanel findPage(java.lang.String pageName)
public static boolean selectOrEditColor(DataContext context, java.lang.String search, java.lang.String name)
DataManager.getInstance().getDataContext(myComponent)where is
myComponent is a JComponent in a Swing hierarchy.
A specific color can be requested by the search text.context - a data context to find Settings or a parent for dialogsearch - a text to find on the found pagename - a name of a page to find via findSubConfigurable(String)true if a color was shown to edit, false if a requested page does not existpublic static boolean selectOrEditColor(DataContext context, java.lang.String search, java.lang.Class<?> type)
DataManager.getInstance().getDataContext(myComponent)where is
myComponent is a JComponent in a Swing hierarchy.
A specific color can be requested by the search text.context - a data context to find Settings or a parent for dialogsearch - a text to find on the found pagetype - a type of a page to find via findSubConfigurable(Class)true if a color was shown to edit, false if a requested page does not existpublic static java.lang.String getScopesGroup()