|
||||||||||
| 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.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected FormSubmissionListener |
formSubmissionListener
|
| Fields inherited from class org.xhtmlrenderer.swing.RootPanel |
|---|
active_element, doc, documentListeners, enclosingScrollPane, focus_element, hovered_element, sharedContext |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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(Graphics2D g)
|
protected void |
doRender(RenderingContext c,
Layer root)
|
Document |
getDocument()
|
String |
getDocumentTitle()
Returns the title as reported by the NamespaceHandler assigned to the SharedContext in this panel. |
Rectangle |
getFixedRectangle()
Gets the fixedRectangle attribute of the BasicPanel object |
List |
getMouseTrackingListeners()
|
SharedContext |
getSharedContext()
|
URL |
getURL()
|
boolean |
isActive(Element e)
Gets the active attribute of the UserInterface object |
boolean |
isCenteredPagedView()
|
boolean |
isFocus(Element e)
Gets the focus attribute of the UserInterface object |
boolean |
isHover(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. |
protected Document |
loadDocument(String uri)
|
void |
paintComponent(Graphics g)
|
void |
paintPage(Graphics2D g,
int pageNo)
|
void |
printTree()
|
void |
reloadDocument(Document doc)
Reloads the document using the same base URL and namespace handler. |
void |
reloadDocument(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)
|
protected void |
resetMouseTracker()
|
void |
scrollTo(Point pt)
Scroll the panel to make the specified point be on screen. |
void |
setCenteredPagedView(boolean centeredPagedView)
|
void |
setDocument(Document doc,
String url)
|
protected void |
setDocument(InputStream stream,
String url)
|
void |
setDocument(InputStream stream,
String url,
NamespaceHandler nsh)
|
void |
setDocument(String url)
|
void |
setDocument(String url,
NamespaceHandler nsh)
|
void |
setDocumentFromString(String content,
String url,
NamespaceHandler nsh)
|
protected void |
setDocumentRelative(String filename)
Sets the new current document, where the new document is located relative, e.g using a relative URL. |
void |
setFormSubmissionListener(FormSubmissionListener fsl)
|
void |
setInteractive(boolean interactive)
|
void |
setLayout(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(Dimension d)
|
void |
submit(String url)
Called by XhtmlForm when a form is submitted. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xhtmlrenderer.extend.FSCanvas |
|---|
getX, getY |
| Field Detail |
|---|
protected FormSubmissionListener formSubmissionListener
| 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(Graphics g)
paintComponent in class JComponent
protected void doRender(RenderingContext c,
Layer root)
public void paintPage(Graphics2D g,
int pageNo)
public void assignPagePrintPositions(Graphics2D g)
public void printTree()
public void setLayout(LayoutManager l)
setLayout in class Containerl - The new layout valuepublic void setSharedContext(SharedContext ctx)
public void setSize(Dimension d)
setSize in class Component
public void setDocument(InputStream stream,
String url,
NamespaceHandler nsh)
public void setDocumentFromString(String content,
String url,
NamespaceHandler nsh)
public void setDocument(Document doc,
String url)
public void setDocument(String url)
public void setDocument(String url,
NamespaceHandler nsh)
protected void setDocument(InputStream stream,
String url)
throws Exception
Exceptionprotected void setDocumentRelative(String filename)
filename - The new document to loadpublic void reloadDocument(String URI)
URI - A URI for the Document to load, for example, file.toURL().toExternalForm().public void reloadDocument(Document doc)
doc - The document to reload.public URL getURL()
public Document getDocument()
public String getDocumentTitle()
protected Document loadDocument(String uri)
public boolean isHover(Element e)
UserInterface
isHover in interface UserInterfaceisHover in class RootPanele - PARAM
public boolean isActive(Element e)
UserInterface
isActive in interface UserInterfaceisActive in class RootPanele - PARAM
public boolean isFocus(Element e)
UserInterface
isFocus in interface UserInterfaceisFocus in class RootPanele - PARAM
public boolean isOpaque()
BasicPanel will
be painted when it is rendered.
isOpaque in class JComponenttrue 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 JComponentopaque - true if the background of this
BasicPanel should be painted, false if it
should not.public SharedContext getSharedContext()
getSharedContext in class RootPanelpublic Rectangle getFixedRectangle()
RootPanel
getFixedRectangle in interface FSCanvasgetFixedRectangle in class RootPanelpublic void scrollTo(Point pt)
public boolean isInteractive()
public void setInteractive(boolean interactive)
public void addMouseTrackingListener(FSMouseListener l)
public void removeMouseTrackingListener(FSMouseListener l)
public List getMouseTrackingListeners()
protected void resetMouseTracker()
public boolean isCenteredPagedView()
public void setCenteredPagedView(boolean centeredPagedView)
public void submit(String url)
FormSubmissionListener
submit in interface FormSubmissionListenerurl - the entire query string as composed from form elements and the form's action URLpublic void setFormSubmissionListener(FormSubmissionListener fsl)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||