|
Flying Saucer Project Release ${app.version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.xhtmlrenderer.swing.RootPanel
org.xhtmlrenderer.swing.BasicPanel
org.xhtmlrenderer.simple.XHTMLPanel
org.xhtmlrenderer.swing.ScalableXHTMLPanel
public class ScalableXHTMLPanel
ScalableXHTMLPanel extends XHTMLPanel
to allow zoom on output.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static int |
SCALE_POLICY_FIT_HEIGHT
|
static int |
SCALE_POLICY_FIT_WHOLE
|
static int |
SCALE_POLICY_FIT_WIDTH
|
static int |
SCALE_POLICY_NONE
|
Fields inherited from class org.xhtmlrenderer.swing.RootPanel |
---|
active_element, focus_element, hovered_element |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
ScalableXHTMLPanel()
Instantiates an XHTMLPanel with no Document loaded by default. |
|
ScalableXHTMLPanel(UserAgentCallback uac)
Instantiates a panel with a custom UserAgentCallback
implementation. |
Method Summary | |
---|---|
void |
addScaleChangeListener(ScaleChangeListener scl)
|
Box |
find(int x,
int y)
Search Box according to scale factor |
double |
getScale()
|
int |
getScalePolicy()
|
void |
removeScaleChangeListener(ScaleChangeListener scl)
|
void |
setDocument(org.w3c.dom.Document doc,
java.lang.String url)
Renders a Document using a URL as a base URL for relative paths. |
void |
setDocument(java.io.InputStream stream,
java.lang.String url)
Renders a Document read from an InputStream using a URL as a base URL for relative paths. |
void |
setScale(double newScale)
Force scale to use |
void |
setScalePolicy(int scalePolicy)
|
Methods inherited from class org.xhtmlrenderer.simple.XHTMLPanel |
---|
decrementFontSize, getMaxFontScale, getMinFontScale, incrementFontSize, relayout, resetFontSize, setDocument, setDocument, setDocument, setFontScalingFactor, setMaxFontScale, setMinFontScale, setSharedContext |
Methods inherited from class org.xhtmlrenderer.swing.RootPanel |
---|
addNotify, componentHidden, componentMoved, componentResized, componentShown, doDocumentLayout, find, getLayoutContext, getLayoutWidth, getRootBox, getRootLayer, getScreenExtents, isPrintView, newRenderingContext, removeNotify, resetScrollPosition, setDocument, setRootBox |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SCALE_POLICY_NONE
public static final int SCALE_POLICY_FIT_WIDTH
public static final int SCALE_POLICY_FIT_HEIGHT
public static final int SCALE_POLICY_FIT_WHOLE
Constructor Detail |
---|
public ScalableXHTMLPanel()
Document
loaded by default.
public ScalableXHTMLPanel(UserAgentCallback uac)
UserAgentCallback
implementation.
uac
- The custom UserAgentCallback implementation.Method Detail |
---|
public void setDocument(org.w3c.dom.Document doc, java.lang.String url)
setDocument
in class XHTMLPanel
doc
- The new document valueurl
- The new document valuepublic void setDocument(java.io.InputStream stream, java.lang.String url) throws java.lang.Exception
setDocument
in class XHTMLPanel
stream
- The stream to read the Document from.url
- The URL used to resolve relative path references.
java.lang.Exception
public Box find(int x, int y)
find
in class RootPanel
x
- The displayed x positiony
- the displayed y positionpublic void setScale(double newScale) throws java.lang.IllegalArgumentException
newScale
- The scale to use
java.lang.IllegalArgumentException
- If newScale <= 0.0d.public double getScale()
public void addScaleChangeListener(ScaleChangeListener scl)
public void removeScaleChangeListener(ScaleChangeListener scl)
public int getScalePolicy()
public void setScalePolicy(int scalePolicy)
|
Flying Saucer Project Release ${app.version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |