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 ViewerCreates and configures theViewershown in the ThumbnailTool.com.google.gwt.user.client.ui.IsWidgetDeprecated.for tests onlycom.google.gwt.user.client.ui.IsWidgetDeprecated.for tests onlycom.google.gwt.user.client.ui.IsWidgetDeprecated.for tests onlycom.google.gwt.user.client.ui.IsWidgetDeprecated.for tests onlyprotected voidhandleMouseMoved(MouseEditEvent e, boolean isActive) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.protected voidhandleTouchStart(TouchEditEvent e, boolean isActive) Invoked when a touch started.booleanisPinned()Request the pinned state.booleanbooleanCheck if theThumbnailToolis visible.protected voidsetEnabled(boolean enabled) Receive notification from the tool manager about the tool's enabled state.voidsetPinned(boolean pinned) Set theThumbnailTool's pinned state.voidsetScrollbarVisibility(ScrollbarVisibility scrollbarVisibility) Sets the desired ScrollbarVisibility which is used to set up the scrollbar (e.g. always/never visible).voidsetUseNativeScrollbars(boolean nativeScrollbars) voidsetVisible(boolean visible) Sets the visibility of theThumbnailTool.voidupdate()Updates theThumbnailViewof 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:ToolInvoked when the mouse cursor has been moved onto a component but no buttons have been pushed.- Overrides:
handleMouseMovedin classTool- Parameters:
e- the eventisActive- whether this tool is currently active
-
handleTouchStart
Description copied from class:ToolInvoked when a touch started.- Overrides:
handleTouchStartin classTool- Parameters:
e- theTouchEditEventisActive- whether this tool is currently active
-
createThumbnailViewer
Creates and configures theViewershown 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 theThumbnailToolwill 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 theThumbnailToolwill 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 theThumbnailToolis 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:ToolReceive 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:
setEnabledin 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 registeredMouseWheelScrollToolin 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 theThumbnailViewof this ThumbnailTool. Use case: The page filter has changed and an update shall be performed.
-