Class AnnotationSelection

java.lang.Object
com.levigo.jadice.web.client.internal.annotation.AnnotationSelection

public class AnnotationSelection extends Object
Manages the selected Annotations
  • Field Details

    • SHORT_KEY_ANNOTATION_SELECTION

      public static final String SHORT_KEY_ANNOTATION_SELECTION
      The property key used to propagate changes in the current selection of annotations.

      This key is used for internal event propagation only. The public key (which is prefixed by the propagating class name) and further information can be found in AnnotationTool .PROPERTY_KEY_ANNOTATION_SELECTION.

      See Also:
  • Constructor Details

    • AnnotationSelection

      public AnnotationSelection()
  • Method Details

    • addPropertyChangeListener

      public com.google.gwt.event.shared.HandlerRegistration addPropertyChangeListener(PropertyChangeListener listener)
    • getDocument

      public Document getDocument()
    • getPage

      public Page getPage()
    • set

      public void set(Document document, Page page, ShapeBasedAnnotation... annotations)
    • add

      public void add(Document document, Page page, ShapeBasedAnnotation annotation)
    • removeDeletedAnnotations

      public boolean removeDeletedAnnotations()
    • clear

      public void clear()
    • remove

      public void remove(ShapeBasedAnnotation annotation)
    • getSelected

      public List<ShapeBasedAnnotation> getSelected()
    • getSelectionBounds

      public Rectangle getSelectionBounds()
    • isSelected

      public boolean isSelected(Annotation a)
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • getSingleSelected

      public Annotation getSingleSelected()
    • isSingleSelectionMode

      public boolean isSingleSelectionMode()
      Returns the current selection mode. Defaults to false.
      Returns:
      true if only one annotation can be selected at a given point in time, false else
    • setSingleSelectionMode

      public void setSingleSelectionMode(boolean singleSelectionMode)
      Sets the current selection mode.
      Parameters:
      singleSelectionMode - true if only one annotation shall be selectable at a given point in time. False if multiple annotations shall be selectable at a given point in time.