com.inet.html.views
Class BoxView

java.lang.Object
  extended by javax.swing.text.View
      extended by com.inet.html.views.BoxView
All Implemented Interfaces:
javax.swing.SwingConstants
Direct Known Subclasses:
BlockView, ContentView, ControlView, HRuleView, ImageView, InlineView, TableView

public abstract class BoxView
extends javax.swing.text.View

This class is the basic box used to represent and render all html elements. Any other type within the JWebEngine renderer have to extend this class. What this class does: - cache all relevant attributes for the underlying element - store the size and appearance of this box(borders, padding, font size, text align) by using BoxPainters - paint the box itself What this class does NOT: - have a layout(because not any box implementation requires a layout) - display content, this has to be done by the extensions


Field Summary
static int BASELINE
          const for getPreferredSize()
static int STATUS_REQ_LAYOUT
          View needs a relayout
static int STATUS_REQ_PRELAYOUT
          View needs a complete relayout including calculation of all fixed values
static int STATUS_UPTODATE
          View is up to date and will not pass down any layout requests
 
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
BoxView(javax.swing.text.Element elem)
          Create a new View object
BoxView(javax.swing.text.Element elem, ViewPainter painter)
          create a new View object with the given Painter
 
Method Summary
 void addBoxPainter(javax.swing.text.Element elem, IBoxPainter painter)
          Registers a BoxPainter for one of the descendants of this view's element.
 void factoryPreset(byte floatValue, byte display, byte position)
          Presets certain CSS values which have already been determined by the factory
 void forceLayout()
          Forces a COMPLETE re-layout of the whole document!
 void forceLayout(long timeout)
          Forces a COMPLETE re-layout of the whole document!
 float getAlignment(int axis)
          
 int getAutoMarginJustify()
          Gets the justification of this view according to the margins setting StyleConstants.ALIGN_LEFT StyleConstants.ALIGN_CENTER StyleConstants.ALIGN_RIGHT -1 if not margins is set to auto
 com.inet.html.parser.converter.ColorValue getBackgroundValue()
          Returns the background color value if any
 com.inet.html.parser.converter.ColorValue getBorderBottomColor()
          Returns the color of the bottom border, if any
 com.inet.html.parser.converter.ColorValue getBorderLeftColor()
          Returns the color of the left border, if any
 com.inet.html.parser.converter.ColorValue getBorderRightColor()
          Returns the color of the right border, if any
 com.inet.html.parser.converter.ColorValue getBorderTopColor()
          Returns the color of the top border, if any
 int getBottomInset()
          Gets the bottom inset.
 IBoxPainter getBox()
          Returns the box painter.
 IBoxPainter getBoxPainter(javax.swing.text.Element descendant)
          Returns the BoxPainter which has to be used to paint a descendants background and borders
 int getClear()
          Returns the CSS "clear" attributes value
 int getCompleteHight()
          This represents the real maximum-hight of all inner components including floats.
 int getContentHeight()
          This is the layouted height in pixel.
 int getContentVerticalOffset()
          Gets the content vertical offset.
 int getContentWidth()
          This is the layouted width in pixel.
 int getDirection()
          Returns the Base-Direction-value of this element
 int getDisplay()
          Returns the DisplayValue constant for this view
 int getEndOffset()
          
 int getFirstLineBaseLine()
          Returns the baseline of the first content descendand of this view relative to the upper bound of this view
 int getFloat()
          Returns the FloatValue constant of the floating setting of this view
 float getFontSize()
          Returns the recently calculated font size
 com.inet.html.parser.converter.LengthUnit getHeightUnit()
          This returns the length unit defined by CSS or a HTML tag
 HtmlRootView getHTMLRoot()
          Returns the HTML root view or null, if this view was disposed
 int getJustification()
          Get the value of the CSS attribute text-align.
 int getLeftInset()
          Gets the left inset.
 com.inet.html.parser.converter.LengthUnit getLineHeight()
          Returns the line height for this box.
 java.awt.Insets getMargins()
          Get the CSS margins
 int getOuterHeight()
          Returns the outer height of this box which is content+padding+border.
 int getOuterWidth()
          Returns the outer width of this box which is content+padding+border.
 int getOverflow()
          Returns the Overflow constant, which defines how to clip the content of this view
 ViewPainter getPainter()
          returns the set view painter, can be null if no custom painter has been set
 int getPosition()
          Returns the calculated Position constant for this view
 RenderContext getRenderContext()
          Returns the render context used by this view
 int getResizeWeight(int axis)
          
 int getRightInset()
          Gets the right inset.
 java.awt.Rectangle getSpan()
          Returns the span of this view.
 int getStartOffset()
          
 int getStatus()
          Returns the layout status of the current view
 int getSwingAlign(int axis)
          Returns the SwingConstant for the requested axis
 int getTopInset()
          Gets the top inset.
 int getUnicodeBidi()
          Returns the unicode bidi algorithm mode flag
 ViewPositionInfo getViewForPosition(java.awt.Point position, java.awt.Rectangle bounds)
          Tries to find the view for the specified location
 int getViewIndex(int pos)
          Returns the child view index representing the given position in the model.
 int getViewIndex(int pos, javax.swing.text.Position.Bias b)
          
 int getVisibility()
          Returns the CSS vsibility attribute of the element of this view
 int getWhiteSpace()
          Returns the CSS WhiteSpace Attribute for this View
 com.inet.html.parser.converter.LengthUnit getWidthUnit()
          This returns the length unit defined by CSS or a HTML tag
 boolean isAbsolutePositioned()
          Returns true, if this block has an absolute position
 boolean isBlock()
          Returns true if this is a block by CSS display attribute
 boolean isBreak()
          Returns true if this View refers to a BR element
 boolean isBreakable()
          Returns true, if this view may be used to break an inline layout
 boolean isFloating()
          Returns true, if this view is really a float
 boolean isInFlow()
          If this returns false this view may be a normal block view or a positioned block view.
 boolean isListItemWithMarker()
          Decides, whether this box requires a list marker.
 boolean isLTR()
          This method combines all informations available on LTR-behavior for this block.
 boolean isMarker()
          Returns true if this is a generated marker box
 boolean isNativeLTR()
          Returns true, if this view is in a LTR content by the unicode bidi level, false otherwise
 boolean isTableCell()
          Returns true, if this view represents a table cell.
 boolean isWidthSet()
          If the width was explicit set with CSS or HTML attribute.
 void paint(java.awt.Graphics g, java.awt.Shape allocation)
          
