Package org.compiere.print
Class View
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.compiere.swing.CPanel
-
- org.compiere.print.View
-
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
public class View extends CPanel
View Panel- Version:
- $Id: View.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- FR [ 2539927 ] Display Zoom combobox https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2539927&group_id=176962
- 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static int
MARGIN
Margin around paperstatic String[]
ZOOM_OPTIONS
Zoom Options-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description View(LayoutEngine layout)
Print Preview
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MQuery
getDrillAcross(Point absolutePoint)
Get Drill AcrossMQuery
getDrillDown(Point absolutePoint)
Get Drill Downint
getMarginSize(boolean doScale)
Dimension
getMaximumSize()
Minimum SizeDimension
getMinimumSize()
Minimum Sizeint
getPageCount()
Get Page CountString
getPageInfo(int pageNo)
Get Page Info for Multi-Page tablesString
getPageInfoMax()
Get Max Page Info for Multi-Page tablesfloat
getPageNoAt(Point p)
Get Page at PointCPaper
getPaper()
Get Paperint
getPaperHeight()
Get Paper Heightint
getPaperHeight(boolean doScale)
int
getPaperWidth()
Get Paper Heightint
getPaperWidth(boolean doScale)
Dimension
getPreferredSize()
Preferred SizeRectangle
getRectangleOfPage(int pageNo)
Get Rectange of PageRectangle
getRectangleOfPage(int pageNo, boolean doScale)
int
getZoomLevel()
Get Zoom Levelboolean
isArchivable()
Is Archivablevoid
paintComponent(Graphics g)
Paint Componentvoid
setZoomLevel(int level)
Set Zoom Levelvoid
setZoomLevel(String levelString)
Set Zoom Level-
Methods inherited from class org.compiere.swing.CPanel
getBackgroundColor, getTabLevel, setBackground, setBackgroundColor, setTabLevel, toString
-
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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
ZOOM_OPTIONS
public static final String[] ZOOM_OPTIONS
Zoom Options
-
MARGIN
public static int MARGIN
Margin around paper
-
-
Constructor Detail
-
View
public View(LayoutEngine layout)
Print Preview- Parameters:
layout
- Layout
-
-
Method Detail
-
getMarginSize
public int getMarginSize(boolean doScale)
-
getMinimumSize
public Dimension getMinimumSize()
Minimum Size- Overrides:
getMinimumSize
in classJComponent
- Returns:
- Max Page Size
-
getMaximumSize
public Dimension getMaximumSize()
Minimum Size- Overrides:
getMaximumSize
in classJComponent
- Returns:
- Max Page Size
-
getPreferredSize
public Dimension getPreferredSize()
Preferred Size- Overrides:
getPreferredSize
in classJComponent
- Returns:
- Max Page Size
-
isArchivable
public boolean isArchivable()
Is Archivable- Returns:
- true if archivable
-
paintComponent
public void paintComponent(Graphics g)
Paint Component- Overrides:
paintComponent
in classJComponent
- Parameters:
g
- Graphics
-
setZoomLevel
public void setZoomLevel(int level)
Set Zoom Level- Parameters:
level
- zoom level
-
setZoomLevel
public void setZoomLevel(String levelString)
Set Zoom Level- Parameters:
levelString
- zoom level string
-
getZoomLevel
public int getZoomLevel()
Get Zoom Level- Returns:
- zoom level
-
getRectangleOfPage
public Rectangle getRectangleOfPage(int pageNo)
Get Rectange of Page- Parameters:
pageNo
- page no- Returns:
- rectangle
-
getRectangleOfPage
public Rectangle getRectangleOfPage(int pageNo, boolean doScale)
-
getPageNoAt
public float getPageNoAt(Point p)
Get Page at Point- Parameters:
p
- Point- Returns:
- page as float to determine also position on page
-
getPageCount
public int getPageCount()
Get Page Count- Returns:
- page count
-
getPageInfo
public String getPageInfo(int pageNo)
Get Page Info for Multi-Page tables- Parameters:
pageNo
- page- Returns:
- info e.g. (1,1)
-
getPageInfoMax
public String getPageInfoMax()
Get Max Page Info for Multi-Page tables- Returns:
- info e.g. (3,2)
-
getPaper
public CPaper getPaper()
Get Paper- Returns:
- paper
-
getPaperHeight
public int getPaperHeight()
Get Paper Height- Returns:
- paper height
-
getPaperHeight
public int getPaperHeight(boolean doScale)
-
getPaperWidth
public int getPaperWidth()
Get Paper Height- Returns:
- paper height
-
getPaperWidth
public int getPaperWidth(boolean doScale)
-
getDrillDown
public MQuery getDrillDown(Point absolutePoint)
Get Drill Down- Parameters:
absolutePoint
- point- Returns:
- Drill Down
-
-