org.xhtmlrenderer.swing
Class RootPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.xhtmlrenderer.swing.RootPanel
- All Implemented Interfaces:
- ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, FSCanvas, UserInterface, RepaintListener
- Direct Known Subclasses:
- BasicPanel
public class RootPanel
- extends JPanel
- implements ComponentListener, UserInterface, FSCanvas, RepaintListener
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
documentListeners
protected Map documentListeners
sharedContext
protected SharedContext sharedContext
enclosingScrollPane
protected JScrollPane enclosingScrollPane
doc
protected Document doc
hovered_element
public Element hovered_element
active_element
public Element active_element
focus_element
public Element focus_element
RootPanel
public RootPanel()
getSharedContext
public SharedContext getSharedContext()
getLayoutContext
public LayoutContext getLayoutContext()
setDocument
public void setDocument(Document doc,
String url,
NamespaceHandler nsh)
resetScrollPosition
public void resetScrollPosition()
setEnclosingScrollPane
protected void setEnclosingScrollPane(JScrollPane scrollPane)
- The method is invoked by
addNotify() and removeNotify() to
ensure that any enclosing JScrollPane works correctly with this
panel. This method can be safely invoked with a null scrollPane.
- Parameters:
scrollPane - the enclosing JScrollPane or null if
the panel is no longer enclosed in a JScrollPane.
getFixedRectangle
public Rectangle getFixedRectangle()
- Gets the fixedRectangle attribute of the BasicPanel object
- Specified by:
getFixedRectangle in interface FSCanvas
- Returns:
- The fixedRectangle value
addNotify
public void addNotify()
- Overrides the default implementation to test for and configure any
JScrollPane parent.
- Overrides:
addNotify in class JComponent
removeNotify
public void removeNotify()
- Overrides the default implementation unconfigure any
JScrollPane
parent.
- Overrides:
removeNotify in class JComponent
init
protected void init()
newRenderingContext
public RenderingContext newRenderingContext(Graphics2D g)
newLayoutContext
protected LayoutContext newLayoutContext(Graphics2D g)
getScreenExtents
public Rectangle getScreenExtents()
doDocumentLayout
public void doDocumentLayout(Graphics g)
fireDocumentStarted
protected void fireDocumentStarted()
fireDocumentLoaded
protected void fireDocumentLoaded()
fireOnLayoutException
protected void fireOnLayoutException(Throwable t)
fireOnRenderException
protected void fireOnRenderException(Throwable t)
getCellRendererPane
public CellRendererPane getCellRendererPane()
- Returns:
- a CellRendererPane suitable for drawing components in (with CellRendererPane.paintComponent)
isHover
public boolean isHover(Element e)
- Description copied from interface:
UserInterface
- Gets the hover attribute of the UserInterface object
- Specified by:
isHover in interface UserInterface
- Parameters:
e - PARAM
- Returns:
- The hover value
isActive
public boolean isActive(Element e)
- Description copied from interface:
UserInterface
- Gets the active attribute of the UserInterface object
- Specified by:
isActive in interface UserInterface
- Parameters:
e - PARAM
- Returns:
- The active value
isFocus
public boolean isFocus(Element e)
- Description copied from interface:
UserInterface
- Gets the focus attribute of the UserInterface object
- Specified by:
isFocus in interface UserInterface
- Parameters:
e - PARAM
- Returns:
- The focus value
componentHidden
public void componentHidden(ComponentEvent e)
- Specified by:
componentHidden in interface ComponentListener
componentMoved
public void componentMoved(ComponentEvent e)
- Specified by:
componentMoved in interface ComponentListener
componentResized
public void componentResized(ComponentEvent e)
- Specified by:
componentResized in interface ComponentListener
relayout
protected void relayout()
componentShown
public void componentShown(ComponentEvent e)
- Specified by:
componentShown in interface ComponentListener
getLayoutWidth
public double getLayoutWidth()
isPrintView
public boolean isPrintView()
getRootBox
public Box getRootBox()
setRootBox
public void setRootBox(Box rootBox)
getRootLayer
public Layer getRootLayer()
find
public Box find(MouseEvent e)
find
public Box find(int x,
int y)
validate
public void validate()
- Overrides:
validate in class Container
isExtentsHaveChanged
protected boolean isExtentsHaveChanged()
isNeedRelayout
protected boolean isNeedRelayout()
setNeedRelayout
protected void setNeedRelayout(boolean needRelayout)
repaintRequested
public void repaintRequested(boolean doLayout)
- Specified by:
repaintRequested in interface RepaintListener
isDefaultFontFromComponent
public boolean isDefaultFontFromComponent()
setDefaultFontFromComponent
public void setDefaultFontFromComponent(boolean defaultFontFromComponent)
Copyright © 2013. All Rights Reserved.