abstract  java.awt.Rectangle performLayout(boolean hard)
          This is the final layout method.
abstract  void performLayoutVAlign(int baseline)
          If this box has a overall vertical align, like in table cells for instance, this method calculates teh offset to align the content.
abstract  void performLayoutWidth()
          Layout what is required to determin the width of this view.
 void performPreLayout()
          Causes this view to layout all fixed values and to calculate it's minimum and preferred width.
 void setBackgroundValue(com.inet.html.parser.converter.ColorValue backgroundValue)
          Overwrites the CSS Background color value of this view.
 void setBorderBottomColor(com.inet.html.parser.converter.ColorValue borderBottomColor)
          Sets the color of the bottom border.
 void setBorderLeftColor(com.inet.html.parser.converter.ColorValue borderLeftColor)
          Sets the color of the left border.
 void setBorderRightColor(com.inet.html.parser.converter.ColorValue borderRightColor)
          Sets the color of the right border.
 void setBorderTopColor(com.inet.html.parser.converter.ColorValue borderTopColor)
          Sets the color of the top border.
 void setContentVerticalOffset(int contentVerticalOffset)
          Set the content vertical offset.
 void setContentWidth(float newWidth)
          Sets the width of the content area.
 void setFirstLineBaseLine(short firstLineBaseLine)
          Sets the Y-offset of the baseline of the inner content of this view
 void setIsNativeLTR(boolean isLTR)
          Sets the native LTR flag of this view.
 void setJustification(byte justification)
          Set the value of the CSS attribute text-align.
 void setMarker(boolean isMarker)
          Set to true if this is a generated marker box
 void setPainter(ViewPainter viewPainter)
          sets the custom view painter, can be null if no custom painter is to be set
 void setParent(javax.swing.text.View parent)
          
 void setRoot(HtmlRootView root)
          Sets the view tree root of this view.
 void setSize(float newWidth, float newHeight)
          This method changes the OUTER box size, which is the box around the border of this box.
 void setSizeContent(float newWidth, float newHeight)
          This method changes the CONTENT size, which is the inner box of the box model.
 void setStartAndEndOffset(int start, int end)
          Set a new start and end position
 void setStatus(int status)
          Set the layout status of this view and propagates it to any ancestor, which has a higher status.
 void setStatusLocal(int status)
          Sets the layout status of only the current view
 
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getPreferredSpan, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, viewToModel, viewToModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASELINE

