Class BasicPanel

All Implemented Interfaces:
ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, UserInterface, FormSubmissionListener
Direct Known Subclasses:
XHTMLPanel

public abstract class BasicPanel extends RootPanel implements FormSubmissionListener
A Swing JPanel that encloses the Flying Saucer renderer for easy integration into Swing applications.
Author:
Joshua Marinacci
See Also:
  • Constructor Details

    • BasicPanel

      public BasicPanel()
    • BasicPanel

      public BasicPanel(UserAgentCallback uac)
  • Method Details

    • addDocumentListener

      public void addDocumentListener(DocumentListener listener)
      Adds the specified Document listener to receive Document events from this component. If listener l is null, no exception is thrown and no action is performed.
      Parameters:
      listener - Contains the DocumentListener for DocumentEvent data.
    • removeDocumentListener

      public void removeDocumentListener(DocumentListener listener)
      Removes the specified Document listener from receive Document events from this component. If listener l is null, no exception is thrown and no action is performed.
      Parameters:
      listener - Contains the DocumentListener to remove.
    • paintComponent

      public void paintComponent(Graphics g)
    • paintPage

      public void paintPage(Graphics2D g, int pageNo)
    • assignPagePrintPositions

      public void assignPagePrintPositions(Graphics2D g)
    • printTree

      public void printTree()
    • setLayout

      public 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.
      Overrides:
      setLayout in class Container
      Parameters:
      l - The new layout value
    • setSharedContext

      public void setSharedContext(SharedContext ctx)
    • setSize

      public void setSize(Dimension d)
      Overrides:
      setSize in class Component
    • setDocument

      public void setDocument(InputStream stream, String url, NamespaceHandler nsh)
    • setDocumentFromString

      public void setDocumentFromString(String content, String url, NamespaceHandler nsh)
    • setDocument

      public void setDocument(Document doc, String url)
    • setDocument

      public void setDocument(String url)
    • setDocument

      public void setDocument(String url, NamespaceHandler nsh)
    • reloadDocument

      public void reloadDocument(String URI)
      Reloads the document using the same base URL and namespace handler. Reloading will pick up changes to styles within the document.
      Parameters:
      URI - A URI for the Document to load, for example, file.toURL().toExternalForm().
    • reloadDocument

      public void reloadDocument(Document doc)
      Reloads the document using the same base URL and namespace handler. Reloading will pick up changes to styles within the document.
      Parameters:
      doc - The document to reload.
    • getURL

      public URL getURL()
    • getDocument

      public Document getDocument()
    • getDocumentTitle

      public String getDocumentTitle()
      Returns the title as reported by the NamespaceHandler assigned to the SharedContext in this panel. For an HTML document, this will be the contents of /html/head/title.
      Returns:
      the document title, or "" if the namespace handler cannot find a title, or if there is no current document in the panel.
    • 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
      Overrides:
      isHover in class RootPanel
      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
      Overrides:
      isActive in class RootPanel
      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
      Overrides:
      isFocus in class RootPanel
      Parameters:
      e - PARAM
      Returns:
      The focus value
    • isOpaque

      public boolean isOpaque()
      Returns whether the background of this BasicPanel will be painted when it is rendered.
      Overrides:
      isOpaque in class JComponent
      Returns:
      true if the background of this BasicPanel will be painted, false if it will not.
    • setOpaque

      public void setOpaque(boolean opaque)
      Specifies whether the background of this BasicPanel will be painted when it is rendered.
      Overrides:
      setOpaque in class JComponent
      Parameters:
      opaque - true if the background of this BasicPanel should be painted, false if it should not.
    • getSharedContext

      public SharedContext getSharedContext()
      Overrides:
      getSharedContext in class RootPanel
    • getFixedRectangle

      public Rectangle getFixedRectangle()
      Description copied from class: RootPanel
      Gets the fixedRectangle attribute of the BasicPanel object
      Overrides:
      getFixedRectangle in class RootPanel
      Returns:
      The fixedRectangle value
    • scrollTo

      public void scrollTo(Point pt)
      Scroll the panel to make the specified point be on screen. Typically this will scroll the screen down to the y component of the point.
    • isInteractive

      public boolean isInteractive()
    • setInteractive

      public void setInteractive(boolean interactive)
    • addMouseTrackingListener

      public void addMouseTrackingListener(FSMouseListener l)
    • removeMouseTrackingListener

      public void removeMouseTrackingListener(FSMouseListener l)
    • getMouseTrackingListeners

      public List getMouseTrackingListeners()
    • isCenteredPagedView

      public boolean isCenteredPagedView()
    • setCenteredPagedView

      public void setCenteredPagedView(boolean centeredPagedView)
    • submit

      public void submit(String url)
      Description copied from interface: FormSubmissionListener
      Called by XhtmlForm when a form is submitted.
      Specified by:
      submit in interface FormSubmissionListener
      Parameters:
      url - the entire query string as composed from form elements and the form's action URL
    • setFormSubmissionListener

      public void setFormSubmissionListener(FormSubmissionListener fsl)