com.levigo.jadice.annotation
Class AnnotationRenderSettings

java.lang.Object
  extended by com.levigo.jadice.document.render.AbstractListenableRenderSettings
      extended by com.levigo.jadice.annotation.AnnotationRenderSettings
All Implemented Interfaces:
com.levigo.jadice.document.internal.model.DocTreeFilterFactory, ProcessingSettings, RenderSettings, Serializable

public class AnnotationRenderSettings
extends AbstractListenableRenderSettings
implements com.levigo.jadice.document.internal.model.DocTreeFilterFactory

The class AnnotationRenderingHints contains rendering hints that can be used for annotation rendering.

See Also:
Serialized Form

Constructor Summary
AnnotationRenderSettings()
          Default Constructor.
 
Method Summary
 AnnotationRenderSettings createSnapshot()
          Creates and returns a snapshot copy of this settings instance.
 void enableAllAnnotationTypes()
          Enable the rendering of all annotation types which may have previously been disabled using setAnnotationRenderingEnabled(AnnotationType, boolean).
 boolean equals(Object obj)
           
 com.levigo.jadice.document.internal.model.DocTreeProcessor filter(com.levigo.jadice.document.internal.model.DocTreeProcessor processor, RenderControls controls)
           
 Collection<AnnotationType> getDisabledAnnotationTypes()
          Returns an immutable set of currently disabled (not visible) annotation types.
 Resolution getReferenceResolution()
          Reference resolution used for resolution dependency based annotations adjustments like stroke width / font size.
 int hashCode()
           
 boolean isAnnotationRenderingEnabled(AnnotationType annotationType)
          Returns whether annotation of given type should be rendered or not.
 void setAnnotationRenderingEnabled(AnnotationType annotationType, boolean enabled)
          Sets a flag whether annotations of given type should be rendered or not.
 void setReferenceResolution(Resolution resolution)
          Set reference resolution used for resolution dependency based annotations adjustments like stroke width / font size.
 String toString()
           
 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, wait, wait, wait
 

Constructor Detail

AnnotationRenderSettings

public AnnotationRenderSettings()
Default Constructor.

Method Detail

isAnnotationRenderingEnabled

public boolean isAnnotationRenderingEnabled(AnnotationType annotationType)
Returns whether annotation of given type should be rendered or not.

Parameters:
annotationType - the annotation type
Returns:
boolean

setAnnotationRenderingEnabled

public void setAnnotationRenderingEnabled(AnnotationType annotationType,
                                          boolean enabled)
Sets a flag whether annotations of given type should be rendered or not. If the rendering of all annotation types is enabled (isAnnotationRenderingEnabled(AnnotationType)), this flag decides whether annotations of given type are rendered or not. Otherwise if the general settings isAnnotationRenderingEnabled(AnnotationType) is not true, the enabled state of the specific annotation type does not matter.

Parameters:
annotationType - describing annotation type
enabled - the enabled state of a specific annotation type

getDisabledAnnotationTypes

public Collection<AnnotationType> getDisabledAnnotationTypes()
Returns an immutable set of currently disabled (not visible) annotation types.

Returns:
currently disabled (not visible) annotation types

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

createSnapshot

public AnnotationRenderSettings createSnapshot()
Creates and returns a snapshot copy of this settings instance.

Specified by:
createSnapshot in interface ProcessingSettings
Returns:
snapshot copy

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

enableAllAnnotationTypes

public void enableAllAnnotationTypes()
Enable the rendering of all annotation types which may have previously been disabled using setAnnotationRenderingEnabled(AnnotationType, boolean).


update

public void update(String propertyName,
                   RenderSettings other,
                   Object... details)
Description copied from interface: RenderSettings
Updates this instance property specified by given property name with the value provided by the other processing setting. For each update-supported property the render settings type have to provide a unique property name.

Specified by:
update in interface RenderSettings
Parameters:
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 informations

filter

public com.levigo.jadice.document.internal.model.DocTreeProcessor filter(com.levigo.jadice.document.internal.model.DocTreeProcessor processor,
                                                                         RenderControls controls)
Specified by:
filter in interface com.levigo.jadice.document.internal.model.DocTreeFilterFactory

getReferenceResolution

public Resolution getReferenceResolution()
Reference resolution used for resolution dependency based annotations adjustments like stroke width / font size. Default value is the current screen resolution in inch unit.

Returns:
Reference resolution.

setReferenceResolution

public void setReferenceResolution(Resolution resolution)
Set reference resolution used for resolution dependency based annotations adjustments like stroke width / font size.

Parameters:
resolution - Reference resolution


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.