public static final int BASELINE
const for getPreferredSize()

See Also:
Constant Field Values

STATUS_UPTODATE

public static final int STATUS_UPTODATE
View is up to date and will not pass down any layout requests

See Also:
Constant Field Values

STATUS_REQ_LAYOUT

public static final int STATUS_REQ_LAYOUT
View needs a relayout

See Also:
Constant Field Values

STATUS_REQ_PRELAYOUT

public static final int STATUS_REQ_PRELAYOUT
View needs a complete relayout including calculation of all fixed values

See Also:
Constant Field Values
Constructor Detail

BoxView

public BoxView(javax.swing.text.Element elem)
Create a new View object

Parameters:
elem - Element to present

BoxView

public BoxView(javax.swing.text.Element elem,
               ViewPainter painter)
create a new View object with the given Painter

Parameters:
elem - element
painter - painter implementation
Method Detail

getBox

public IBoxPainter getBox()
Returns the box painter. The box painter has all margin, border and padding values

Returns:
The box painter.

setParent

public void setParent(javax.swing.text.View parent)

Overrides:
setParent in class javax.swing.text.View

factoryPreset

public void factoryPreset(byte floatValue,
                          byte display,
                          byte position)
Presets certain CSS values which have already been determined by the factory

Parameters:
floatValue - the FloatValue constant
display - the DisplayValue constant
position - the Position constant

setJustification

public void setJustification(byte justification)
Set the value of the CSS attribute text-align. Required by the table layouter to set the columns or rows text-align

Parameters:
justification - one of the const

isWidthSet

public boolean isWidthSet()
If the width was explicit set with CSS or HTML attribute.

Returns:
true if set

setSize

public void setSize(float newWidth,
                    float newHeight)
This method changes the OUTER box size, which is the box around the border of this box. The content size will be set to a size which fits into this box.

Overrides:
setSize in class javax.swing.text.View
Parameters:
newWidth - the new width in px
newHeight - the new height in px

setSizeContent

public void setSizeContent(float newWidth,
                           float newHeight)
This method changes the CONTENT size, which is the inner box of the box model. The outer size will be set to a size which fits around this box.

Parameters:
newWidth - the new width in px
newHeight - the new height in px

setContentWidth

public void setContentWidth(float newWidth)
Sets the width of the content area. This method is able to overwrite the layout's value!

Parameters:
newWidth - new width in pixel

getWidthUnit

public com.inet.html.parser.converter.LengthUnit getWidthUnit()
This returns the length unit defined by CSS or a HTML tag

Returns:
the width length unit

getHeightUnit

public com.inet.html.parser.converter.LengthUnit getHeightUnit()
This returns the length unit defined by CSS or a HTML tag

Returns:
the height length unit

getJustification

public int getJustification()
Get the value of the CSS attribute text-align. Aligns all children which does not margins: auto set

Returns:
one of the constants

getAutoMarginJustify

public int getAutoMarginJustify()
Gets the justification of this view according to the margins setting

Returns:
one of the constants

getAlignment

public float getAlignment(int axis)

Overrides:
getAlignment in class javax.swing.text.View

getSwingAlign

public int getSwingAlign(int axis)
Returns the SwingConstant for the requested axis

Parameters:
axis - the axis to get the align of
Returns:
the align in form of a swing constant

getResizeWeight

public int getResizeWeight(int axis)

Overrides:
getResizeWeight in class javax.swing.text.View

getContentWidth

public int getContentWidth()
This is the layouted width in pixel. This value is without margin, border and insets.

Returns:
the current width

getContentHeight

public int getContentHeight()
This is the layouted height in pixel. This value is without margin, border and insets.

Returns:
the current height

getOuterHeight

public int getOuterHeight()
Returns the outer height of this box which is content+padding+border.
NOTE: This does not include the margin since the margin is outside the box and has to be evaluated by the layout!

Returns:
outer height in pixel

getOuterWidth

public int getOuterWidth()
Returns the outer width of this box which is content+padding+border.
NOTE: This does not include the margin since the margin is outside the box and has to be evaluated by the layout!

Returns:
outer width in pixel

getCompleteHight

public int getCompleteHight()
This represents the real maximum-hight of all inner components including floats. Has to be used the calculate table cells or hight:100%. ATTENTION: This is the content height, not the outer bounds

Returns:
maximum of ALL inner components

getLeftInset

public int getLeftInset()
Gets the left inset.

Returns:
the inset >= 0

getRightInset

public int getRightInset()
Gets the right inset.

