|
JPedal Java PDF library 4.10b16 API Documentation - http://www.jpedal.org | ||||||||
| 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 |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
java.util.Map |
areas
Highlight Areas stored here |
static java.awt.Color |
backgroundColor
The colour of the text once highlighted |
boolean |
extractingAsImage
|
static java.awt.Color |
highlightColor
The colour of the highlighting box around the text |
static float |
highlightComposite
The transparency of the highlighting box around the text stored as a float |
ObjectStore |
objectStoreRef
the ObjectStore for this file |
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 |
turnoverOn
|
boolean |
useNewGraphicsMode
|
| 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 |
addHighlights(java.awt.Rectangle[] highlights,
boolean areaSelect,
int page)
Method to highlight text on page. |
void |
addToLineAreas(java.awt.Rectangle area,
int writingMode,
int page)
|
void |
clearHighlights()
Clear all highlights that are being displayed |
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 |
java.awt.Rectangle |
getCurrentPageCoords()
|
java.awt.Rectangle |
getCursorBoxOnScreen()
|
int |
getDisplayView()
returns view mode used in panel - SINGLE_PAGE,CONTINUOUS,FACING,CONTINUOUS_FACING (has no effect in OS versions) |
java.util.Map |
getHighlightAreas()
|
java.awt.Rectangle[] |
getHighlightedAreas(int page)
|
int[] |
getHighlightImage()
|
int |
getInsetH()
|
int |
getInsetW()
|
java.awt.Rectangle[] |
getLineAreas(int page)
|
int[] |
getLineWritingMode(int page)
|
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. |
javax.swing.JScrollBar |
getPageFlowBar()
|
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.awt.Point |
getUserOffsets(int mode)
|
void |
initNonPDF(PdfDecoder pdf)
|
boolean |
isExtractingAsImage()
|
boolean |
isImageExtractionAllowed()
|
void |
paint(java.awt.Graphics g)
update rectangle we draw to show area of object for Storypad - (NOT PART OF API and subject to change) final public void addHiglightedObject( Rectangle currentShape, Color outlineHighlightColor) { //over-ride in multipage mode if(this.displayView!=Display.SINGLE_PAGE) return; this.currentHighlightedObject = currentShape; this.outlineHighlightColor = outlineHighlightColor; if((currentHighlightedObject!=null)&&(!currentHighlightedObject.equals(lastHighlight))){ currentManager.addDirtyRegion(this,currentHighlightedObject.x-strip,currentHighlightedObject.y-strip,currentHighlightedObject.width+strip+strip,currentHighlightedObject.height+strip+strip); lastHighlight=currentHighlightedObject; } }/ |
void |
paintComponent(java.awt.Graphics g)
standard method to draw page and any highlights onto JPanel |
void |
removeFoundTextArea(java.awt.Rectangle rectArea,
int page)
remove zone on page for text areas if present |
void |
removeFoundTextAreas(java.awt.Rectangle[] rectArea,
int page)
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,
int page)
Method to scroll the PDF to a highlighted area. |
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 |
setExtractingAsImage(boolean extractingAsImage)
|
java.awt.Rectangle |
setFoundParagraph(int x,
int y,
int page)
Highlights a section of lines that form a paragraph and returns the area that encloses all highlight areas |
void |
setHardwareAccelerationforScreen(boolean useAcceleration)
Enables/Disables hardware acceleration of screen rendering in 1.4 (default is on) |
void |
setHighlightAreas(java.util.Map highlightAreas)
|
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)
set zones we want highlighted onscreen NOT RECOMMENDED for general use - 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 |
setLineAreas(java.util.Map la)
|
void |
setLineWritingMode(java.util.Map lineOrientation)
|
void |
setMessageFrame(java.awt.Container 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 |
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 |
setUserOffsets(int x,
int y,
int mode)
allow user to 'move' display of PDF mode is a Constant in org.jpedal.external.OffsetOptions (ie OffsetOptions.SWING_DISPLAY,OffsetOptions.PRINTING) |
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, getBaseline, getBaselineResizeBehavior, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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 boolean turnoverOn
public boolean useNewGraphicsMode
public static java.awt.Color highlightColor
public static java.awt.Color backgroundColor
public static float highlightComposite
public static final int SHOW_OBJECTS
public static final int SHOW_LINES
public static final int SHOW_BOXES
public ObjectStore objectStoreRef
public java.util.Map areas
public boolean extractingAsImage
| Constructor Detail |
|---|
public PdfPanel()
| Method Detail |
|---|
public java.util.Map getHighlightAreas()
public void setHighlightAreas(java.util.Map highlightAreas)
public void setExtractingAsImage(boolean extractingAsImage)
public void initNonPDF(PdfDecoder pdf)
public java.awt.Rectangle getCombinedAreas(java.awt.Rectangle targetRectangle,
boolean justText)
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 final void setInset(int width,
int height)
public void ensurePointIsVisible(java.awt.Point p)
public void setUserOffsets(int x,
int y,
int mode)
public java.awt.Point getUserOffsets(int mode)
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 java.awt.Rectangle[] getHighlightedAreas(int page)
public java.awt.Rectangle setFoundParagraph(int x,
int y,
int page)
public void addHighlights(java.awt.Rectangle[] highlights,
boolean areaSelect,
int page)
highlights - :: The Array of rectangles that you wish to have highlightedareaSelect - :: The flag that will either select text as line between points if false or characters within an area if true.public void clearHighlights()
public void removeFoundTextArea(java.awt.Rectangle rectArea,
int page)
public void removeFoundTextAreas(java.awt.Rectangle[] rectArea,
int page)
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 void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponent
public void scrollRectToHighlight(java.awt.Rectangle highlight,
int page)
highlight -
public void setDrawCrossHairs(boolean newDrawCrossHairs,
int newBoxContained,
java.awt.Color newColor)
newBoxContained - public final int getPDFWidth()
public final int getRawPDFWidth()
public void setMessageFrame(java.awt.Container frame)
frame - public final int getPDFHeight()
public final int getRawPDFHeight()
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 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()
public java.awt.Rectangle getCursorBoxOnScreen()
public boolean isExtractingAsImage()
public java.awt.Rectangle getCurrentPageCoords()
public javax.swing.JScrollBar getPageFlowBar()
public void addToLineAreas(java.awt.Rectangle area,
int writingMode,
int page)
public int[] getLineWritingMode(int page)
public void setLineWritingMode(java.util.Map lineOrientation)
public java.awt.Rectangle[] getLineAreas(int page)
public void setLineAreas(java.util.Map la)
|
JPedal Java PDF library 4.10b16 API Documentation - http://www.jpedal.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||