|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Dialog
|
+--ach.image.PrintDialog
PrintDialog.java
Copyright (c) 1997, 2000 Helge Hackbarth, All Rights Reserved.
Print Dialog to specify page size, orientation, borders, image
location and size. The dialog has a preview window to visualize
current settings and is using the Java 1.1 event model.
Default settings can be passed as properties (HashTable) and will
be updated when dialog is closed. For an example how to use this
dialog please refer to ImagePanel.java.
THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR SHALL NOT BE LIABLE FOR ANY
DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
| Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| 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 | |
PrintDialog(java.awt.Frame parent,
java.lang.String title,
int width,
int height,
int imgDpi,
int printDpi,
java.awt.Image img,
java.util.Hashtable props)
Constructor for print dialog. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
event handler for action events |
void |
focusGained(java.awt.event.FocusEvent e)
event handler for focus events |
void |
focusLost(java.awt.event.FocusEvent e)
|
java.lang.String |
getPageRange()
Get page range |
java.awt.Dimension |
getPaperDimension()
Get dimension of selected paper measured in dots related to printers resolution (printDpi; see constructor) |
java.awt.Rectangle |
getPrintArea()
Get print area measured in dots related to printers resolution (printDpi; see constructor) |
int |
getResolution()
Get preferred resolution |
void |
itemStateChanged(java.awt.event.ItemEvent e)
event handler for changes of item states |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
event handler for key events |
void |
setPrintArea(java.awt.Rectangle r)
Set print area measured in dots related to printers resolution (printDpi; see constructor) |
void |
textValueChanged(java.awt.event.TextEvent e)
event handler for changes of text values |
void |
windowActivated(java.awt.event.WindowEvent event)
|
void |
windowClosed(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowClosing(java.awt.event.WindowEvent event)
|
void |
windowDeactivated(java.awt.event.WindowEvent event)
|
void |
windowDeiconified(java.awt.event.WindowEvent event)
|
void |
windowIconified(java.awt.event.WindowEvent event)
|
void |
windowOpened(java.awt.event.WindowEvent event)
|
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, paramString, setModal, setResizable, setTitle, show |
| Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PrintDialog(java.awt.Frame parent,
java.lang.String title,
int width,
int height,
int imgDpi,
int printDpi,
java.awt.Image img,
java.util.Hashtable props)
parent - the parent frametitle - displayed in the titlebar of the windowwidth - horizontal number of pixels of the imageheight - vertical number of pixels of the imageimgDpi - image resolution (to be able to calculate 1:1 view)printDpi - printer resolution (to be able to calculate 1:1 view)img - Image to be shown as previewprops - Hashtable with properties (values for "PAGESIZE", "RESOLUTION",
"ORIENTATION","LEFTMARGIN", "RIGHTMARGIN", "TOPMARGIN", "BOTTOMMARGIN",
"PAGERANGE", "FORCEJDK11PRINTJOB")| Method Detail |
public java.awt.Rectangle getPrintArea()
PrintDialog(java.awt.Frame, java.lang.String, int, int, int, int, java.awt.Image, java.util.Hashtable)public void setPrintArea(java.awt.Rectangle r)
r - image location and size as a rectanglePrintDialog(java.awt.Frame, java.lang.String, int, int, int, int, java.awt.Image, java.util.Hashtable)public java.lang.String getPageRange()
PrintDialog(java.awt.Frame, java.lang.String, int, int, int, int, java.awt.Image, java.util.Hashtable)public int getResolution()
PrintDialog(java.awt.Frame, java.lang.String, int, int, int, int, java.awt.Image, java.util.Hashtable)public java.awt.Dimension getPaperDimension()
PrintDialog(java.awt.Frame, java.lang.String, int, int, int, int, java.awt.Image, java.util.Hashtable)public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void textValueChanged(java.awt.event.TextEvent e)
textValueChanged in interface java.awt.event.TextListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void windowClosed(java.awt.event.WindowEvent event)
windowClosed in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent event)
windowIconified in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent event)
windowActivated in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent event)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent event)
windowClosing in interface java.awt.event.WindowListener
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||