Class ThumbnailTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.ThumbnailTool
- All Implemented Interfaces:
MenuContributor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.levigo.jadice.web.client.tool.Tool
Tool.ActivationRequest
-
Field Summary
Fields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Viewer
Creates and configures theViewer
shown in the ThumbnailTool.com.google.gwt.user.client.ui.IsWidget
Deprecated.for tests onlycom.google.gwt.user.client.ui.IsWidget
Deprecated.for tests onlycom.google.gwt.user.client.ui.IsWidget
Deprecated.for tests onlycom.google.gwt.user.client.ui.IsWidget
Deprecated.for tests onlyprotected void
handleMouseMoved
(MouseEditEvent e, boolean isActive) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.protected void
handleTouchStart
(TouchEditEvent e, boolean isActive) Invoked when a touch started.boolean
isPinned()
Request the pinned state.boolean
boolean
Check if theThumbnailTool
is visible.protected void
setEnabled
(boolean enabled) Receive notification from the tool manager about the tool's enabled state.void
setPinned
(boolean pinned) Set theThumbnailTool
's pinned state.void
setScrollbarVisibility
(ScrollbarVisibility scrollbarVisibility) Sets the desired ScrollbarVisibility which is used to set up the scrollbar (e.g. always/never visible).void
setUseNativeScrollbars
(boolean nativeScrollbars) void
setVisible
(boolean visible) Sets the visibility of theThumbnailTool
.void
update()
Updates theThumbnailView
of this ThumbnailTool.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getDispatchPriority, getManager, getRenderPriority, handleEditEvent, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, propagatePropertyChange, render, setActive, setCursor, setCursor, setManager, setStatusFeedback
-
Constructor Details
-
ThumbnailTool
public ThumbnailTool()
-
-
Method Details
-
getThumbnailView
- Returns:
- the used ThumbnailView
-
handleMouseMoved
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 classTool
- Parameters:
e
- the eventisActive
- whether this tool is currently active
-
handleTouchStart
Description copied from class:Tool
Invoked when a touch started.- Overrides:
handleTouchStart
in classTool
- Parameters:
e
- theTouchEditEvent
isActive
- whether this tool is currently active
-
createThumbnailViewer
Creates and configures theViewer
shown in the ThumbnailTool.- Returns:
- The viewer to insert into the lightningBox.
-
setPinned
public void setPinned(boolean pinned) Set theThumbnailTool
's pinned state. Being pinned means that theThumbnailTool
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 theThumbnailTool
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 theThumbnailTool
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 theTool.handleEditEvent(boolean, EditEvent)
andTool.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 classTool
- Parameters:
enabled
- controls whether to enable or disable thisTool
-
setVisible
public void setVisible(boolean visible) Sets the visibility of theThumbnailTool
.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.for tests only- Returns:
- Deprecated - don't use.
-
getPinButton
Deprecated.for tests only- Returns:
- Deprecated - don't use.
-
getHideButton
Deprecated.for tests only- Returns:
- Deprecated - don't use.
-
getUnpinButton
Deprecated.for tests only- Returns:
- Deprecated - don't use.
-
getScrollbarVisibility
-
setScrollbarVisibility
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 registeredMouseWheelScrollTool
in the ToolManager of the viewer.The tool has to be disabled manually in that case. Example:
(The Thumbnail-View uses its 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
- theScrollbarVisibility
.
-
update
public void update()Updates theThumbnailView
of this ThumbnailTool. Use case: The page filter has changed and an update shall be performed.
-