eu.livotov.tpt.gui.vdv.core
Class SinglePageDocumentRenderer

java.lang.Object
  extended by com.vaadin.ui.AbstractComponent
      extended by com.vaadin.ui.AbstractComponentContainer
          extended by com.vaadin.ui.AbstractLayout
              extended by com.vaadin.ui.AbstractOrderedLayout
                  extended by com.vaadin.ui.VerticalLayout
                      extended by eu.livotov.tpt.gui.vdv.core.PageRenderer
                          extended by eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.terminal.Paintable, com.vaadin.terminal.Sizeable, com.vaadin.terminal.VariableOwner, com.vaadin.ui.Component, com.vaadin.ui.ComponentContainer, com.vaadin.ui.Layout, com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler, com.vaadin.ui.Table.ColumnGenerator, TPTMultiView.TPTView, java.io.Serializable, java.util.EventListener

public class SinglePageDocumentRenderer
extends PageRenderer
implements com.vaadin.ui.Table.ColumnGenerator

Author:
dlivotov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponent.ComponentErrorEvent, com.vaadin.ui.AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.MarginInfo, com.vaadin.ui.Layout.SpacingHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer
com.vaadin.ui.ComponentContainer.ComponentAttachEvent, com.vaadin.ui.ComponentContainer.ComponentAttachListener, com.vaadin.ui.ComponentContainer.ComponentDetachEvent, com.vaadin.ui.ComponentContainer.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.ErrorListener, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable
com.vaadin.terminal.Paintable.RepaintRequestEvent, com.vaadin.terminal.Paintable.RepaintRequestListener
 
Field Summary
private  int currentPage
           
private  int currentRotationLevel
           
private  float currentZoom
           
private  com.vaadin.ui.Table pagesTable
           
private  DocumentRasterProvider source
           
 
Fields inherited from class com.vaadin.ui.AbstractOrderedLayout
components
 
Fields inherited from class com.vaadin.ui.AbstractLayout
margins
 
Fields inherited from interface com.vaadin.ui.Layout.AlignmentHandler
ALIGNMENT_BOTTOM, ALIGNMENT_HORIZONTAL_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_TOP, ALIGNMENT_VERTICAL_CENTER
 
Fields inherited from interface com.vaadin.terminal.Sizeable
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
SinglePageDocumentRenderer(DocumentRasterProvider source, float initialZoom)
           
 
Method Summary
 com.vaadin.ui.Component generateCell(com.vaadin.ui.Table table, java.lang.Object itemId, java.lang.Object columnId)
           
 void goPage(int number)
           
 void setRotation(int rotation)
           
private  void setupTableRenderer()
           
 void setZoom(float zoom)
           
 void viewActivated(java.lang.String string, java.lang.String string1)
          Called when view is activated, e.g.
 void viewAttached()
          Called when a view is attached to a multiview component, e.g.
 void viewDeactivated(java.lang.String string)
          Called when view is deactivated, e.g.
 void viewRemoved()
          Called when a view is removed from a multiview component, e.g.
 
Methods inherited from class com.vaadin.ui.AbstractOrderedLayout
addComponent, addComponent, addComponentAsFirst, addListener, changeVariables, getComponentAlignment, getComponentIterator, getExpandRatio, isSpacing, isSpacingEnabled, paintContent, removeComponent, removeListener, replaceComponent, setComponentAlignment, setComponentAlignment, setComponentAlignment, setExpandRatio, setSpacing
 
Methods inherited from class com.vaadin.ui.AbstractLayout
getMargin, setMargin, setMargin, setMargin
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getTag, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidthUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.ComponentContainer
addListener, addListener, moveComponentsFrom, removeAllComponents, removeListener, removeListener, requestRepaintAll
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setParent, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.terminal.Paintable
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId
 
Methods inherited from interface com.vaadin.terminal.VariableOwner
isImmediate
 
Methods inherited from interface com.vaadin.terminal.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidth, setWidthUnits
 

Field Detail

source

private DocumentRasterProvider source

currentZoom

private float currentZoom

currentRotationLevel

private int currentRotationLevel

currentPage

private int currentPage

pagesTable

private com.vaadin.ui.Table pagesTable
Constructor Detail

SinglePageDocumentRenderer

public SinglePageDocumentRenderer(DocumentRasterProvider source,
                                  float initialZoom)
Method Detail

goPage

public void goPage(int number)
Specified by:
goPage in class PageRenderer

setZoom

public void setZoom(float zoom)
Specified by:
setZoom in class PageRenderer

setRotation

public void setRotation(int rotation)
Specified by:
setRotation in class PageRenderer

viewActivated

public void viewActivated(java.lang.String string,
                          java.lang.String string1)
Description copied from interface: TPTMultiView.TPTView
Called when view is activated, e.g. becomes visible to the user.

Specified by:
viewActivated in interface TPTMultiView.TPTView
Parameters:
string - ID of the previous view. Useful for building navigation or historical browsing
string1 - optional view parameters, that may come from who called the method switchView

viewDeactivated

public void viewDeactivated(java.lang.String string)
Description copied from interface: TPTMultiView.TPTView
Called when view is deactivated, e.g. becomes hidden from a user. This usually happens if another view was swithced on.

Specified by:
viewDeactivated in interface TPTMultiView.TPTView
Parameters:
string - ID of the view that came at top

viewAttached

public void viewAttached()
Description copied from interface: TPTMultiView.TPTView
Called when a view is attached to a multiview component, e.g. when new view was added by invoking addView method.

Specified by:
viewAttached in interface TPTMultiView.TPTView

viewRemoved

public void viewRemoved()
Description copied from interface: TPTMultiView.TPTView
Called when a view is removed from a multiview component, e.g. when view is removed by invoking a removeView method

Specified by:
viewRemoved in interface TPTMultiView.TPTView

setupTableRenderer

private void setupTableRenderer()

generateCell

public com.vaadin.ui.Component generateCell(com.vaadin.ui.Table table,
                                            java.lang.Object itemId,
                                            java.lang.Object columnId)
Specified by:
generateCell in interface com.vaadin.ui.Table.ColumnGenerator