Returns:
the inset >= 0

getTopInset

public int getTopInset()
Gets the top inset.

Returns:
the inset >= 0

getBottomInset

public int getBottomInset()
Gets the bottom inset.

Returns:
the inset >= 0

getMargins

public java.awt.Insets getMargins()
Get the CSS margins

Returns:
never null

getViewIndex

public int getViewIndex(int pos,
                        javax.swing.text.Position.Bias b)

Overrides:
getViewIndex in class javax.swing.text.View

getViewIndex

public int getViewIndex(int pos)
Returns the child view index representing the given position in the model.

Parameters:
pos - the position >= 0
Returns:
index of the view representing the given position, or -1 if no view represents that position

getStartOffset

public int getStartOffset()

Overrides:
getStartOffset in class javax.swing.text.View

getEndOffset

public int getEndOffset()

Overrides:
getEndOffset in class javax.swing.text.View

setStartAndEndOffset

public void setStartAndEndOffset(int start,
                                 int end)
Set a new start and end position

Parameters:
start - the new start position
end - must be larger as start

paint

public void paint(java.awt.Graphics g,
                  java.awt.Shape allocation)

Specified by:
paint in class javax.swing.text.View

isInFlow

public boolean isInFlow()
If this returns false this view may be a normal block view or a positioned block view. A positioned block view can be the child of a flowing content view because it is taken out of the flow at runtime.

Returns:
false if this is a block but not inline, true otherwise

getFontSize

public float getFontSize()
Returns the recently calculated font size

Returns:
font size in pixels

getLineHeight

public com.inet.html.parser.converter.LengthUnit getLineHeight()
Returns the line height for this box. May return null, in that case a factor of 1.1 has to be used.

Returns:
The line height defined by CSS

isBlock

public boolean isBlock()
Returns true if this is a block by CSS display attribute

Returns:
Returns true if this is a block by CSS display attribute

getClear

public int getClear()
Returns the CSS "clear" attributes value

Returns:
Clear constant
See Also:
StackManager.CLEAR_NONE, StackManager.CLEAR_LEFT, StackManager.CLEAR_RIGHT, StackManager.CLEAR_BOTH, http://www.w3.org/TR/CSS21/visuren.html#propdef-clear

getVisibility

public int getVisibility()
Returns the CSS vsibility attribute of the element of this view

Returns:
Returns the CSS vsibility attribute of the element of this view
See Also:
VisibilityValue.VISIBLE, VisibilityValue.HIDDEN, VisibilityValue.COLLAPSE, http://www.w3.org/TR/CSS21/visufx.html#propdef-visibility

performPreLayout

public void performPreLayout()
Causes this view to layout all fixed values and to calculate it's minimum and preferred width. Uses the CSS-Values set by setPropertiesFromAttributes.


performLayoutWidth

public abstract void performLayoutWidth()
Layout what is required to determin the width of this view. In most cases this method only requires the CSS width setting, the parent's width and the minumum and preferred span. ATTENTION: This method mus be called before layouting the children of a view. Otherwise the children don't get a corrent parent's size.


performLayout

public abstract java.awt.Rectangle performLayout(boolean hard)
This is the final layout method. It has to perform a layout of this view and call the layout of all children. Every change to the size of any view in the document will at least call the performLayout method!

Parameters:
hard - If set to true, the status of the children will be ignored and all views will be layouted. This should be done on view-size changes. If set to false the status of the children will be respected and up-to-date views will not be layouted again.
Returns:
the bottom-right point of the layout span, required for overflow calculations

performLayoutVAlign

public abstract void performLayoutVAlign(int baseline)
If this box has a overall vertical align, like in table cells for instance, this method calculates teh offset to align the content. It has to be called after the box has it's final size an was layouted. NOTE: If the content is larger than the box or valign is top this method will have no visible effect!

Parameters:
baseline - external prediction of the first baseline for BASELINE alignment

forceLayout

public void forceLayout()
Forces a COMPLETE re-layout of the whole document!


forceLayout

public void forceLayout(long timeout)
Forces a COMPLETE re-layout of the whole document!
NOTE: If timeout is 0, the layout is performed serial in this thread an no repaint is scheduled!

Parameters:
timeout - the timeout until the layout is performed(may be interesting to set it to 0 or for large images)

setContentVerticalOffset

public void setContentVerticalOffset(int contentVerticalOffset)
Set the content vertical offset. To be done by the layout

Parameters:
contentVerticalOffset - Difference between upper edge and content in px

getContentVerticalOffset

public int getContentVerticalOffset()
Gets the content vertical offset.

Returns:
contentVerticalOffset Difference between upper edge and content in px

isMarker

public boolean isMarker()
Returns true if this is a generated marker box

Returns:
Returns true if this is a generated marker box

setMarker

public void setMarker(boolean isMarker)
Set to true if this is a generated marker box

Parameters:
isMarker - Set to true if this is a generated marker box

getBackgroundValue

public com.inet.html.parser.converter.ColorValue getBackgroundValue()
Returns the background color value if any

Returns:
the background color value if any

getBorderTopColor

public com.inet.html.parser.converter.ColorValue getBorderTopColor()
Returns the color of the top border, if any

Returns:
the color of the top border, if any

getBorderLeftColor

public com.inet.html.parser.converter.ColorValue getBorderLeftColor()
Returns the color of the left border, if any

Returns:
the color of the left border, if any

getBorderRightColor

public com.inet.html.parser.converter.ColorValue getBorderRightColor()
Returns the color of the right border, if any

Returns:
the color of the right border, if any

getBorderBottomColor

public com.inet.html.parser.converter.ColorValue getBorderBottomColor()
Returns the color of the bottom border, if any

Returns:
the color of the bottom border, if any

setBorderBottomColor

public void setBorderBottomColor(com.inet.html.parser.converter.ColorValue borderBottomColor)
Sets the color of the bottom border. Will have no visible effect if there is no border.

Parameters:
borderBottomColor - the color to set.

setBorderLeftColor

public void setBorderLeftColor(com.inet.html.parser.converter.ColorValue borderLeftColor)
Sets the color of the left border. Will have no visible effect if there is no border.

Parameters:
borderLeftColor - the color to set.

setBorderRightColor

public void setBorderRightColor(com.inet.html.parser.converter.ColorValue borderRightColor)
Sets the color of the right border. Will have no visible effect if there is no border.

Parameters:
borderRightColor - the color to set.

setBorderTopColor

public void setBorderTopColor(com.inet.html.parser.converter.ColorValue borderTopColor)
Sets the color of the top border. Will have no visible effect if there is no border.

Parameters:
borderTopColor - the color to set.

setBackgroundValue

public void setBackgroundValue(com.inet.html.parser.converter.ColorValue backgroundValue)
Overwrites the CSS Background color value of this view.

Parameters:
backgroundValue - New background color or null

getFirstLineBaseLine

public int getFirstLineBaseLine()
Returns the baseline of the first content descendand of this view relative to the upper bound of this view

Returns:
the baseline in px

setFirstLineBaseLine

public void setFirstLineBaseLine(short firstLineBaseLine)
Sets the Y-offset of the baseline of the inner content of this view

Parameters:
firstLineBaseLine - hte offset in PX

isBreak

public boolean isBreak()
Returns true if this View refers to a BR element

Returns:
Returns true if this View refers to a BR element

isListItemWithMarker

public boolean isListItemWithMarker()
Decides, whether this box requires a list marker.

Returns:
true, if a marker is required

addBoxPainter

public void addBoxPainter(javax.swing.text.Element elem,
                          IBoxPainter painter)
Registers a BoxPainter for one of the descendants of this view's element.

Parameters:
elem - The element to paint
painter - The painter to use

getBoxPainter

public IBoxPainter getBoxPainter(javax.swing.text.Element descendant)
Returns the BoxPainter which has to be used to paint a descendants background and borders

Parameters:
descendant - the descendant to paint
Returns:
the painter to use of null, if none is registered for the descendant

getWhiteSpace

public int getWhiteSpace()
Returns the CSS WhiteSpace Attribute for this View

Returns:
a WhiteSpace Constant
See Also:
WhiteSpace.NORMAL, WhiteSpace.PRE, WhiteSpace.NOWRAP, WhiteSpace.AUTOWRAP, http://www.w3.org/TR/CSS21/text.html#propdef-word-spacing

getStatus

public int getStatus()
Returns the layout status of the current view

Returns:
STATUS_UPTODATE, STATUS_REQ_LAYOUT, STATUS_REQ_PRELAYOUT

setStatus

public void setStatus(int status)
Set the layout status of this view and propagates it to any ancestor, which has a higher status. This is similar to an invalidate, which causes the root-layouter to relayout the path to this view.
NOTE: This method can block up to 10 seconds if the layouter is currently running!

Parameters:
status - the status constant to set

setStatusLocal

public void setStatusLocal(int status)
Sets the layout status of only the current view

Parameters:
status - The status constant

getViewForPosition

public ViewPositionInfo getViewForPosition(java.awt.Point position,
                                           java.awt.Rectangle bounds)
Tries to find the view for the specified location

Parameters:
position - the position to search
bounds - the outer bounds of the search area
Returns:
the position of the requested view or null, if none was found

getHTMLRoot

public HtmlRootView getHTMLRoot()
Returns the HTML root view or null, if this view was disposed

Returns:
the HTML root view or null, if this view was disposed

setRoot

public void setRoot(HtmlRootView root)
Sets the view tree root of this view. Can be used to enable this view, to use the root before it was added to the view tree.

Parameters:
root - the html root view of this view tree

getPainter

public ViewPainter getPainter()
returns the set view painter, can be null if no custom painter has been set

Returns:
painter implementation

setPainter

public void setPainter(ViewPainter viewPainter)
sets the custom view painter, can be null if no custom painter is to be set

Parameters:
viewPainter - painter implementation

isBreakable

public boolean isBreakable()
Returns true, if this view may be used to break an inline layout

Returns:
Returns true, if this view may be used to break an inline layout

getDisplay

public int getDisplay()
Returns the DisplayValue constant for this view

Returns:
the DisplayValue constant for this view
See Also:
DisplayValue, http://www.w3.org/TR/CSS21/visuren.html#propdef-display

getRenderContext

public RenderContext getRenderContext()
Returns the render context used by this view

Returns:
the render context used by this view

isTableCell

public boolean isTableCell()
Returns true, if this view represents a table cell. It will return false in any other case, even if it is a table or part of a table content

Returns:
true, if this view is a TD/TH-view

getOverflow

public int getOverflow()
Returns the Overflow constant, which defines how to clip the content of this view

Returns:
the Overflow constant
See Also:
Overflow.AUTO, Overflow.SCROLL, Overflow.HIDDEN, Overflow.VISIBLE, http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

isFloating

public boolean isFloating()
Returns true, if this view is really a float

Returns:
true, if this view is really a float
See Also:
http://www.w3.org/TR/CSS21/visuren.html#floats

getFloat

public int getFloat()
Returns the FloatValue constant of the floating setting of this view

Returns:
the FloatValue constant of the floating setting of this view
See Also:
FloatValue.NONE, FloatValue.LEFT, FloatValue.CENTER, FloatValue.RIGHT, http://www.w3.org/TR/CSS21/visuren.html#propdef-float

getPosition

public int getPosition()
Returns the calculated Position constant for this view

Returns:
the calculated Position constant for this view
See Also:
Position.STATIC, Position.RELATIVE, Position.ABSOLUTE, Position.FIXED, http://www.w3.org/TR/CSS21/visuren.html#propdef-position

isAbsolutePositioned

public boolean isAbsolutePositioned()
Returns true, if this block has an absolute position

Returns:
true, if this block has an absolute position

getSpan

public java.awt.Rectangle getSpan()
Returns the span of this view. The span is the bounding rectangle from the top left of this subtree to the bottom right. It's relative to the elements top left corner of it's outer box. It may be larger than the element itself.

Returns:
the bounding outer rectangle of this subtree

getDirection

public int getDirection()
Returns the Base-Direction-value of this element

Returns:
the Direction constant
See Also:
Direction.LTR, Direction.RTL, http://www.w3.org/TR/CSS21/visuren.html#propdef-direction

getUnicodeBidi

public int getUnicodeBidi()
Returns the unicode bidi algorithm mode flag

Returns:
the unicode bidi algorithm mode flag
See Also:
UnicodeBidi.NORMAL, UnicodeBidi.EMBED, UnicodeBidi.OVERRIDE, http://www.w3.org/TR/CSS21/visuren.html#propdef-unicode-bidi

isLTR

public boolean isLTR()
This method combines all informations available on LTR-behavior for this block. It respects the direction, the unicode-bidi, and the content of this view

Returns:
true, if this view is overall LRT

setIsNativeLTR

public void setIsNativeLTR(boolean isLTR)
Sets the native LTR flag of this view. This will influence the text alignment, if no explicit alignment is set.

Parameters:
isLTR - true for native LTR, false for native RTL

isNativeLTR

public boolean isNativeLTR()
Returns true, if this view is in a LTR content by the unicode bidi level, false otherwise

Returns:
true, if this view is in a LTR content by the unicode bidi level, false otherwise