Class ThumbnailTool

    • Constructor Detail

      • ThumbnailTool

        public ThumbnailTool()
    • Method Detail

      • getThumbnailView

        public ThumbnailView getThumbnailView()
        Returns:
        the used ThumbnailView
      • handleMouseMoved

        protected void handleMouseMoved​(MouseEditEvent e,
                                        boolean isActive)
        Description copied from class: Tool
        Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
        Overrides:
        handleMouseMoved in class Tool
        Parameters:
        e - the event
        isActive - whether this tool is currently active
      • handleTouchStart

        protected void handleTouchStart​(TouchEditEvent e,
                                        boolean isActive)
        Description copied from class: Tool
        Invoked when a touch started.
        Overrides:
        handleTouchStart in class Tool
        Parameters:
        e - the TouchEditEvent
        isActive - whether this tool is currently active
      • createThumbnailViewer

        protected Viewer createThumbnailViewer()
        Creates and configures the Viewer shown in the ThumbnailTool.
        Returns:
        The viewer to insert into the lightningBox.
      • setPinned

        public void setPinned​(boolean pinned)
        Set the ThumbnailTool's pinned state. Being pinned means that the ThumbnailTool will not become invisible once another area is clicked.
        Parameters:
        pinned - True if the ThumbnailTool shouldn't disappear once another area was clicked, false if it should
      • isPinned

        public boolean isPinned()
        Request the pinned state. Being pinned means that the ThumbnailTool will not become invisible once another area is clicked.
        Returns:
        True if the ThumbnailTool won't disappear once another area was clicked, false if it disappears once another area was clicked.
      • isVisible

        public boolean isVisible()
        Check if the ThumbnailTool is visible.
        Returns:
        True if ThumbnailTool is visible, false if not.
      • setUseNativeScrollbars

        public void setUseNativeScrollbars​(boolean nativeScrollbars)
      • isUseNativeScrollbars

        public boolean isUseNativeScrollbars()
      • setEnabled

        protected void setEnabled​(boolean enabled)
        Description copied from class: Tool
        Receive notification from the tool manager about the tool's enabled state. In general, tools need not and should not try to implement different behaviour depending on the enabled state, as this is already covered by the ToolManager calling the Tool.handleEditEvent(boolean, EditEvent) and Tool.render(RenderParameters, boolean) in the appropriate state only. However, some tools may need to perform extended actions (for example, for resource management purposes) upon a change of the enabled state.
        Overrides:
        setEnabled in class Tool
        Parameters:
        enabled - controls whether to enable or disable this Tool
      • setVisible

        public void setVisible​(boolean visible)
        Sets the visibility of the ThumbnailTool.

        Note that you might also want to use setPinned(boolean) so that the ThumbnailTool will stay visible.

        Parameters:
        visible - True if it should be visible, false if not
      • getShowButton

        @Deprecated
        public com.google.gwt.user.client.ui.IsWidget getShowButton()
        Deprecated.
        for tests only
        Returns:
        Deprecated - don't use.
      • getPinButton

        @Deprecated
        public com.google.gwt.user.client.ui.IsWidget getPinButton()
        Deprecated.
        for tests only
        Returns:
        Deprecated - don't use.
      • getHideButton

        @Deprecated
        public com.google.gwt.user.client.ui.IsWidget getHideButton()
        Deprecated.
        for tests only
        Returns:
        Deprecated - don't use.
      • getUnpinButton

        @Deprecated
        public com.google.gwt.user.client.ui.IsWidget getUnpinButton()
        Deprecated.
        for tests only
        Returns:
        Deprecated - don't use.
      • setScrollbarVisibility

        public void setScrollbarVisibility​(ScrollbarVisibility scrollbarVisibility)
        Sets the desired ScrollbarVisibility which is used to set up the scrollbar (e.g. always/never visible).

        Important
        When setting the scrollbar to HIDDEN (off), scrolling might still be possible due to a registered MouseWheelScrollTool in the ToolManager of the viewer.

        The tool has to be disabled manually in that case. Example:
        (The Thumbnail-View uses it's own ToolManager in which we disable the tool)

         ThumbnailTool tt = toolManagerOfPageView.getTool(ThumbnailTool.class);
         tt.setScrollbarVisibility(new ScrollbarVisibility(Overflow.HIDDEN));
         tt.getThumbnailView().getToolManager().setEnabled(MouseWheelScrollTool.class, false);
         
        Parameters:
        scrollbarVisibility - the ScrollbarVisibility.
      • update

        public void update()
        Updates the ThumbnailView of this ThumbnailTool. Use case: The page filter has changed and an update shall be performed.