Class AnnotationEditor

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

public class AnnotationEditor extends Object
A toolbar providing annotation editing functions such as buttons for editing colors, line widths, text formatting, font sizes, font faces etc.

The editing options depend on the currently selected annotation(s).

  • Constructor Details

    • AnnotationEditor

      public AnnotationEditor(AnnotationTool tool)
      Constructor.
      Parameters:
      tool - The AnnotationTool that performs the actual operations on the selected annotation(s).
  • Method Details

    • setToolbar

      public void setToolbar(AbstractBar toolbar)
    • init

      public void init(ToolManager manager)
    • setLastVisible

      public void setLastVisible(boolean lastVisible)
    • setVisible

      public void setVisible(boolean visible)
    • setSelectedItems

      public void setSelectedItems(AnnotationSelection selection, EditEvent e)
      Configures this toolbar instance with the selected annotations.

      Updates the displayed buttons in the toolbar. Dependent on the possible actions on the selected annotation(s) some buttons are displayed, others not. For instance a button to delete the selected annotations is only displayed when the user is allowed to delete all annotations contained in the selection.

      Parameters:
      selection - The selected annotations.
      e - The underlying edit event.
    • getSelectedItems

      public Set<ShapeBasedAnnotation> getSelectedItems()
      Returns a all selected annotations
      Returns:
      A set containing all selected annotations.
    • clearSelection

      public void clearSelection()
      Removes all selected annotations.
    • updatePosition

      public void updatePosition(Rectangle selectionRect)
    • isVisible

      public boolean isVisible()
    • ensureDebugId

      public void ensureDebugId(String baseID)
    • updateButtons

      protected void updateButtons(AnnotationSelection selection, EditEvent e)