Copyright 2012-02-25 Werner Randelshofer

ch.randelshofer.pdf
Class ZoomableViewportLayout

java.lang.Object
  extended by javax.swing.ViewportLayout
      extended by ch.randelshofer.pdf.ZoomableViewportLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.io.Serializable

public class ZoomableViewportLayout
extends javax.swing.ViewportLayout

A ViewportLayout which centers the view, if there is more space available than the view needs.

Version:
1.0 2008-09-21 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
static java.lang.String ZOOM_POLICY_PROPERTY
           
 
Constructor Summary
ZoomableViewportLayout()
           
 
Method Summary
 ZoomPolicy getZoomPolicy()
           
 void layoutContainer(java.awt.Container parent)
          Called by the AWT when the specified container needs to be laid out.
 void setZoomPolicy(ZoomPolicy newValue)
           
 
Methods inherited from class javax.swing.ViewportLayout
addLayoutComponent, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZOOM_POLICY_PROPERTY

public static final java.lang.String ZOOM_POLICY_PROPERTY
See Also:
Constant Field Values
Constructor Detail

ZoomableViewportLayout

public ZoomableViewportLayout()
Method Detail

setZoomPolicy

public void setZoomPolicy(ZoomPolicy newValue)

getZoomPolicy

public ZoomPolicy getZoomPolicy()

layoutContainer

public void layoutContainer(java.awt.Container parent)
Called by the AWT when the specified container needs to be laid out.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Overrides:
layoutContainer in class javax.swing.ViewportLayout
Parameters:
parent - the container to lay out
Throws:
java.awt.AWTError - if the target isn't the container specified to the BoxLayout constructor

Copyright 2012-02-25 Werner Randelshofer