|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.View javax.swing.text.ComponentView javax.swing.text.html.FrameView
Implements a FrameView, intended to support the HTML <FRAME> tag. Supports the frameborder, scrolling, marginwidth and marginheight attributes.
Nested Class Summary | |
private class |
FrameView.FrameEditorPane
Editor pane rendering frame of HTML document It uses the same editor kits classes as outermost JEditorPane |
Nested classes inherited from class javax.swing.text.ComponentView |
|
Field Summary | |
private boolean |
createdComponent
Set to true when the component has been created. |
(package private) boolean |
editable
|
(package private) float |
height
|
(package private) JEditorPane |
htmlPane
|
(package private) JScrollPane |
scroller
|
(package private) URL |
src
|
(package private) float |
width
|
Fields inherited from class javax.swing.text.ComponentView |
|
Fields inherited from class javax.swing.text.View |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
FrameView(Element elem)
Creates a new Frame. |
Method Summary | |
void |
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. |
protected Component |
createComponent()
Create the component that is associated with this view. |
private void |
createScrollPane()
This method creates the JScrollPane. |
(package private) JEditorPane |
getHostPane()
|
float |
getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. |
float |
getMinimumSpan(int axis)
Determines the minimum span for this view along an axis. |
private JEditorPane |
getOutermostJEditorPane()
Finds the outermost FrameSetView. |
void |
hyperlinkUpdate(HyperlinkEvent evt)
Notification of a change relative to a hyperlink. |
private boolean |
inNestedFrameSet()
Returns true if this frame is contained within a nested frameset. |
void |
paint(Graphics g,
Shape allocation)
Also determines if the FrameView should be editable or not based on whether the JTextComponent that contains it is editable. |
private void |
setBorder()
If the frameborder attribute has been specified, either in the frame, or by the frames enclosing frameset, the JScrollPane's setBorder() method is invoked to achieve the desired look. |
private void |
setMargin()
If the marginwidth or marginheight attributes have been specified, then the JEditorPane's margin's are set to the new values. |
void |
setParent(View parent)
Sets the parent view for the FrameView. |
Methods inherited from class javax.swing.text.ComponentView |
getAlignment, getComponent, getPreferredSpan, modelToView, viewToModel |
Methods inherited from class javax.swing.text.View |
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setSize, updateChildren, updateLayout, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
JEditorPane htmlPane
JScrollPane scroller
boolean editable
float width
float height
URL src
private boolean createdComponent
Constructor Detail |
public FrameView(Element elem)
elem
- the element to represent.Method Detail |
protected Component createComponent()
ComponentView
createComponent
in class ComponentView
JEditorPane getHostPane()
public void setParent(View parent)
setParent
in class ComponentView
parent
- Viewpublic void paint(Graphics g, Shape allocation)
paint
in class ComponentView
g
- the graphics contextallocation
- the shapetext.ComponentView#paint
private void setMargin()
private void setBorder()
private void createScrollPane()
private JEditorPane getOutermostJEditorPane()
private boolean inNestedFrameSet()
public void hyperlinkUpdate(HyperlinkEvent evt)
hyperlinkUpdate
in interface HyperlinkListener
evt
- the event responsible for the updatepublic void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
changedUpdate
in class View
e
- the change information from the associated documenta
- the current allocation of the viewf
- the factory to use to rebuild if the view has childrenView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public float getMinimumSpan(int axis)
getMinimumSpan
in class ComponentView
axis
- may be either View.X_AXIS
or
View.Y_AXIS
public float getMaximumSpan(int axis)
getMaximumSpan
in class ComponentView
axis
- may be either View.X_AXIS
or
View.Y_AXIS
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |