|
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
public abstract class BasicPanel
A Swing JPanel
that encloses the Flying Saucer renderer
for easy integration into Swing applications.
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 |
---|
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 | |
---|---|
BasicPanel()
|
|
BasicPanel(UserAgentCallback uac)
|
Method Summary | |
---|---|
void |
addDocumentListener(DocumentListener listener)
Adds the specified Document listener to receive Document events from this component. |
void |
addMouseTrackingListener(FSMouseListener l)
|
void |
assignPagePrintPositions(java.awt.Graphics2D g)
|
org.w3c.dom.Document |
getDocument()
|
java.lang.String |
getDocumentTitle()
Returns the title as reported by the NamespaceHandler assigned to the SharedContext in this panel. |
java.awt.Rectangle |
getFixedRectangle()
Gets the fixedRectangle attribute of the BasicPanel object |
java.util.List |
getMouseTrackingListeners()
|
SharedContext |
getSharedContext()
|
java.net.URL |
getURL()
|
boolean |
isActive(org.w3c.dom.Element e)
Gets the active attribute of the UserInterface object |
boolean |
isCenteredPagedView()
|
boolean |
isFocus(org.w3c.dom.Element e)
Gets the focus attribute of the UserInterface object |
boolean |
isHover(org.w3c.dom.Element e)
Gets the hover attribute of the UserInterface object |
boolean |
isInteractive()
|
boolean |
isOpaque()
Returns whether the background of this BasicPanel will
be painted when it is rendered. |
void |
paintComponent(java.awt.Graphics g)
|
void |
paintPage(java.awt.Graphics2D g,
int pageNo)
|
void |
printTree()
|
void |
reloadDocument(org.w3c.dom.Document doc)
Reloads the document using the same base URL and namespace handler. |
void |
reloadDocument(java.lang.String URI)
Reloads the document using the same base URL and namespace handler. |
void |
removeDocumentListener(DocumentListener listener)
Removes the specified Document listener from receive Document events from this component. |
void |
removeMouseTrackingListener(FSMouseListener l)
|
void |
scrollTo(java.awt.Point pt)
Scroll the panel to make the specified point be on screen. |
void |
setCenteredPagedView(boolean centeredPagedView)
|
void |
setDocument(org.w3c.dom.Document doc,
java.lang.String url)
|
void |
setDocument(java.io.InputStream stream,
java.lang.String url,
NamespaceHandler nsh)
|
void |
setDocument(java.lang.String url)
|
void |
setDocument(java.lang.String url,
NamespaceHandler nsh)
|
void |
setDocumentFromString(java.lang.String content,
java.lang.String url,
NamespaceHandler nsh)
|
void |
setFormSubmissionListener(FormSubmissionListener fsl)
|
void |
setInteractive(boolean interactive)
|
void |
setLayout(java.awt.LayoutManager l)
Sets the layout attribute of the BasicPanel object Overrides the method to do nothing, since you shouldn't have a LayoutManager on an FS panel. |
void |
setOpaque(boolean opaque)
Specifies whether the background of this BasicPanel will
be painted when it is rendered. |
void |
setSharedContext(SharedContext ctx)
|
void |
setSize(java.awt.Dimension d)
|
void |
submit(java.lang.String url)
Called by XhtmlForm when a form is submitted. |
Methods inherited from class org.xhtmlrenderer.swing.RootPanel |
---|
addNotify, componentHidden, componentMoved, componentResized, componentShown, doDocumentLayout, find, 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 |
Constructor Detail |
---|
public BasicPanel()
public BasicPanel(UserAgentCallback uac)
Method Detail |
---|
public void addDocumentListener(DocumentListener listener)
listener
- Contains the DocumentListener for DocumentEvent data.public void removeDocumentListener(DocumentListener listener)
listener
- Contains the DocumentListener to remove.public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void paintPage(java.awt.Graphics2D g, int pageNo)
public void assignPagePrintPositions(java.awt.Graphics2D g)
public void printTree()
public void setLayout(java.awt.LayoutManager l)
setLayout
in class java.awt.Container
l
- The new layout valuepublic void setSharedContext(SharedContext ctx)
public void setSize(java.awt.Dimension d)
setSize
in class java.awt.Component
public void setDocument(java.io.InputStream stream, java.lang.String url, NamespaceHandler nsh)
public void setDocumentFromString(java.lang.String content, java.lang.String url, NamespaceHandler nsh)
public void setDocument(org.w3c.dom.Document doc, java.lang.String url)
public void setDocument(java.lang.String url)
public void setDocument(java.lang.String url, NamespaceHandler nsh)
public void reloadDocument(java.lang.String URI)
URI
- A URI for the Document to load, for example, file.toURL().toExternalForm().public void reloadDocument(org.w3c.dom.Document doc)
doc
- The document to reload.public java.net.URL getURL()
public org.w3c.dom.Document getDocument()
public java.lang.String getDocumentTitle()
public boolean isHover(org.w3c.dom.Element e)
UserInterface
isHover
in interface UserInterface
isHover
in class RootPanel
e
- PARAM
public boolean isActive(org.w3c.dom.Element e)
UserInterface
isActive
in interface UserInterface
isActive
in class RootPanel
e
- PARAM
public boolean isFocus(org.w3c.dom.Element e)
UserInterface
isFocus
in interface UserInterface
isFocus
in class RootPanel
e
- PARAM
public boolean isOpaque()
BasicPanel
will
be painted when it is rendered.
isOpaque
in class javax.swing.JComponent
true
if the background of this
BasicPanel
will be painted, false
if it
will not.public void setOpaque(boolean opaque)
BasicPanel
will
be painted when it is rendered.
setOpaque
in class javax.swing.JComponent
opaque
- true
if the background of this
BasicPanel
should be painted, false
if it
should not.public SharedContext getSharedContext()
getSharedContext
in class RootPanel
public java.awt.Rectangle getFixedRectangle()
RootPanel
getFixedRectangle
in class RootPanel
public void scrollTo(java.awt.Point pt)
public boolean isInteractive()
public void setInteractive(boolean interactive)
public void addMouseTrackingListener(FSMouseListener l)
public void removeMouseTrackingListener(FSMouseListener l)
public java.util.List getMouseTrackingListeners()
public boolean isCenteredPagedView()
public void setCenteredPagedView(boolean centeredPagedView)
public void submit(java.lang.String url)
FormSubmissionListener
submit
in interface FormSubmissionListener
url
- the entire query string as composed from form elements and the form's action URLpublic void setFormSubmissionListener(FormSubmissionListener fsl)
|
Flying Saucer Project Release ${app.version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |