DocumentPanel Class Reference

List of all members.

Public Member Functions

 DocumentPanel ()
int getDefaultHorizontalScreenPadding ()
int getDefaultVerticalScreenPadding ()
Dimension getPreferredSize ()
void setParentFrame (JFrame mainFrame)
void setParentScrollPane (JScrollPane scrollPane)

Static Public Attributes

static final int DROP_SHADOW_DISTANCE = 4
 Drop shadow for the (on screen) rendered paper.
static final Color SHADOW_COLOR = new Color(0, 0, 0, 99)
 Color of the paper's drop shadow.

Protected Member Functions

void paintComponent (Graphics g)

Package Attributes

final Pixels pixelsReferenceUnit = new Pixels()

Detailed Description

Renders the document in our interactive designer. It actually renders the Sheet to a JPEG, so we don't have to do interactive rendering (which sucks for complicated sheets).

This software is distributed under the BSD License.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 32 of file DocumentPanel.java.


Constructor & Destructor Documentation

DocumentPanel (  ) 

Parameters:
s 

Definition at line 82 of file DocumentPanel.java.


Member Function Documentation

int getDefaultHorizontalScreenPadding (  ) 

Returns:
Feb 26, 2006
Author:
Ron Yeh

Definition at line 105 of file DocumentPanel.java.

Referenced by DocumentPanel.getPreferredSize().

int getDefaultVerticalScreenPadding (  ) 

Returns:
number of pixels to pad the document vertically. Feb 26, 2006
Author:
Ron Yeh

Definition at line 114 of file DocumentPanel.java.

Referenced by DocumentPanel.getPreferredSize().

Dimension getPreferredSize (  ) 

See also:
javax.swing.JComponent.getPreferredSize()

Definition at line 129 of file DocumentPanel.java.

References DocumentPanel.getDefaultHorizontalScreenPadding(), and DocumentPanel.getDefaultVerticalScreenPadding().

void paintComponent ( Graphics  g  )  [protected]

See also:
javax.swing.JComponent.paintComponent(java.awt.Graphics)
The approach we take is to draw all the background materials, and then let the Document paint itself. This enables the Document to be placed in a full screen window, or some other cool layout.

Definition at line 143 of file DocumentPanel.java.

References DocumentPanel.DROP_SHADOW_DISTANCE, and DocumentPanel.SHADOW_COLOR.


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:44 2007 for R3 Paper Toolkit by  doxygen 1.4.7