Package com.levigo.jadice.web.client
Interface PageView
- All Superinterfaces:
com.google.gwt.event.shared.HasHandlers
,com.google.gwt.event.logical.shared.HasResizeHandlers
,com.google.gwt.user.client.ui.IsWidget
,JadicePageView
,MenuContributor
,com.levigo.jadice.web.client.util.internal.Repaintable
,ViewComponent
public interface PageView
extends JadicePageView, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.event.logical.shared.HasResizeHandlers, com.levigo.jadice.web.client.util.internal.Repaintable
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Only applicable forFilteredDocument
s.static enum
These layout style constants define a set of well-known page layout styles.static enum
Indicates what should be done while repainting.static enum
Defines when an element should be removed from thePageTextContent
cache.static enum
Configures the position of the visible rectangle when navigating through a document. -
Method Summary
Modifier and TypeMethodDescription<H extends com.google.gwt.event.shared.EventHandler>
com.google.gwt.event.shared.HandlerRegistrationaddDomHandler
(H handler, com.google.gwt.event.dom.client.DomEvent.Type<H> type) Adds a GWT DOM Handler to the PageView widget.com.google.gwt.event.shared.HandlerRegistration
addHandler
(JadiceEventHandler jadiceEventHandler) Adds aJadiceEventHandler
.<H extends com.google.gwt.event.shared.EventHandler>
com.google.gwt.event.shared.HandlerRegistrationaddHandler
(H handler, com.google.gwt.event.shared.GwtEvent.Type<H> type) Adds handlers on the PageView for special JadiceEvents.void
Forces an update of the view.Return the bounds encompassing the bounds of all rendered pages.Whether to show all pages of aFilteredDocument
- even those pages that are not accepted the filter.getLaidOutPageBounds
(Page page) com.levigo.jadice.web.client.page.internal.PageManager
Returns where the visible rectangle should be positioned when the page changes.Returns where the visible rectangle should be positioned when the page changes.boolean
Returns true if native scrollbars are used for this page view.void
setApplyFilterInView
(PageView.ApplyFilterInView applyFilter) Sets whether to show all pages of aFilteredDocument
- even those pages that are not accepted the filter.void
setDontUpdateOnChange
(boolean dontUpdateOnChange) Setting this value to true causes the view to not updating itself when scrolling or zooming.void
setHasNativeScrollbars
(boolean nativeScrollbars) Set true when native scrollbars are used for this page view.void
setPreloadingPageRange
(PreloadingPageRange preloadingPageRange) Sets the preloading range which indicates how many pages should be preloaded.void
setRepaintMode
(PageView.RepaintMode repaintMode) Indicates what should be done while repainting - full repaint or just a fast zoom.void
setScrollForceSelectedPageVisible
(boolean scrollForceSelectedPageVisible) Whether a force selected page should be scrolled completely (as much as it fits in without zooming) into the visible area if it's already partly visible.void
setTextPurgeStrategy
(PageView.TextPurgeStrategy textPurgeStrategy) Sets thePageView.TextPurgeStrategy
to decide whetherPageTextContent
should be cached and when the are cache when they should be removed from the cache.void
setVisibleRect
(Rectangle visibleRect) Sets the visible Rectangle to update the view to.void
Defines where the visible rectangle should be positioned when the document changes.void
Defines where the visible rectangle should be positioned when the page changes.void
update()
Update the view.Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
Methods inherited from interface com.google.gwt.event.logical.shared.HasResizeHandlers
addResizeHandler
Methods inherited from interface com.google.gwt.user.client.ui.IsWidget
asWidget
Methods inherited from interface com.levigo.jadice.web.client.JadicePageView
cleanup, getCurrentPage, getCurrentPageControls, getCurrentPageIndex, getCurrentPageVisibleBounds, getDocumentControls, getPageAt, getPageAt, getPageControls, getPageControls, getPageCount, getPageLayoutStyle, getPanPoint, getPresentationRuleManager, getRenderControlsInventory, repaint, repaint, repaint, repaint, scrollRectToVisible, setCurrentPage, setCurrentPageIndex, setDocument, setPageLayoutStyle
Methods inherited from interface com.levigo.jadice.web.client.ui.menu.MenuContributor
contribute
Methods inherited from interface com.levigo.jadice.web.client.util.internal.Repaintable
repaint, repaint, repaint
Methods inherited from interface com.levigo.jadice.web.client.ViewComponent
getDocument, getToolManager, getVisibleRect, repaintAnnosAndTools, repaintAnnosAndTools, repaintAnnosAndTools, repaintAnnosAndTools, scrollRectToVisible
-
Method Details
-
getUIStyle
UIStyle getUIStyle() -
setVisibleRect
Sets the visible Rectangle to update the view to. Used by the ScrollPanels containing the PageView.- Parameters:
visibleRect
- The currently visible area.
-
getCurrentLaidOutPageBounds
Rectangle getCurrentLaidOutPageBounds()- Returns:
- the absolute Bounds in PX of the currentPage
-
getLaidOutPageBounds
- Parameters:
page
- to get the Bounds of- Returns:
- the absolute Bounds in PX of the given page (Empty Rectangle when not visible)
-
addHandler
Adds aJadiceEventHandler
.- Parameters:
jadiceEventHandler
- The listener to add.- Returns:
- a
HandlerRegistration
handle to remove the handler as soon as the handler isn't required or desired any more. CallHandlerRegistration.removeHandler()
.
-
addDomHandler
<H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration addDomHandler(H handler, com.google.gwt.event.dom.client.DomEvent.Type<H> type) Adds a GWT DOM Handler to the PageView widget.- Type Parameters:
H
- theEventHandler
- Parameters:
handler
- the handler to addtype
- the Type of the Event- Returns:
- a
HandlerRegistration
handle to remove the handler as soon as the handler isn't required or desired any more. CallHandlerRegistration.removeHandler()
.
-
setDontUpdateOnChange
void setDontUpdateOnChange(boolean dontUpdateOnChange) Setting this value to true causes the view to not updating itself when scrolling or zooming. This is necessary when you zoom or change the Layout and want to hold the currentPage (otherwise the currentPage can be unset because its no more visible).- Parameters:
dontUpdateOnChange
- Iftrue
, don't call update() when an update event is fired.
-
forceUpdate
void forceUpdate()Forces an update of the view. This is only required, when automatic updating has been stopped by setDontUpdateOnChange(true). Also this can be used to force repainting any tiles no matter to which costs. -
update
void update()Update the view. Any cached content is reused. -
setPreloadingPageRange
Sets the preloading range which indicates how many pages should be preloaded.- Parameters:
preloadingPageRange
- thePreloadingPageRange
-
getPageManager
com.levigo.jadice.web.client.page.internal.PageManager getPageManager() -
setRepaintMode
Indicates what should be done while repainting - full repaint or just a fast zoom. -
setTextPurgeStrategy
Sets thePageView.TextPurgeStrategy
to decide whetherPageTextContent
should be cached and when the are cache when they should be removed from the cache.- Parameters:
textPurgeStrategy
- the PurgeStrategy
-
setVisibleRectPositionOnPageChange
Defines where the visible rectangle should be positioned when the page changes.- Parameters:
position
- thePageView.VisibleRectPositioningStrategy
-
setVisibleRectPositionOnDocumentChange
Defines where the visible rectangle should be positioned when the document changes.- Parameters:
position
- thePageView.VisibleRectPositioningStrategy
-
getVisibleRectPositionOnPageChange
PageView.VisibleRectPositioningStrategy getVisibleRectPositionOnPageChange()Returns where the visible rectangle should be positioned when the page changes.- Returns:
- the
PageView.VisibleRectPositioningStrategy
-
getVisibleRectPositionOnDocumentChange
PageView.VisibleRectPositioningStrategy getVisibleRectPositionOnDocumentChange()Returns where the visible rectangle should be positioned when the page changes.- Returns:
- the
PageView.VisibleRectPositioningStrategy
-
setHasNativeScrollbars
void setHasNativeScrollbars(boolean nativeScrollbars) Set true when native scrollbars are used for this page view. Some calculations need this info.- Parameters:
nativeScrollbars
- true if native scrollbars are used; otherwise false
-
hasNativeScrollbars
boolean hasNativeScrollbars()Returns true if native scrollbars are used for this page view. Returns false if not.- Returns:
- whether native scrollbars are used or not
-
setScrollForceSelectedPageVisible
void setScrollForceSelectedPageVisible(boolean scrollForceSelectedPageVisible) Whether a force selected page should be scrolled completely (as much as it fits in without zooming) into the visible area if it's already partly visible.- Parameters:
scrollForceSelectedPageVisible
- whether the page should be scrolled completely visible
-
getAggregateBounds
Rectangle getAggregateBounds()Return the bounds encompassing the bounds of all rendered pages.- Returns:
- the bounds in display units
-
getApplyFilterInView
PageView.ApplyFilterInView getApplyFilterInView()Whether to show all pages of aFilteredDocument
- even those pages that are not accepted the filter. Only applicable forFilteredDocument
s. -
setApplyFilterInView
Sets whether to show all pages of aFilteredDocument
- even those pages that are not accepted the filter. Only applicable forFilteredDocument
s.
-