javax.swing.text.html
Class ParagraphView
- SwingConstants, TabExpander
Renders a paragraph in HTML. This is a subclass of
ParagraphView
with some adjustments for
understanding stylesheets.
BOTTOM , CENTER , EAST , HORIZONTAL , LEADING , LEFT , NEXT , NORTH , NORTH_EAST , NORTH_WEST , PREVIOUS , RIGHT , SOUTH , SOUTH_EAST , SOUTH_WEST , TOP , TRAILING , VERTICAL , WEST |
adjustRow , breakView , changedUpdate , createRow , findOffsetToCharactersInString , getAlignment , getBreakWeight , getClosestPositionTo , getLayoutView , getLayoutViewCount , getPartialSize , getTabBase , getTabSet , nextTabStop , setFirstLineIndent , setJustification , setLineSpacing , setPropertiesFromAttributes |
calculateMinorAxisRequirements , changedUpdate , createRow , getFlowAxis , getFlowSpan , getFlowStart , getViewIndexAtPosition , insertUpdate , layout , loadChildren , removeUpdate |
baselineLayout , baselineRequirements , calculateMajorAxisRequirements , calculateMinorAxisRequirements , childAllocation , flipEastAndWestAtEnds , forwardUpdate , getAlignment , getAxis , getChildAllocation , getHeight , getMaximumSpan , getMinimumSpan , getOffset , getPreferredSpan , getResizeWeight , getSpan , getViewAtPoint , getWidth , isAfter , isAllocationValid , isBefore , isLayoutValid , layout , layoutChanged , layoutMajorAxis , layoutMinorAxis , modelToView , paint , paintChild , preferenceChanged , replace , setAxis , setSize , viewToModel |
childAllocation , flipEastAndWestAtEnds , getBottomInset , getChildAllocation , getInsideAllocation , getLeftInset , getNextEastWestVisualPositionFrom , getNextNorthSouthVisualPositionFrom , getNextVisualPositionFrom , getRightInset , getTopInset , getView , getViewAtPoint , getViewAtPosition , getViewCount , getViewIndex , getViewIndexAtPosition , isAfter , isBefore , loadChildren , modelToView , modelToView , replace , setInsets , setParagraphInsets , setParent , 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 |
ParagraphView
public ParagraphView(Element element)
Creates a new ParagraphView for the specified element.
calculateMinorAxisRequirements
protected SizeRequirements calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculates the minor axis requirements of this view. This is implemented
to return the super class'es requirements and modifies the minimumSpan
slightly so that it is not smaller than the length of the longest word.
- calculateMinorAxisRequirements in interface FlowView
axis
- the axisr
- the SizeRequirements object to be used as return parameter;
if null
a new one will be created
- the requirements along the minor layout axis
getAttributes
public AttributeSet getAttributes()
Returns the attributes used by this view. This is implemented to multiplex
the attributes of the model with the attributes of the stylesheet.
- getAttributes in interface View
getMaximumSpan
public float getMaximumSpan(int axis)
Returns the maximum span of this view. If this view is not visible,
we return 0
, otherwise the super class is called.
- getMaximumSpan in interface BoxView
- the maximum span of this view
getMinimumSpan
public float getMinimumSpan(int axis)
Returns the minimum span of this view. If this view is not visible,
we return 0
, otherwise the super class is called.
- getMinimumSpan in interface BoxView
- the minimum span of this view
getPreferredSpan
public float getPreferredSpan(int axis)
Returns the preferred span of this view. If this view is not visible,
we return 0
, otherwise the super class is called.
- getPreferredSpan in interface BoxView
- the preferred span of this view
getStyleSheet
protected StyleSheet getStyleSheet()
Returns the stylesheet used by this view.
- the stylesheet used by this view
isVisible
public boolean isVisible()
Determines if this view is visible or not. If none of the children is
visible and the only visible child is the break that ends the paragraph,
this paragraph is not considered to be visible.
- isVisible in interface View
- the visibility of this paragraph
paint
public void paint(Graphics g,
Shape a)
Paints this view. This paints the box using the stylesheet's
box painter for this view and delegates to the super class paint()
afterwards.
- paint in interface BoxView
g
- the graphics objecta
- the current allocation of this view
ParagraphView.java -- Renders a paragraph in HTML
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.