|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jpedal.PdfPanel
public class PdfPanel
Do not create an instance of this class - provides GUI functionality for PdfDecoder class to extend
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
|---|---|
static java.awt.Color |
backgroundColor
color actual text will appear in highlights |
javax.swing.JPanel[] |
extraButton
Not part of the JPedal API - Required for Storypad |
static java.awt.Color |
highlightColor
|
static int |
SHOW_BOXES
flag for showing all lines on page used for grouping |
static int |
SHOW_LINES
flag for showing all lines on page used for grouping |
static int |
SHOW_OBJECTS
flag for showing all object outlines in PDFPanel |
boolean |
showAnnotations
|
boolean |
useParentButtons
|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
PdfPanel()
|
|
| Method Summary | |
|---|---|
void |
addHiglightedObject(java.awt.Rectangle currentShape,
java.awt.Color outlineHighlightColor)
update rectangle we draw to show area of object for Storypad - (NOT PART OF API and subject to change) |
void |
addMergingDisplayForDebugging(Vector_Int merge_level,
org.jpedal.utils.repositories.Vector_Shape merge_outline,
int count,
java.awt.Color[] colors)
put debugging info for grouping onscreen to aid in developing and debugging merging algorithms used by Storypad - (NOT PART OF API and subject to change) |
void |
disableBorderForPrinting()
do not display border when screen printed |
void |
ensurePointIsVisible(java.awt.Point p)
make screen scroll to ensure point is visible |
java.awt.Rectangle |
getCombinedAreas(java.awt.Rectangle targetRectangle,
boolean justText)
workout combined area of shapes are in an area |
int |
getDisplayView()
returns view mode used in panel - SINGLE_PAGE,CONTINUOUS,FACING,CONTINUOUS_FACING (has no effect in OS versions) |
int[] |
getHighlightImage()
|
int |
getInsetH()
|
int |
getInsetW()
|
java.awt.Dimension |
getMaximumSize()
get sizes of panel This is the PDF pagesize (as set in the PDF from pagesize) - It now includes any scaling factor you have set (ie a PDF size 800 * 600 with a scaling factor of 2 will return 1600 *1200) |
java.awt.Dimension |
getMinimumSize()
get width |
java.awt.image.BufferedImage |
getPageAsThumbnail(int height,
org.jpedal.render.DynamicVectorRenderer currentDisplay)
get pdf as Image of current page with height as required height in pixels - Page must be decoded first - used to generate thubnails for display. |
java.awt.Rectangle[] |
getPageHotspots()
return the hotspots areas for the page (ie regions of Annotations). |
javax.swing.JPanel |
getParentChildButton(int buttonNumber)
|
javax.swing.JPanel[] |
getParentChildButtonArray()
|
int |
getPDFHeight()
get sizes of panel - This is the PDF pagesize |
int |
getPDFWidth()
get sizes of panel This is the PDF pagesize (as set in the PDF from pagesize) - It now includes any scaling factor you have set |
java.awt.Dimension |
getPreferredSize()
get sizes of panel This is the PDF pagesize (as set in the PDF from pagesize) - It now includes any scaling factor you have set (ie a PDF size 800 * 600 with a scaling factor of 2 will return 1600 *1200) |
int |
getPrintPageScalingMode()
read current Page scaling mode used for printing |
int |
getRawPDFHeight()
get sizes of page excluding any insets |
int |
getRawPDFWidth()
get raw width for image |
float |
getScaling()
|
int |
getScrollInterval()
return amount to scroll window by when scrolling (default is 10) |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent e)
handle context sensitive tooltips - replaces default java routine with our own which is context sensitive - Used for hotspots |
void |
initNonPDF(PdfDecoder pdf)
|
boolean |
isImageExtractionAllowed()
|
void |
paint(java.awt.Graphics g)
|
void |
paintComponent(java.awt.Graphics g)
standard method to draw page and any highlights onto JPanel |
void |
removeFoundTextArea(java.awt.Rectangle rectArea)
remove zone on page for text areas if present |
void |
removeFoundTextAreas(java.awt.Rectangle[] rectArea)
remove highlight zones on page for text areas on single pages null value will totally reset |
void |
removeHiglightedObject()
update rectangle we draw to show area of object - See org.jpedal.examples.contentextractor.contentExtractor |
void |
repaintArea(java.awt.Rectangle screenBox,
int maxY)
requests repaint of an area |
void |
scrollRectToHighlight(java.awt.Rectangle highlight)
Method to scroll the PDF to a highlighted area. |
void |
setAnnotationsVisible(boolean showAnnotations)
allows user to switch on/off display (default is on) |
void |
setDebugDisplay(boolean isEnabled)
set merging option for Storypad (not part of API) |
void |
setDebugView(int level,
boolean enabled)
debug zone for Storypad - not part of API |
void |
setDrawCrossHairs(boolean newDrawCrossHairs,
int newBoxContained,
java.awt.Color newColor)
turn crossHairs on or off - highlight newBoxContained handle with specified Color, if newBoxContained is -1 no handles are highlighted - See org.jpedal.examples.contentextractor.ContentExtractor |
void |
setDrawInteractively(boolean drawInteractively)
JPedal will now draw the screen only when fully decoded rather than on any paint - to restore previous default behaviour (if required), call this routine with true |
void |
setFoundTextArea(java.awt.Rectangle rectArea)
highlight zone on page for text areas remove with removeFoundTextArea(Rectangle rectArea) |
void |
setFoundTextAreas(java.awt.Rectangle[] newAreas)
highlight zones on page for text areas on single pages null value will totally reset - use removeFoundTextAreas(Rectangle[] rectArea) is just just wish to remove an item |
void |
setHardwareAccelerationforScreen(boolean useAcceleration)
Enables/Disables hardware acceleration of screen rendering in 1.4 (default is on) |
void |
setHighlightedAreas(java.awt.Rectangle[] areas)
Deprecated. Use setFoundTextArea or setFoundTextAreas |
void |
setHighlightedImage(int[] highlightedImage)
|
void |
setHighlightedZones(int mode,
int[] cx,
int[] cy,
java.awt.Shape[] fragmentShapes,
java.lang.Object[] linkedItems,
int[] parents,
java.lang.Object[] childItems,
int[] childParents,
java.awt.geom.Rectangle2D[] outlineZone,
boolean[] highlightedZonesSelected,
boolean[] hasDrownedObjects,
java.awt.Color[] highlightColors,
int[] selectionOrder,
int[] processedByRegularExpression)
Deprecated. please look at setFoundTextAreas(Rectangle areas),setHighlightedAreas(Rectangle[] areas) This is NOT part of the API (used in Storypad) |
void |
setImageExtractionAllowed(boolean allow)
|
void |
setInset(int width,
int height)
set an inset display so that display will not touch edge of panel |
void |
setMessageFrame(javax.swing.JFrame frame)
allow user to set component for waring message in renderer to appear - if unset no message will appear |
void |
setPageRotation(int newRotation)
initialise panel and set size to display during updates and update the AffineTransform to new values |
void |
setParentChildButton(int buttonNumber,
javax.swing.JPanel j)
|
void |
setParentChildButtonArray(javax.swing.JPanel[] newButtonSet)
|
void |
setPDFBorder(javax.swing.border.Border newBorder)
set border for screen and print which will be displayed Setting a new value will enable screen and border painting - disable with disableBorderForPrinting() |
void |
setPrintPageScalingMode(int pageScalingMode)
set page scaling mode to use - default setting is PAGE_SCALING_REDUCE_TO_PRINTER_MARGINS All values start PAGE_SCALING |
void |
setScrollInterval(int scrollInterval)
set amount to scroll window by when scrolling |
void |
setUsePDFPaperSize(boolean usePDFPaperSize)
|
void |
updateCursorBoxOnScreen(java.awt.Rectangle newOutlineRectangle,
java.awt.Color outlineColor)
update rectangle we draw to highlight an area - See SimpleViewer example for example code showing current usage. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, 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, hide, 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, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public javax.swing.JPanel[] extraButton
public boolean useParentButtons
public static java.awt.Color highlightColor
public static java.awt.Color backgroundColor
public boolean showAnnotations
public static final int SHOW_OBJECTS
public static final int SHOW_LINES
public static final int SHOW_BOXES
| Constructor Detail |
|---|
public PdfPanel()
| Method Detail |
|---|
public void initNonPDF(PdfDecoder pdf)
public java.awt.Rectangle getCombinedAreas(java.awt.Rectangle targetRectangle,
boolean justText)
public final void addMergingDisplayForDebugging(Vector_Int merge_level,
org.jpedal.utils.repositories.Vector_Shape merge_outline,
int count,
java.awt.Color[] colors)
public final void setDebugView(int level,
boolean enabled)
public final java.awt.image.BufferedImage getPageAsThumbnail(int height,
org.jpedal.render.DynamicVectorRenderer currentDisplay)
public final void setHighlightedZones(int mode,
int[] cx,
int[] cy,
java.awt.Shape[] fragmentShapes,
java.lang.Object[] linkedItems,
int[] parents,
java.lang.Object[] childItems,
int[] childParents,
java.awt.geom.Rectangle2D[] outlineZone,
boolean[] highlightedZonesSelected,
boolean[] hasDrownedObjects,
java.awt.Color[] highlightColors,
int[] selectionOrder,
int[] processedByRegularExpression)
public void setDebugDisplay(boolean isEnabled)
public final void setInset(int width,
int height)
public void ensurePointIsVisible(java.awt.Point p)
public final java.awt.Dimension getMaximumSize()
getMaximumSize in class javax.swing.JComponentpublic final java.awt.Dimension getMinimumSize()
getMinimumSize in class javax.swing.JComponentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void setFoundTextArea(java.awt.Rectangle rectArea)
public void removeFoundTextArea(java.awt.Rectangle rectArea)
public void removeFoundTextAreas(java.awt.Rectangle[] rectArea)
public void setFoundTextAreas(java.awt.Rectangle[] newAreas)
public void setHighlightedAreas(java.awt.Rectangle[] areas)
public final java.lang.String getToolTipText(java.awt.event.MouseEvent e)
getToolTipText in class javax.swing.JComponent
public final void updateCursorBoxOnScreen(java.awt.Rectangle newOutlineRectangle,
java.awt.Color outlineColor)
public void repaintArea(java.awt.Rectangle screenBox,
int maxY)
public final void removeHiglightedObject()
public final void addHiglightedObject(java.awt.Rectangle currentShape,
java.awt.Color outlineHighlightColor)
public void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void scrollRectToHighlight(java.awt.Rectangle highlight)
highlight -
public void setDrawCrossHairs(boolean newDrawCrossHairs,
int newBoxContained,
java.awt.Color newColor)
newBoxContained - public javax.swing.JPanel getParentChildButton(int buttonNumber)
public void setParentChildButton(int buttonNumber,
javax.swing.JPanel j)
public javax.swing.JPanel[] getParentChildButtonArray()
public void setParentChildButtonArray(javax.swing.JPanel[] newButtonSet)
public final int getPDFWidth()
public final int getRawPDFWidth()
public void setMessageFrame(javax.swing.JFrame frame)
frame - public final int getPDFHeight()
public final int getRawPDFHeight()
public java.awt.Rectangle[] getPageHotspots()
public void disableBorderForPrinting()
public final void setPDFBorder(javax.swing.border.Border newBorder)
public final void setPageRotation(int newRotation)
newRotation - - sets display rotation to this valuepublic void setHardwareAccelerationforScreen(boolean useAcceleration)
public int getScrollInterval()
public void setScrollInterval(int scrollInterval)
public void setAnnotationsVisible(boolean showAnnotations)
public void setDrawInteractively(boolean drawInteractively)
public int getDisplayView()
public int getPrintPageScalingMode()
public void setPrintPageScalingMode(int pageScalingMode)
public void setUsePDFPaperSize(boolean usePDFPaperSize)
public void setHighlightedImage(int[] highlightedImage)
public int[] getHighlightImage()
public boolean isImageExtractionAllowed()
public void setImageExtractionAllowed(boolean allow)
public float getScaling()
public int getInsetH()
public int getInsetW()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||