Package com.inet.pdfc.config
Interface Settings
-
- All Superinterfaces:
ColorProvider
,java.io.Serializable
- All Known Subinterfaces:
UserSettings
- All Known Implementing Classes:
DefaultSetting
public interface Settings extends ColorProvider
Default implementations forVisibilitySetting
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:
Settings.EXPORT
,Settings.FILTER
,Settings.METAOPTION
,Settings.OPTION
,DiffGroup.GroupType
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Settings.EXPORT
Settings to configure the export to PDF or image format.static class
Settings.FILTER
This is a convenience class to enable or disable the highlighting of changes by a filter.static class
Settings.METAOPTION
Color options that are not related to a difference type.static class
Settings.OPTION
Options affect the comparison result, but are not related to the actual export or output format.
-
Field Summary
Fields Modifier and Type Field Description static ObjectSetting<java.lang.Double>
IMAGE_SCALE_FACTOR
Defines a scale factor for the generated images (original and difference images).static ObjectSetting<java.lang.Integer>
MAX_ERRORS_PER_FILE
Specifies the maximum number of errors that can occur before the comparison will be stopped for the current PDF file.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Settings
copy()
Create a copy of the current settingjava.util.List<ObjectSetting<?>>
getAllObjectSettingNames()
Returns all registered additional settings.java.awt.Color
getColor(com.inet.pdfc.config.ColorSetting settingKey)
Get the color for a settingjava.lang.Object
getSetting(java.lang.String settingKey)
Return the value for this settingboolean
isEnabled(VisibilitySetting settingKey)
Get the visibility for this settingvoid
setColor(java.awt.Color color, com.inet.pdfc.config.ColorSetting settingKey)
Set the color for this setting.void
setEnabled(boolean visible, VisibilitySetting... settingKey)
Set the visibility for this settingvoid
setMarkerColor(java.awt.Color color, DiffGroup.GroupType groupType)
Set the color for the marker.void
setSetting(java.lang.Object value, java.lang.String settingKey)
Set the specific setting with the value-
Methods inherited from interface com.inet.pdfc.print.ColorProvider
getMarkerColor, getOutlineColor
-
-
-
-
Field Detail
-
MAX_ERRORS_PER_FILE
static final ObjectSetting<java.lang.Integer> 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
static final ObjectSetting<java.lang.Double> 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 Detail
-
getAllObjectSettingNames
java.util.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
void setMarkerColor(java.awt.Color color, DiffGroup.GroupType groupType)
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
void setColor(java.awt.Color color, com.inet.pdfc.config.ColorSetting settingKey)
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:
DiffGroup.GroupType
,Settings.METAOPTION
-
setEnabled
void setEnabled(boolean visible, VisibilitySetting... settingKey)
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:
Settings.EXPORT
,Settings.METAOPTION
,Settings.OPTION
,Settings.FILTER
,DiffGroup.GroupType
-
isEnabled
boolean isEnabled(VisibilitySetting settingKey)
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:
Settings.EXPORT
,Settings.METAOPTION
,Settings.OPTION
,Settings.FILTER
,DiffGroup.GroupType
-
getColor
java.awt.Color getColor(com.inet.pdfc.config.ColorSetting settingKey)
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 java.lang.Object value, java.lang.String settingKey) throws java.lang.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:
java.lang.IllegalArgumentException
- thrown in case the value has a wrong typ or the value has wrong definition range for this setting- Since:
- 5.0
-
getSetting
@Nullable java.lang.Object getSetting(java.lang.String settingKey)
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
@Nonnull Settings copy()
Create a copy of the current setting- Returns:
- copy of the current setting
- Since:
- 5.0
-
-