public class ReportViewer extends AbstractVisionPanel implements ExtensibleComponent
Modifier and Type | Class and Description |
---|---|
protected class |
ReportViewer.ControlsPanel |
protected class |
ReportViewer.ReportLoader
ReportLoader is the background process that runs to collect the data for a report without blocking the UI
thread.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAT_REPORTING |
protected ReportViewer.ControlsPanel |
controls |
protected javax.swing.JPopupMenu |
popupMenu |
antialias, context, cursorCode, dynamicProps
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
COMPONENT_RUNNING
RESERVED_SET_KEY
COMPONENT_LOCKED, COMPONENT_PERMISSIONS, COMPONENT_SECURITY, COMPONENT_TRANSLATIONS
Constructor and Description |
---|
ReportViewer() |
Modifier and Type | Method and Description |
---|---|
void |
bulkSetValues(java.util.Map<java.lang.String,java.lang.Object> map) |
protected boolean |
checkExpirationAccess() |
java.awt.Color |
getBackground()
Gets the background color of this component.
|
byte[] |
getBytesPDF()
Allows scripts to get the bytes in PDF format.
|
byte[] |
getBytesPNG()
Allows scripts to get the bytes in png format.
|
int |
getCurrentPage() |
java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> |
getDynamicProps() |
java.util.Map<java.lang.String,ExtensionFunction> |
getExtensionFunctions() |
int |
getPageCount() |
java.awt.Color |
getPanelBackground() |
DynamicPropertyDescriptor[] |
getProperties() |
java.lang.Object |
getPropertyValue(java.lang.String name) |
java.lang.String |
getReportPath() |
java.lang.String |
getSuggestedFilename() |
float |
getZoomFactor() |
protected javax.swing.JPopupMenu |
initMenu() |
boolean |
isPropertyDefined(java.lang.String name) |
boolean |
isShowControls() |
void |
loadReport()
loadReport() starts most of the checking and loading duties for the ReportViewer.
|
void |
localeChanged(java.util.Locale newLocale) |
void |
onShutdown()
Subclasses should override this to provide shutdown logic.
|
void |
onStartup()
We override these PropertyProvider methods to expose the ReportResource's parameters as custom properties in the
Property Editor, but we don't want the names to be editable outside of the ReportData configuration panel.
|
void |
print() |
void |
print(java.lang.String printerName) |
void |
print(java.lang.String printerName,
boolean showDialog) |
java.lang.String |
saveAsHTML(java.lang.String fname,
boolean continuous) |
java.lang.String |
saveAsPDF(java.lang.String fname) |
java.lang.String |
saveAsPNG(java.lang.String fname) |
void |
setBackground(java.awt.Color bg) |
void |
setCurrentPage(int pageNumber) |
void |
setDynamicProps(java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> map) |
void |
setExtensionFunctions(java.util.Map<java.lang.String,ExtensionFunction> map) |
void |
setForeground(java.awt.Color fg) |
void |
setPageCount(int unused) |
void |
setPanelBackground(java.awt.Color panelBackground) |
void |
setPropertyValue(java.lang.String name,
java.lang.Object value)
The Property (aka Report Parameter) values can be set from the Property editor to override the default value.
|
void |
setPropertyValueQuiet(java.lang.String name,
java.lang.Object value)
Sets the property value without reloading the report.
|
void |
setReportPath(java.lang.String reportPath) |
void |
setShowControls(boolean show) |
void |
setSuggestedFilename(java.lang.String suggestedFilename) |
void |
setZoomFactor(float zoomFactor) |
void |
updateControlVisibility() |
getAppContext, getCursorCode, getDataQuality, getStyles, getToolTipText, initStyleListener, isAntialias, isComponentRunning, paintChildren, paintComponent, paintOverlayOverChildren, setAntialias, setCursorCode, setDataQuality, setName, setStyles, setToolTipText, setVisible, shutdownComponent, startupComponent, translate, updateQuality
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAppContext, shutdownComponent, startupComponent
public static final java.lang.String CAT_REPORTING
protected javax.swing.JPopupMenu popupMenu
protected ReportViewer.ControlsPanel controls
public void onStartup()
onStartup
in class AbstractVisionPanel
public void onShutdown()
AbstractVisionPanel
onShutdown
in class AbstractVisionPanel
public DynamicPropertyDescriptor[] getProperties()
getProperties
in interface DynamicPropertyProvider
getProperties
in class AbstractVisionPanel
public java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> getDynamicProps()
getDynamicProps
in interface MutableDynamicPropertyProvider
getDynamicProps
in class AbstractVisionPanel
public void setDynamicProps(@Nullable java.util.TreeMap<java.lang.String,DynamicPropertyDescriptor> map)
setDynamicProps
in interface MutableDynamicPropertyProvider
setDynamicProps
in class AbstractVisionPanel
public void setPropertyValue(java.lang.String name, java.lang.Object value) throws java.lang.ClassCastException
setPropertyValue
in interface DynamicPropertyProvider
setPropertyValue
in class AbstractVisionPanel
java.lang.ClassCastException
public void setPropertyValueQuiet(java.lang.String name, java.lang.Object value) throws java.lang.ClassCastException
java.lang.ClassCastException
public void bulkSetValues(java.util.Map<java.lang.String,java.lang.Object> map)
public java.lang.Object getPropertyValue(java.lang.String name)
getPropertyValue
in interface DynamicPropertyProvider
getPropertyValue
in class AbstractVisionPanel
public boolean isPropertyDefined(java.lang.String name)
isPropertyDefined
in interface DynamicPropertyProvider
isPropertyDefined
in class AbstractVisionPanel
public java.lang.String getReportPath()
public void setReportPath(java.lang.String reportPath)
public void loadReport()
public void setBackground(java.awt.Color bg)
setBackground
in class javax.swing.JComponent
public java.awt.Color getBackground()
getBackground
in class java.awt.Component
public void setForeground(java.awt.Color fg)
setForeground
in class javax.swing.JComponent
public java.util.Map<java.lang.String,ExtensionFunction> getExtensionFunctions()
getExtensionFunctions
in interface ExtensibleComponent
public void setExtensionFunctions(java.util.Map<java.lang.String,ExtensionFunction> map)
setExtensionFunctions
in interface ExtensibleComponent
public void localeChanged(java.util.Locale newLocale)
localeChanged
in interface LocaleListener
localeChanged
in class AbstractVisionPanel
public float getZoomFactor()
public void setZoomFactor(float zoomFactor)
public int getCurrentPage()
public void setCurrentPage(int pageNumber)
public int getPageCount()
public void setPageCount(int unused)
protected javax.swing.JPopupMenu initMenu()
public void print()
public void print(java.lang.String printerName)
public void print(java.lang.String printerName, boolean showDialog)
@Nullable public byte[] getBytesPDF()
@Nullable public byte[] getBytesPNG()
public java.lang.String saveAsPDF(java.lang.String fname)
@Nullable public java.lang.String saveAsHTML(java.lang.String fname, boolean continuous)
public java.lang.String saveAsPNG(java.lang.String fname)
protected boolean checkExpirationAccess()
public java.awt.Color getPanelBackground()
public void setPanelBackground(java.awt.Color panelBackground)
public void setSuggestedFilename(java.lang.String suggestedFilename)
public java.lang.String getSuggestedFilename()
public boolean isShowControls()
public void setShowControls(boolean show)
public void updateControlVisibility()