com.openpcl.viewer.panels
Class PosView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.openpcl.viewer.panels.PosView
All Implemented Interfaces:
IPluginHooksPosView, ImageObserver, MenuContainer, Serializable, Accessible

public class PosView
extends JPanel
implements IPluginHooksPosView

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int sDefaultSplitterLocPclFiles
           
static int sTreatSplitterAsClosedIfLessThan
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
PosView(OpenPCLViewer pOpenPCLViewer, String pShortName)
           
 
Method Summary
protected  void buildUI()
           
 void createPclPagesJTree()
          Make the pages JTree and show on the screen Subclass plugins override this method so do not delete or rename this method.
 void createPrintingSupport()
          The PosPrintPages class instantiates all printing capability.
 void disableHorizontalWheelScrollOnTreePanel()
           
 void finishedUpdatingImage()
          Image updating is finished
 void freeUpMemory()
          When the user is done with this rendering session, then free up memory Subclass plugins override this method so do not delete or rename this method.
 BufferedImage getBufferedImageToDrawOn()
           
 int getCurrentPageNumberSelected()
           
 PosTreeNode getCurrentTreeNode()
           
 Point getCurrentViewPositionPoint()
           
 Rectangle getCurrentViewRectangle()
           
 int getCurrentViewWindowWidth()
           
 int getDefaultSplitterLocation()
          Get the default splitter location.
 String getFilePathAndFileName()
           
 int getFileType()
           
 boolean getIsMultiPageParseFinished()
           
 boolean getIsTreePanelShowing()
           
 JInternalFrame getJInternalFrame()
           
 JSplitPane getJSplitPane()
           
 OpenPCLViewer getOpenPCLViewer()
           
 String getPageNameForTitleBar()
           
 PclRenderImage getPclRenderImage()
           
 int getPixelLocForSplitter()
           
 PosBuildListOfPagesToPrint getPosBuildListOfPagesToPrint()
          Get the PosBuildListOfPagesToPrint reference.
 PosPrintPages getPosPrintPages()
           
 PosTree getPosTree()
          Get the PosTree reference.
 PosZoomLogic getPosZoomLogic()
           
 String getShortName()
           
protected  int getSplitPaneDividerSize()
           
 JScrollPane getTreeJScrollPane()
           
 int getViewNumber()
           
protected  String instantiateObjects()
           
 void openTreePanel(boolean pWantToOpen)
          Open the tree panel
 void scrollViewToPosition(Rectangle pScrollBarPosition)
           
 void setBufferedImageToDrawOn(BufferedImage pBufferedImageToDrawOn)
          Set the BufferedImage to show on the screen
 void setChangingPartNameOnJInternalFrameTitleBar(String pString)
           
 void setCurrentPageNumberSelected(int pCurrentPageNumberSelected)
           
 void setCurrentTreeNode(PosTreeNode pCurrentTreeNode)
           
 void setFilePathAndFileName(String pFilePathAndFileName)
           
 void setFileType(int pFileType)
           
 void setIsMultiPageParseFinished(boolean pIsMultiPageParseFinished)
           
 void setIsTreePanelShowing(boolean pIsTreePanelShowing)
           
 void setJInternalFrame(JInternalFrame pJInternalFrame)
           
 void setPixelLocForSplitter(int pPixelLocForSplitter)
           
 void setSplitterLocationToBeforeWasClosed()
          Set the splitter location to last location before it was closed
 void setSplitterLocationToDefault()
          Set the splitter location to default
 void setViewNumber(int pViewNumber)
           
 void showClippedBufferedImage(int pWidth, int pHeight)
           
 void showUpdatingImageVisualCue()
          While doing a cascade or tile horizontal or vertical, put a visual cue on the screen for each view so the user knows the image is being updated and isn't done yet.
 String toString()
           
 void updateJInternalFrameTitleBarText()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, 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, 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, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sDefaultSplitterLocPclFiles

public static final int sDefaultSplitterLocPclFiles
See Also:
Constant Field Values

sTreatSplitterAsClosedIfLessThan

public static final int sTreatSplitterAsClosedIfLessThan
See Also:
Constant Field Values
Constructor Detail

PosView

public PosView(OpenPCLViewer pOpenPCLViewer,
               String pShortName)
Method Detail

instantiateObjects

protected String instantiateObjects()

buildUI

protected void buildUI()

getSplitPaneDividerSize

protected int getSplitPaneDividerSize()

getOpenPCLViewer

public OpenPCLViewer getOpenPCLViewer()

getJInternalFrame

public JInternalFrame getJInternalFrame()

getViewNumber

public int getViewNumber()

getCurrentPageNumberSelected

public int getCurrentPageNumberSelected()

getFileType

public int getFileType()

getBufferedImageToDrawOn

public BufferedImage getBufferedImageToDrawOn()

getIsTreePanelShowing

public boolean getIsTreePanelShowing()

getIsMultiPageParseFinished

