public class PrintPreviewView extends BaseViewWithUiHandlers<PrintPreviewUiHandlers> implements PrintPreviewPresenter.MyView
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
PrintPreviewView.Binder
GWT UI creator.
|
(package private) class |
PrintPreviewView.PreviewPager
Implements the report preview pager.
|
(package private) class |
PrintPreviewView.PrintPreview
Implements the print preview widget.
|
Modifier and Type | Field and Description |
---|---|
(package private) org.gwtbootstrap3.client.ui.Button |
cancelAction
The Cancel button
|
(package private) org.gwtbootstrap3.client.ui.CheckBox |
displayAllDetails
The Display All Details check box
|
(package private) org.gwtbootstrap3.client.ui.Button |
downloadAction
The Download button
|
(package private) org.gwtbootstrap3.client.ui.Button |
filterAction
The Filter button
|
private com.google.inject.Provider<InputDialog> |
inputDialogProvider
The common input dialogs provider
|
(package private) com.google.gwt.user.client.ui.HasWidgets |
modalFragment
The modal container
|
private boolean |
pageLock
The page lock forbids the preview pager to move over report pages
|
(package private) PrintPreviewView.PreviewPager |
pager
The preview pager
|
(package private) org.gwtbootstrap3.client.ui.ListBox |
paperFormat
The paper format list box
|
(package private) org.gwtbootstrap3.client.ui.ListBox |
paperOrient
The paper orientation list box
|
(package private) com.google.gwt.user.client.ui.ScrollPanel |
previewContainer
The preview container
|
(package private) PrintPreviewView.PrintPreview |
previewContent
The print preview widget to display the list of the report preview images
|
(package private) org.gwtbootstrap3.client.ui.Heading |
previewTitle
The heading widget that holds the preview title
|
(package private) org.gwtbootstrap3.client.ui.Button |
printAction
The Print button
|
(package private) com.google.gwt.view.client.AsyncDataProvider<java.lang.String> |
provider
The preview data provider
|
private com.google.gwt.view.client.Range |
range
The report preview pages range
|
logger
Constructor and Description |
---|
PrintPreviewView(PrintPreviewView.Binder binder,
com.google.inject.Provider<InputDialog> inputDialogProvider)
Constructs this view, used by MPV gwtplatform of ArcBees Inc.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ReportPreview reportPreview)
Implements
Consumer<ReportPreview> interface. |
void |
checkDisplayDetails(boolean b)
Requests the extended detailed report or the short form report.
|
com.google.gwt.view.client.Range |
getCurrentRange()
Gets the current preview range that is defined by the start page and the page count.
|
(package private) void |
onCancelAction(com.google.gwt.event.dom.client.ClickEvent event)
The Cancel button click handler.
|
(package private) void |
onDownloadAction(com.google.gwt.event.dom.client.ClickEvent event)
The Download button click handler.
|
(package private) void |
onFilterAction(com.google.gwt.event.dom.client.ClickEvent event)
The Filter button click handler.
|
void |
onHide()
The view callback method that is invoked by its presenter executing onHide()
lifecycle method.
|
(package private) void |
onPrintAction(com.google.gwt.event.dom.client.ClickEvent event)
The Print button click handler.
|
void |
onReportReady()
This is called when presenter has all the information to render the preview.
|
private void |
selectValue(org.gwtbootstrap3.client.ui.ListBox list,
java.lang.String value)
Finds the given value in the target list box and requests to select the corresponding list
item.
|
void |
setDisplayDetailsVisible(boolean visible)
Shows or hides the Display All Details check box.
|
void |
setPaperFormat(java.lang.String value)
Sets the requested paper format.
|
void |
setPaperOrientation(java.lang.String value)
Sets the requested paper orientation.
|
void |
setPreviewTitle(java.lang.String title)
Sets the preview title.
|
addDialog, onAttach, onDetach, removeModaDialog, setUiHandlers, setupModaDialog, setupModalSlot
addToSlot, asWidget, bindSlot, bindSlot, bindSlot, initWidget, removeFromSlot, setInSlot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@UiField org.gwtbootstrap3.client.ui.Heading previewTitle
@UiField com.google.gwt.user.client.ui.ScrollPanel previewContainer
private boolean pageLock
@UiField(provided=true) PrintPreviewView.PreviewPager pager
@UiField org.gwtbootstrap3.client.ui.ListBox paperFormat
@UiField org.gwtbootstrap3.client.ui.ListBox paperOrient
@UiField(provided=true) PrintPreviewView.PrintPreview previewContent
private com.google.gwt.view.client.Range range
com.google.gwt.view.client.AsyncDataProvider<java.lang.String> provider
@UiField org.gwtbootstrap3.client.ui.CheckBox displayAllDetails
@UiField org.gwtbootstrap3.client.ui.Button printAction
@UiField org.gwtbootstrap3.client.ui.Button downloadAction
@UiField org.gwtbootstrap3.client.ui.Button filterAction
@UiField org.gwtbootstrap3.client.ui.Button cancelAction
@UiField com.google.gwt.user.client.ui.HasWidgets modalFragment
private final com.google.inject.Provider<InputDialog> inputDialogProvider
@Inject public PrintPreviewView(PrintPreviewView.Binder binder, com.google.inject.Provider<InputDialog> inputDialogProvider)
binder
- The injected GWT UI creatorinputDialogProvider
- The injected common input dialogs providerpublic void setPreviewTitle(java.lang.String title)
setPreviewTitle
in interface PrintPreviewPresenter.MyView
title
- The title textpublic void accept(ReportPreview reportPreview)
Consumer<ReportPreview>
interface.accept
in interface java.util.function.Consumer<ReportPreview>
reportPreview
- The report preview data transfer objectpublic void onReportReady()
onReportReady
in interface PrintPreviewPresenter.MyView
@UiHandler(value="printAction") void onPrintAction(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click event@UiHandler(value="downloadAction") void onDownloadAction(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click event@UiHandler(value="filterAction") void onFilterAction(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click eventpublic com.google.gwt.view.client.Range getCurrentRange()
getCurrentRange
in interface PrintPreviewPresenter.MyView
@UiHandler(value="cancelAction") void onCancelAction(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click eventpublic void onHide()
onHide
in interface PrintPreviewPresenter.MyView
public void setPaperFormat(java.lang.String value)
setPaperFormat
in interface PrintPreviewPresenter.MyView
value
- The paper format stringprivate void selectValue(org.gwtbootstrap3.client.ui.ListBox list, java.lang.String value)
list
- The target list boxvalue
- The given valuepublic void setPaperOrientation(java.lang.String value)
setPaperOrientation
in interface PrintPreviewPresenter.MyView
value
- The paper orientation well-known string, LANDSCAPE or PORTRAIT.public void checkDisplayDetails(boolean b)
checkDisplayDetails
in interface PrintPreviewPresenter.MyView
b
- The true value means to display the extended detailed report, otherwise
the short form report.public void setDisplayDetailsVisible(boolean visible)
setDisplayDetailsVisible
in interface PrintPreviewPresenter.MyView
visible
- The boolean value that defines the visibility of the Display All Details
check box