|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.View
com.inet.html.views.BoxView
com.inet.html.views.HRuleView
public class HRuleView
This view represents a horizontal rule as defined by HTML.
Field Summary |
---|
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 | |
---|---|
HRuleView(javax.swing.text.Element elem)
Creates the object, does nothing else. |
|
HRuleView(javax.swing.text.Element elem,
ViewPainter painter)
Creates the object, and sets the paint controller |
Method Summary | |
---|---|
int |
getBottomInset()
Gets the bottom inset. |
int |
getFirstLineBaseLine()
Returns the baseline of the first content descendand of this view relative to the upper bound of this view |
int |
getLeftInset()
Gets the left inset. |
java.awt.Insets |
getMargins()
Get the CSS margins |
float |
getMinimumSpan(int axis)
|
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. |
float |
getPreferredSpan(int axis)
|
int |
getRightInset()
Gets the right inset. |
int |
getTopInset()
Gets the top inset. |
void |
insertUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
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 |
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.lang.String |
paramString()
Returns a custom toString version |
java.awt.Rectangle |
performLayout(boolean hard)
This is the final layout 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. |
void |
performLayoutWidth()
Layout what is required to determin the width of this view. |
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 javax.swing.text.View |
---|
append, breakView, changedUpdate, createFragment, 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, toString, wait, wait, wait |
Constructor Detail |
---|
public HRuleView(javax.swing.text.Element elem)
elem
- The element this view ill display, must not be nullpublic HRuleView(javax.swing.text.Element elem, ViewPainter painter)
elem
- the element this view ill display, must not be nullpainter
- the paint controller to use, may be null if there is noneMethod Detail |
---|
public void setParent(javax.swing.text.View parent)
setParent
in class BoxView
public float getPreferredSpan(int axis)
getPreferredSpan
in class javax.swing.text.View
public float getMinimumSpan(int axis)
getMinimumSpan
in class javax.swing.text.View
public java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b) throws javax.swing.text.BadLocationException
modelToView
in class javax.swing.text.View
javax.swing.text.BadLocationException
public int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] biasReturn)
viewToModel
in class javax.swing.text.View
public void paint(java.awt.Graphics g, java.awt.Shape allocation)
paint
in class BoxView
public int getOuterHeight()
getOuterHeight
in class BoxView
public int getOuterWidth()
getOuterWidth
in class BoxView
public int getLeftInset()
getLeftInset
in class BoxView
public boolean isBlock()
isBlock
in class BoxView
public boolean isBreak()
isBreak
in class BoxView
public int getRightInset()
getRightInset
in class BoxView
public int getTopInset()
getTopInset
in class BoxView
public int getBottomInset()
getBottomInset
in class BoxView
public java.awt.Insets getMargins()
getMargins
in class BoxView
public java.lang.String paramString()
public java.awt.Rectangle performLayout(boolean hard)
performLayout
in class BoxView
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.
public void performLayoutWidth()
performLayoutWidth
in class BoxView
public void performLayoutVAlign(int baseline)
performLayoutVAlign
in class BoxView
baseline
- external prediction of the first baseline for BASELINE alignmentpublic void insertUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
insertUpdate
in class javax.swing.text.View
public int getFirstLineBaseLine()
getFirstLineBaseLine
in class BoxView
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |