public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract implements EditorOptionsProvider, SchemesModel<EditorColorsScheme>, Configurable.WithEpDependencies
SearchableConfigurable.Delegate, SearchableConfigurable.Merged, SearchableConfigurable.Parent
Configurable.Composite, Configurable.NoMargin, Configurable.NoScroll, Configurable.TopComponentController, Configurable.TopComponentProvider, Configurable.VariableProjectAppLevel, Configurable.WithEpDependencies
SearchableConfigurable.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) |
getConfigurables
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enableSearch, getOriginalClass
getPreferredFocusedComponent, isModified, isModified, isModified, isModified
cancel
isVisible
public 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()
Configurable
getDisplayName
in interface Configurable
public boolean isModified()
UnnamedConfigurable
isModified
in interface UnnamedConfigurable
isModified
in class SearchableConfigurable.Parent.Abstract
true
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.WithEpDependencies
public 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
UnnamedConfigurable
apply
in interface UnnamedConfigurable
apply
in class SearchableConfigurable.Parent.Abstract
ConfigurationException
- if values cannot be appliedpublic javax.swing.JComponent createComponent()
UnnamedConfigurable
Also this place is designed to allocate resources (subscriptions/listeners etc.)
createComponent
in interface UnnamedConfigurable
createComponent
in class SearchableConfigurable.Parent.Abstract
null
if it cannot be createdUnnamedConfigurable.disposeUIResources()
public boolean hasOwnContent()
hasOwnContent
in interface SearchableConfigurable.Parent
public Configurable [] buildConfigurables()
buildConfigurables
in class SearchableConfigurable.Parent.Abstract
protected java.util.List<ColorAndFontPanelFactory> createPanelFactories()
public static java.lang.String getFontConfigurableName()
public void reset()
UnnamedConfigurable
reset
in interface UnnamedConfigurable
public void resetFromChild()
public void disposeUIResources()
UnnamedConfigurable
disposeUIResources
in interface UnnamedConfigurable
disposeUIResources
in class SearchableConfigurable.Parent.Abstract
public java.lang.String getHelpTopic()
Configurable
getHelpTopic
in interface Configurable
null
if no help is availablepublic static void writeTempScheme(EditorColorsScheme colorsScheme)
public static void writeTempScheme(Element scheme, EditorColorsScheme parentScheme)
public java.lang.String getId()
SearchableConfigurable
getId
in interface SearchableConfigurable
ConfigurableEP.id
public 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()