public boolean getIsMultiPageParseFinished()

getShortName

public String getShortName()

getCurrentTreeNode

public PosTreeNode getCurrentTreeNode()

getPclRenderImage

public PclRenderImage getPclRenderImage()

getPosZoomLogic

public PosZoomLogic getPosZoomLogic()

getTreeJScrollPane

public JScrollPane getTreeJScrollPane()

getJSplitPane

public JSplitPane getJSplitPane()

getPixelLocForSplitter

public int getPixelLocForSplitter()

getPosPrintPages

public PosPrintPages getPosPrintPages()

getPosTree

public PosTree getPosTree()
Get the PosTree reference. Could be a subclass of PosTree. Subclass plugins override this method so do not delete or rename this method.

Specified by:
getPosTree in interface IPluginHooksPosView

getPosBuildListOfPagesToPrint

public PosBuildListOfPagesToPrint getPosBuildListOfPagesToPrint()
Get the PosBuildListOfPagesToPrint reference. Could be a subclass of PosBuildListOfPagesToPrint. Subclass plugins override this method so do not delete or rename this method.

Specified by:
getPosBuildListOfPagesToPrint in interface IPluginHooksPosView

setViewNumber

public void setViewNumber(int pViewNumber)

setCurrentPageNumberSelected

public void setCurrentPageNumberSelected(int pCurrentPageNumberSelected)

setFileType

public void setFileType(int pFileType)

setChangingPartNameOnJInternalFrameTitleBar

public void setChangingPartNameOnJInternalFrameTitleBar(String pString)

setCurrentTreeNode

public void setCurrentTreeNode(PosTreeNode pCurrentTreeNode)

setIsTreePanelShowing

public void setIsTreePanelShowing(boolean pIsTreePanelShowing)

setIsMultiPageParseFinished

public void setIsMultiPageParseFinished(boolean pIsMultiPageParseFinished)

setPixelLocForSplitter

public void setPixelLocForSplitter(int pPixelLocForSplitter)

setJInternalFrame

public void setJInternalFrame(JInternalFrame pJInternalFrame)

setBufferedImageToDrawOn

public void setBufferedImageToDrawOn(BufferedImage pBufferedImageToDrawOn)
Set the BufferedImage to show on the screen

Parameters:
pBufferedImageToDrawOn -

showClippedBufferedImage

public void showClippedBufferedImage(int pWidth,
                                     int pHeight)

createPclPagesJTree

public void createPclPagesJTree()
Make the pages JTree and show on the screen Subclass plugins override this method so do not delete or rename this method.

Specified by:
createPclPagesJTree in interface IPluginHooksPosView

createPrintingSupport

public void createPrintingSupport()
The PosPrintPages class instantiates all printing capability. Subclass plugins override this method so do not delete or rename this method.

Specified by:
createPrintingSupport in interface IPluginHooksPosView

freeUpMemory

public void freeUpMemory()
When the user is done with this rendering session, then free up memory Subclass plugins override this method so do not delete or rename this method.

Specified by:
freeUpMemory in interface IPluginHooksPosView

openTreePanel

public void openTreePanel(boolean pWantToOpen)
Open the tree panel

Parameters:
pWantToOpen -

setSplitterLocationToDefault

public void setSplitterLocationToDefault()
Set the splitter location to default


setSplitterLocationToBeforeWasClosed

public void setSplitterLocationToBeforeWasClosed()
Set the splitter location to last location before it was closed


getDefaultSplitterLocation

public int getDefaultSplitterLocation()
Get the default splitter location. Could be subclassed and return different values for different file formats. Subclass plugins override this method so do not delete or rename this method.

Specified by:
getDefaultSplitterLocation in interface IPluginHooksPosView

getFilePathAndFileName

public String getFilePathAndFileName()

setFilePathAndFileName

public void setFilePathAndFileName(String pFilePathAndFileName)

toString

public String toString()
Overrides:
toString in class Component

getPageNameForTitleBar

public String getPageNameForTitleBar()

updateJInternalFrameTitleBarText

public void updateJInternalFrameTitleBarText()

getCurrentViewWindowWidth

public int getCurrentViewWindowWidth()

getCurrentViewPositionPoint

public Point getCurrentViewPositionPoint()

getCurrentViewRectangle

public Rectangle getCurrentViewRectangle()

scrollViewToPosition

public void scrollViewToPosition(Rectangle pScrollBarPosition)

showUpdatingImageVisualCue

public void showUpdatingImageVisualCue()
While doing a cascade or tile horizontal or vertical, put a visual cue on the screen for each view so the user knows the image is being updated and isn't done yet. The cue usually shows for less than 1/4 second but could get to 1/2 second if there are for example more than 4 views open that are showing a very busy page


finishedUpdatingImage

public void finishedUpdatingImage()
Image updating is finished


disableHorizontalWheelScrollOnTreePanel

public void disableHorizontalWheelScrollOnTreePanel()


OpenPCL http://www.openpcl.com