Package com.inet.pdfc.config
Interface Settings
- All Superinterfaces:
ColorProvider
,Serializable
- All Known Subinterfaces:
UserSettings
- All Known Implementing Classes:
DefaultSetting
Default implementations for
VisibilitySetting
for multiple purposes:- EXPORT - configures the export to PDF or image format
- FILTER - toggles the visibility of filter data
- OPTION - toggles general options that affect the result of a comparison
- METAOPTION - color options that are not related to a difference type
- Since:
- 4.1
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Settings to configure the export to PDF or image format.static class
This is a convenience class to enable or disable the highlighting of changes by a filter.static enum
Color options that are not related to a difference type.static enum
Options affect the comparison result, but are not related to the actual export or output format. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ObjectSetting<Double>
Defines a scale factor for the generated images (original and difference images).static final ObjectSetting<Integer>
Specifies the maximum number of errors that can occur before the comparison will be stopped for the current PDF file. -
Method Summary
Modifier and TypeMethodDescription@Nonnull Settings
copy()
Create a copy of the current settingList<ObjectSetting<?>>
Returns all registered additional settings.getColor
(com.inet.pdfc.config.ColorSetting settingKey) Get the color for a setting@Nullable Object
getSetting
(String settingKey) Return the value for this settingboolean
isEnabled
(VisibilitySetting settingKey) Get the visibility for this settingvoid
Set the color for this setting.void
setEnabled
(boolean visible, VisibilitySetting... settingKey) Set the visibility for this settingvoid
setMarkerColor
(Color color, DiffGroup.GroupType groupType) Set the color for the marker.void
setSetting
(@Nullable Object value, String settingKey) Set the specific setting with the valueMethods inherited from interface com.inet.pdfc.print.ColorProvider
getMarkerColor, getOutlineColor
-
Field Details
-
MAX_ERRORS_PER_FILE
Specifies the maximum number of errors that can occur before the comparison will be stopped for the current PDF file. The default value is: 100.
[value: -1 for unlimited]
Accepted values: -1 toInteger.MAX_VALUE
-
IMAGE_SCALE_FACTOR
Defines a scale factor for the generated images (original and difference images). The default is 1 which is no scaling.
Accepted values: 0.1 to 100.0- Since:
- 5.0
-
-
Method Details
-
getAllObjectSettingNames
List<ObjectSetting<?>> getAllObjectSettingNames()Returns all registered additional settings. To query the current value of the setting passVisibilitySetting.name()
to thegetSetting(String)
method.- Returns:
- all additional settings, not
null
- Since:
- 5.0
-
setMarkerColor
Set the color for the marker. Overrides the default provided by {linkColorProvider.getMarkerColor(DiffGroup.GroupType)
. (For visible set the alpha to 0)- Parameters:
color
- the marker colorgroupType
- the group type tp set the marker color for- Since:
- 4.1
-
setColor
Set the color for this setting. If the key is aDiffGroup.GroupType
, it overrides the default provided byColorProvider.getOutlineColor(DiffGroup.GroupType)
).
Note: Colors forDiffGroup.GroupType
s should be semi-transparent.- Parameters:
color
- the color to be used to the markupsettingKey
- the setting key. e.G. aDiffGroup.GroupType
or theSettings.METAOPTION.ALLOUTLINEMARKER
- Since:
- 4.1
- See Also:
-
setEnabled
Set the visibility for this setting- Parameters:
visible
- true for visible otherwise falsesettingKey
- the visibility setting key(s) to update the vsibility for- Since:
- 4.1
- See Also:
-
isEnabled
Get the visibility for this setting- Parameters:
settingKey
- the setting key to get the visibility for- Returns:
true
for visible hencefalse
- Since:
- 4.1
- See Also:
-
getColor
Get the color for a setting- Parameters:
settingKey
- the key of the setting- Returns:
- the color for this setting
- Since:
- 4.1
-
setSetting
void setSetting(@Nullable @Nullable Object value, String settingKey) throws IllegalArgumentException Set the specific setting with the value- Parameters:
value
- value for the setting or null for remove the settingsettingKey
- the setting name, usuallyVisibilitySetting.name()
- Throws:
IllegalArgumentException
- thrown in case the value has a wrong typ or the value has wrong definition range for this setting- Since:
- 5.0
-
getSetting
Return the value for this setting- Parameters:
settingKey
- the setting name- Returns:
- value for this setting or null if no setting be set.
- Since:
- 5.0
-
copy
Create a copy of the current setting- Returns:
- copy of the current setting
- Since:
- 5.0
-