public abstract class BasicPanel extends RootPanel implements FormSubmissionListener
JPanel that encloses the Flying Saucer renderer
for easy integration into Swing applications.JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected FormSubmissionListener |
formSubmissionListener |
active_element, doc, documentListeners, enclosingScrollPane, focus_element, hovered_element, sharedContextaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
BasicPanel() |
BasicPanel(UserAgentCallback uac) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
addNotify, componentHidden, componentMoved, componentResized, componentShown, doDocumentLayout, find, find, fireDocumentLoaded, fireDocumentStarted, fireOnLayoutException, fireOnRenderException, getCellRendererPane, getLayoutContext, getLayoutWidth, getRootBox, getRootLayer, getScreenExtents, init, isDefaultFontFromComponent, isExtentsHaveChanged, isNeedRelayout, isPrintView, newLayoutContext, newRenderingContext, relayout, removeNotify, repaintRequested, resetScrollPosition, setDefaultFontFromComponent, setDocument, setEnclosingScrollPane, setNeedRelayout, setRootBox, validategetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validateTreeaction, 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, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected FormSubmissionListener formSubmissionListener
public BasicPanel()
public BasicPanel(UserAgentCallback uac)
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 JComponentprotected 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)
public void setSharedContext(SharedContext ctx)
public void setDocument(InputStream stream, String url, NamespaceHandler nsh)
public void setDocumentFromString(String content, String url, NamespaceHandler nsh)
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()
public boolean isHover(Element e)
UserInterfaceisHover in interface UserInterfaceisHover in class RootPanele - PARAMpublic boolean isActive(Element e)
UserInterfaceisActive in interface UserInterfaceisActive in class RootPanele - PARAMpublic boolean isFocus(Element e)
UserInterfaceisFocus in interface UserInterfaceisFocus in class RootPanele - PARAMpublic 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()
RootPanelgetFixedRectangle 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)
FormSubmissionListenersubmit in interface FormSubmissionListenerurl - the entire query string as composed from form elements and the form's action URLpublic void setFormSubmissionListener(FormSubmissionListener fsl)
Copyright © 2011-2013. All Rights Reserved.