javax.swing.text.html
Class InlineView
- Cloneable, SwingConstants, TabableView
Renders HTML content (identified by
HTML.Tag.CONTENT
). This is
basically a
LabelView
that is adjusted to understand styles defined
by stylesheets.
BOTTOM , CENTER , EAST , HORIZONTAL , LEADING , LEFT , NEXT , NORTH , NORTH_EAST , NORTH_WEST , PREVIOUS , RIGHT , SOUTH , SOUTH_EAST , SOUTH_WEST , TOP , TRAILING , VERTICAL , WEST |
InlineView(Element element) - Creates a new
InlineView that renders the specified element.
|
View | breakView(int axis, int offset, float pos, float len)
|
void | changedUpdate(DocumentEvent e, Shape a, ViewFactory f) - Receives notification that attributes have changed in the document in
a location that this view is responsible for.
|
AttributeSet | getAttributes() - Returns the attributes that are used for rendering.
|
int | getBreakWeight(int axis, float pos, float len)
|
float | getMinimumSpan(int axis) - Returns the minimum span for the specified axis.
|
protected StyleSheet | getStyleSheet() - Returns the stylesheet used by this view.
|
void | insertUpdate(DocumentEvent e, Shape a, ViewFactory f) - Receives notification that something was inserted into the document in
a location that this view is responsible for.
|
void | removeUpdate(DocumentEvent e, Shape a, ViewFactory f) - Receives notification that something was removed from the document in
a location that this view is responsible for.
|
protected void | setPropertiesFromAttributes() - Loads the character style properties from the stylesheet.
|
changedUpdate , getBackground , getFont , getFontMetrics , getForeground , isStrikeThrough , isSubscript , isSuperscript , isUnderline , setBackground , setPropertiesFromAttributes , setStrikeThrough , setSubscript , setSuperscript , setUnderline |
breakView , changedUpdate , checkPainter , clone , createFragment , getAlignment , getBackground , getBreakWeight , getEndOffset , getFont , getForeground , getGlyphPainter , getNextVisualPositionFrom , getPartialSpan , getPreferredSpan , getStartOffset , getTabExpander , getTabbedSpan , getText , insertUpdate , isStrikeThrough , isSubscript , isSuperscript , isUnderline , modelToView , paint , removeUpdate , setGlyphPainter , viewToModel |
append , breakView , changedUpdate , createFragment , dump , forwardUpdate , forwardUpdateToView , getAlignment , getAttributes , getBreakWeight , getChildAllocation , getContainer , getDocument , getElement , getEndOffset , getGraphics , getMaximumSpan , getMinimumSpan , getNextVisualPositionFrom , getParent , getPreferredSpan , getResizeWeight , getStartOffset , getToolTipText , getView , getViewCount , getViewFactory , getViewIndex , getViewIndex , insert , insertUpdate , isVisible , modelToView , modelToView , modelToView , paint , preferenceChanged , remove , removeAll , removeUpdate , replace , setParent , setSize , updateChildren , updateLayout , viewToModel , viewToModel |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
InlineView
public InlineView(Element element)
Creates a new InlineView
that renders the specified element.
element
- the element for this view
getAttributes
public AttributeSet getAttributes()
Returns the attributes that are used for rendering. This is implemented
to multiplex the attributes specified in the model with a stylesheet.
- getAttributes in interface View
- the attributes that are used for rendering
getMinimumSpan
public float getMinimumSpan(int axis)
Returns the minimum span for the specified axis. This returns the
width of the longest word for the X axis and the super behaviour for
the Y axis. This is a slight deviation from the reference implementation.
IMO this should improve rendering behaviour so that an InlineView never
gets smaller than the longest word in it.
- getMinimumSpan in interface View
getStyleSheet
protected StyleSheet getStyleSheet()
Returns the stylesheet used by this view. This returns the stylesheet
of the HTMLDocument
that is rendered by this view.
- the stylesheet used by this view
insertUpdate
public void insertUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Receives notification that something was inserted into the document in
a location that this view is responsible for.
- insertUpdate in interface GlyphView
e
- the document eventa
- the current allocation of this viewf
- the view factory for creating new views
removeUpdate
public void removeUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Receives notification that something was removed from the document in
a location that this view is responsible for.
- removeUpdate in interface GlyphView
e
- the document eventa
- the current allocation of this viewf
- the view factory for creating new views
InlineView.java -- Renders HTML content
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.