Package com.inet.pdfc.config
Class DefaultSetting
- java.lang.Object
-
- com.inet.pdfc.config.DefaultSetting
-
- All Implemented Interfaces:
Settings,ColorProvider,java.io.Serializable
@JsonData public class DefaultSetting extends java.lang.Object implements Settings
This is the Defaultsetting with the default values. This setting will be used for the first installation. All setting forDiffGroup.GroupTypeandSettings.EXPORTare enabled Setting forSettings.OPTIONare disabled Differencemarker color (Settings.METAOPTION) are blue AddAndRemoved Elements are red Modified content are orange Modified styles are red Meta Data changed are light blue- Since:
- 4.1
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inet.pdfc.config.Settings
Settings.EXPORT, Settings.FILTER, Settings.METAOPTION, Settings.OPTION
-
-
Field Summary
-
Fields inherited from interface com.inet.pdfc.config.Settings
IMAGE_SCALE_FACTOR, MAX_ERRORS_PER_FILE
-
-
Constructor Summary
Constructors Constructor Description DefaultSetting()The Defaultsetting with the default values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Settingscopy()Create a copy of the current settingjava.util.List<ObjectSetting<?>>getAllObjectSettingNames()Returns all registered additional settings.java.awt.ColorgetColor(com.inet.pdfc.config.ColorSetting colorSetting)Get the color for a settingjava.awt.ColorgetMarkerColor(DiffGroup.GroupType content)Returns the color of the marker for a difference group of the given typejava.awt.ColorgetOutlineColor(DiffGroup.GroupType content)Returns the color to mark the difference elements inside a difference group of the given typejava.lang.ObjectgetSetting(java.lang.String setting)Return the value for this settingbooleanisEnabled(VisibilitySetting content)Get the visibility for this settingvoidsetColor(java.awt.Color color, com.inet.pdfc.config.ColorSetting setting)Set the color for this setting.voidsetEnabled(boolean isVisible, VisibilitySetting... visibles)Set the visibility for this settingvoidsetMarkerColor(java.awt.Color color, DiffGroup.GroupType content)Set the color for the marker.voidsetSetting(java.lang.Object value, java.lang.String setting)Set the specific setting with the value
-
-
-
Method Detail
-
getAllObjectSettingNames
public java.util.List<ObjectSetting<?>> getAllObjectSettingNames()
Returns all registered additional settings. To query the current value of the setting passVisibilitySetting.name()to theSettings.getSetting(String)method.- Specified by:
getAllObjectSettingNamesin interfaceSettings- Returns:
- all additional settings, not
null
-
setMarkerColor
public void setMarkerColor(@Nonnull java.awt.Color color, @Nonnull DiffGroup.GroupType content)Set the color for the marker. Overrides the default provided by {linkColorProvider.getMarkerColor(DiffGroup.GroupType). (For visible set the alpha to 0)- Specified by:
setMarkerColorin interfaceSettings- Parameters:
color- the marker colorcontent- the group type tp set the marker color for
-
setColor
public void setColor(java.awt.Color color, @Nonnull com.inet.pdfc.config.ColorSetting setting)Set the color for this setting. If the key is aDiffGroup.GroupType, it overrides the default provided byColorProvider.getOutlineColor(DiffGroup.GroupType)).
Note: Colors forDiffGroup.GroupTypes should be semi-transparent.- Specified by:
setColorin interfaceSettings- Parameters:
color- the color to be used to the markupsetting- the setting key. e.G. aDiffGroup.GroupTypeor theSettings.METAOPTION.ALLOUTLINEMARKER- See Also:
DiffGroup.GroupType,Settings.METAOPTION
-
setEnabled
public void setEnabled(boolean isVisible, @Nonnull VisibilitySetting... visibles)Set the visibility for this setting- Specified by:
setEnabledin interfaceSettings- Parameters:
isVisible- true for visible otherwise falsevisibles- the visibility setting key(s) to update the vsibility for- See Also:
Settings.EXPORT,Settings.METAOPTION,Settings.OPTION,Settings.FILTER,DiffGroup.GroupType
-
isEnabled
public boolean isEnabled(VisibilitySetting content)
Get the visibility for this setting- Specified by:
isEnabledin interfaceSettings- Parameters:
content- the setting key to get the visibility for- Returns:
truefor visible hencefalse- See Also:
Settings.EXPORT,Settings.METAOPTION,Settings.OPTION,Settings.FILTER,DiffGroup.GroupType
-
getMarkerColor
@Nonnull public java.awt.Color getMarkerColor(@Nonnull DiffGroup.GroupType content)Returns the color of the marker for a difference group of the given type- Specified by:
getMarkerColorin interfaceColorProvider- Parameters:
content- the type of the difference group- Returns:
- the color of the marker for a difference group, should not be null
-
getColor
public java.awt.Color getColor(@Nonnull com.inet.pdfc.config.ColorSetting colorSetting)Get the color for a setting
-
getSetting
@Nullable public java.lang.Object getSetting(java.lang.String setting)
Return the value for this setting- Specified by:
getSettingin interfaceSettings- Parameters:
setting- the setting name- Returns:
- value for this setting or null if no setting be set.
-
setSetting
public void setSetting(@Nullable java.lang.Object value, java.lang.String setting)Set the specific setting with the value- Specified by:
setSettingin interfaceSettings- Parameters:
value- value for the setting or null for remove the settingsetting- the setting name, usuallyVisibilitySetting.name()
-
copy
@Nonnull public Settings copy()
Create a copy of the current setting
-
getOutlineColor
@Nonnull public java.awt.Color getOutlineColor(DiffGroup.GroupType content)
Returns the color to mark the difference elements inside a difference group of the given type- Specified by:
getOutlineColorin interfaceColorProvider- Parameters:
content- the type of the difference group- Returns:
- the color to mark the difference elements, should not be null
-
-