|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.render.AbstractListenableRenderSettings com.levigo.jadice.document.render.ImageRenderSettings
public class ImageRenderSettings
A ProcessingSettings
type which controls various aspects of the image rendering process
like desaturation, gradation or image filtering.
Field Summary | |
---|---|
static String |
DESATURATION
Identifier key for a desaturation change, used within a RenderSettingsEvent to
recognize the kind of change which happen. |
static String |
FILTER
Identifier key for a filter change, used within a RenderSettingsEvent to recognize the
kind of change which happen. |
static String |
GRADATION_CURVE
Identifier key for a gradation change, used within a RenderSettingsEvent to recognize
the kind of change which happen. |
static String |
LAYER_APPLICABILITY
Property prefix key for a change to the setAppliesToLayer(DocumentLayer, boolean) /
isAppliesToLayer(DocumentLayer) property. |
static String |
USE_UPSCALING
Identifier key for a change to the setUseUpscalingFilter(boolean) /
isUseUpscalingFilter() property. |
Constructor Summary | |
---|---|
ImageRenderSettings()
Constructor |
Method Summary | |
---|---|
void |
applyToAllLayers()
Sets this settings instance to apply to all document layers. |
ImageRenderSettings |
createSnapshot()
Creates and returns a snapshot copy of this settings instance. |
boolean |
equals(Object obj)
|
FilterType |
getFilterType()
Returns the filter type to be applied. |
GradationCurve |
getGradationCurve()
Returns the gradation curve to be applied to the image. |
int |
hashCode()
|
boolean |
isAppliesToLayer(DocumentLayer layer)
Returns whether this settings instance applies to the given document layer. |
boolean |
isDesaturate()
Returns whether the desaturation is activated |
boolean |
isUseUpscalingFilter()
|
void |
setAppliesToLayer(DocumentLayer layer,
boolean value)
Set whether this ImageRenderSettings instance shall apply to the given document layer or not. |
void |
setDesaturate(boolean desaturate)
Changes whether desaturation is active or not. |
void |
setFilterType(FilterType filterType)
Changes the filter type to be applied. |
void |
setGradationCurve(GradationCurve gradationCurve)
Sets the gradation curve to be applied to the image. |
void |
setUseUpscalingFilter(boolean useUpscalingFilter)
Set whether to use the filter type set via setFilterType(FilterType) to up-sample
(scale larger than original size) images also. |
void |
update(String propertyName,
RenderSettings other,
Object... details)
Updates this instance property specified by given property name with the value provided by the other processing setting. |
Methods inherited from class com.levigo.jadice.document.render.AbstractListenableRenderSettings |
---|
fireChanged, getSettingsChangeHandler, setSettingsChangeHandler |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GRADATION_CURVE
RenderSettingsEvent
to recognize
the kind of change which happen.
public static final String DESATURATION
RenderSettingsEvent
to
recognize the kind of change which happen.
public static final String FILTER
RenderSettingsEvent
to recognize the
kind of change which happen.
public static final String USE_UPSCALING
setUseUpscalingFilter(boolean)
/
isUseUpscalingFilter()
property.
public static final String LAYER_APPLICABILITY
setAppliesToLayer(DocumentLayer, boolean)
/
isAppliesToLayer(DocumentLayer)
property. The actual property key is derived by
appending "." and the layer name to this prefix.
Constructor Detail |
---|
public ImageRenderSettings()
Method Detail |
---|
public ImageRenderSettings createSnapshot()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public GradationCurve getGradationCurve()
public void setGradationCurve(GradationCurve gradationCurve)
GradationCurve.GradationCurve()
.
gradationCurve
- the new gradation curvepublic boolean isDesaturate()
public void setDesaturate(boolean desaturate)
desaturate
- true
for active, otherwise false
public FilterType getFilterType()
FilterType
public void setFilterType(FilterType filterType)
null
. To clear
prior filter type changes, use FilterType.getDefaultFilterType()
as new filter.
filterType
- public void update(String propertyName, RenderSettings other, Object... details)
RenderSettings
propertyName
- the name of the property to update. Update supported properties have unique
property identifier provided by the specific render settings implementation.other
- the processing setting which provide the new property value. Therefore the other
processing setting have to be of the same type as this instance.details
- (optional) if some describing details are necessary to do a specific update, the
details parameter will transport this informationspublic void setUseUpscalingFilter(boolean useUpscalingFilter)
setFilterType(FilterType)
to up-sample
(scale larger than original size) images also. If set to true
the scaling filter
is used to create images larger than original size resulting in a smooth appearance. If set to
false
, the image is up-scaled on the fly during rendering using a simple
nearest-neighbor interpolation resulting in a jagged appearance but reduced rendering time and
memory consumption.
useUpscalingFilter
- public boolean isUseUpscalingFilter()
setUseUpscalingFilter(boolean)
public void setAppliesToLayer(DocumentLayer layer, boolean value)
layer
- the document layer.value
- true
if this settings instance shall apply to the given layerpublic boolean isAppliesToLayer(DocumentLayer layer)
layer
- the document layer
public void applyToAllLayers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |