com.inet.html.views
Class BulletView

java.lang.Object
  extended by javax.swing.text.View
      extended by com.inet.html.views.BoxView
          extended by com.inet.html.views.ContentView
              extended by com.inet.html.views.BulletView
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.SwingConstants

public class BulletView
extends ContentView

View for bullet list items. Has always the default size of 6pt by 12pt.


Field Summary
 
Fields inherited from class com.inet.html.views.ContentView
CJK_TYPE_CHARACTER, CJK_TYPE_NONE, CJK_TYPE_PUNCTUATION
 
Fields inherited from class com.inet.html.views.BoxView
BASELINE, STATUS_REQ_LAYOUT, STATUS_REQ_PRELAYOUT, STATUS_UPTODATE
 
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
BulletView(javax.swing.text.Element elem, int listType)
          Creates the view for a specified list style type, allowed are only DISC, CIRCLE and SQUARE
BulletView(javax.swing.text.Element elem, int listType, ViewPainter painter)
          Creates the view for a specified list style type, allowed are only DISC, CIRCLE and SQUARE
 
Method Summary
 float getMinimumSpan(int axis)
          
 float getPreferredSpan(int axis)
          
 boolean isMarker()
          Returns true if this is a generated marker box
 java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b)
          
 void paint(java.awt.Graphics g, java.awt.Shape allocation)
          
 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!
 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!
 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.
 void setParent(javax.swing.text.View parent)
          
 int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] biasReturn)
          
 
Methods inherited from class com.inet.html.views.ContentView
createFragment, getBottomInset, getCJKType, getContentPainter, getFont, getLeftInset, getMargins, getRightInset, getTextLength, getTopInset, insertUpdate, isBlock, isBreakable, paramString, setBreakable, setCJKType, setIsNativeLTR, setSize, setSizeContent, toString
 
Methods inherited from class com.inet.html.views.BoxView
addBoxPainter, factoryPreset, forceLayout, forceLayout, getAlignment, getAutoMarginJustify, getBackgroundValue, getBorderBottomColor, getBorderLeftColor, getBorderRightColor, getBorderTopColor, getBox, getBoxPainter, getClear, getCompleteHight, getContentHeight, getContentVerticalOffset, getContentWidth, getDirection, getDisplay, getEndOffset, getFirstLineBaseLine, getFloat, getFontSize, getHeightUnit, getHTMLRoot, getJustification, getLineHeight, getOuterHeight, getOuterWidth, getOverflow, getPainter, getPosition, getRenderContext, getResizeWeight, getSpan, getStartOffset, getStatus, getSwingAlign, getUnicodeBidi, getViewForPosition, getViewIndex, getViewIndex, getVisibility, getWhiteSpace, getWidthUnit, isAbsolutePositioned, isBreak, isFloating, isInFlow, isListItemWithMarker, isLTR, isNativeLTR, isTableCell, isWidthSet, performPreLayout, setBackgroundValue, setBorderBottomColor, setBorderLeftColor, setBorderRightColor, setBorderTopColor, setContentVerticalOffset, setContentWidth, setFirstLineBaseLine, setJustification, setMarker, setPainter, setRoot, setStartAndEndOffset, setStatus, setStatusLocal
 
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getNextVisualPositionFrom, getParent, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, viewToModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BulletView

public BulletView(javax.swing.text.Element elem,
                  int listType)
Creates the view for a specified list style type, allowed are only DISC, CIRCLE and SQUARE

Parameters:
elem - the LI element to refer to
listType - the ListStyleType constant

BulletView

public BulletView(javax.swing.text.Element elem,
                  int listType,
                  ViewPainter painter)
Creates the view for a specified list style type, allowed are only DISC, CIRCLE and SQUARE

Parameters:
elem - the LI element to refer to
listType - the ListStyleType constant
painter - the paged paint controller, may be null
Method Detail

setParent

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

Overrides:
setParent in class ContentView

performLayout

public 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!

Overrides:
performLayout in class ContentView
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 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!

Overrides:
performLayoutVAlign in class ContentView
Parameters:
baseline - external prediction of the first baseline for BASELINE alignment

performLayoutWidth

public 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.

Overrides:
performLayoutWidth in class ContentView

getPreferredSpan

public float getPreferredSpan(int axis)

Overrides:
getPreferredSpan in class ContentView

getMinimumSpan

public float getMinimumSpan(int axis)

Overrides:
getMinimumSpan in class ContentView

isMarker

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

Overrides:
isMarker in class BoxView
Returns:
Returns true if this is a generated marker box

paint

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

Overrides:
paint in class ContentView

modelToView

public java.awt.Shape modelToView(int pos,
                                  java.awt.Shape a,
                                  javax.swing.text.Position.Bias b)
                           throws javax.swing.text.BadLocationException

Overrides:
modelToView in class ContentView
Throws:
javax.swing.text.BadLocationException

viewToModel

public int viewToModel(float x,
                       float y,
                       java.awt.Shape a,
                       javax.swing.text.Position.Bias[] biasReturn)

Overrides:
viewToModel in class ContentView