org.allcolor.yahp.cl.converter.swing
Class CSwingHtmlRenderer.CImageView

java.lang.Object
  extended by javax.swing.text.View
      extended by javax.swing.text.html.ImageView
          extended by org.allcolor.yahp.cl.converter.swing.CSwingHtmlRenderer.CImageView
All Implemented Interfaces:
javax.swing.SwingConstants
Enclosing class:
CSwingHtmlRenderer

public static class CSwingHtmlRenderer.CImageView
extends javax.swing.text.html.ImageView

This class extends ImageView and prevent images to be painted while painting root container, thus letting YaHP calculates correct page cutting.

Version:
v0.98
Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
CSwingHtmlRenderer.CImageView(javax.swing.text.Element elem)
          Creates a new CImageView object.
 
Method Summary
 javax.swing.Icon getNoImageIcon()
          If error while loading, do not display anything.
 void paint(java.awt.Graphics g, java.awt.Shape a)
          do not paint
 void realPaint(java.awt.Graphics g, java.awt.Shape a)
          Real painting method
 
Methods inherited from class javax.swing.text.html.ImageView
changedUpdate, getAlignment, getAltText, getAttributes, getImage, getImageURL, getLoadingImageIcon, getLoadsSynchronously, getPreferredSpan, getStyleSheet, getToolTipText, modelToView, setLoadsSynchronously, setParent, setPropertiesFromAttributes, setSize, viewToModel
 
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSwingHtmlRenderer.CImageView

public CSwingHtmlRenderer.CImageView(javax.swing.text.Element elem)
Creates a new CImageView object.

Parameters:
elem - The html swing element representing the image
Method Detail

getNoImageIcon

public javax.swing.Icon getNoImageIcon()
If error while loading, do not display anything.

Overrides:
getNoImageIcon in class javax.swing.text.html.ImageView
Returns:
No default icon, return null

paint

public void paint(java.awt.Graphics g,
                  java.awt.Shape a)
do not paint

Overrides:
paint in class javax.swing.text.html.ImageView
Parameters:
g - Graphics object
a - allocation

realPaint

public void realPaint(java.awt.Graphics g,
                      java.awt.Shape a)
Real painting method

Parameters:
g - Graphics object
a - allocation