|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfi.hut.tml.xsmiles.csslayout.view.BaseView
| Nested Class Summary | |
protected class |
BaseView.ViewDimensions
Contains all the dimensions of a view. |
| Field Summary | |
protected java.util.Vector |
absoluteChildViews
|
protected boolean |
absolutePosition
|
protected CSSBackgroundImage |
backImage
|
protected java.awt.Color |
bgColor
cache the bg color |
protected CSSBorder |
border
|
protected java.util.Vector |
childViews
|
protected boolean |
closeFloat
|
protected BaseView.ViewDimensions |
dimensions
|
protected org.w3c.dom.Node |
domElement
|
protected boolean |
floatLeft
|
protected boolean |
floatRight
|
protected boolean |
hasRelativeHeight
|
protected boolean |
hasRelativeWidth
|
protected View |
parent
|
protected int |
posX
|
protected int |
posY
|
protected java.util.Vector |
relativeChildViews
|
protected boolean |
relativePosition
|
protected CSSRenderer |
renderer
|
protected SizeRequirements |
sizeRequirements
|
protected org.w3c.dom.css.CSSStyleDeclaration |
style
|
protected boolean |
visible
|
protected double |
zoom
|
| Fields inherited from interface fi.hut.tml.xsmiles.csslayout.view.View |
X_AXIS, Y_AXIS |
| Constructor Summary | |
BaseView(CSSRenderer r,
org.w3c.dom.Node node,
View parent)
Creates a new instance of BaseView |
|
| Method Summary | |
void |
addAbsoluteChildView(View v)
|
void |
addChildView(View v)
|
void |
addRelativeChildView(View v)
|
protected void |
addView(org.w3c.dom.Node node,
View view,
View parentView,
java.lang.String display)
|
java.awt.Rectangle |
calculateIntersection(java.awt.Rectangle rect1,
java.awt.Rectangle rect2)
|
View |
createChildView(org.w3c.dom.Node child,
org.w3c.dom.Node parent)
|
void |
createChildViews(org.w3c.dom.Node parent)
|
View |
createComponentView(VisualComponentService e)
|
View |
createView(org.w3c.dom.Node node,
java.lang.String display)
|
void |
doLayout()
do the layout for this and its children |
void |
dump(java.lang.String indent)
|
protected View |
findContainingBlock(BaseView view)
|
int |
getAbsolutePositionX()
|
int |
getAbsolutePositionY()
|
java.util.Vector |
getChildren()
|
View |
getChildView(int index)
|
CSSRenderer |
getCSSRenderer()
|
BaseView.ViewDimensions |
getDimensions()
|
org.w3c.dom.Node |
getDOMElement()
|
View |
getFirstChild()
This is called by XSmilesVisualElement when a node is removed from the DOM, let's remove all components from view |
int |
getMaximumSpan(int axis)
get maximum span of this view that corresponds to an axis |
int |
getMinimumSpan(int axis)
get minimum span of this view that corresponds to an axis |
View |
getParentView()
|
int |
getPreferredSpan(int axis)
get maximum span of this view that corresponds to an axis |
java.awt.Rectangle |
getRectangle()
|
SizeRequirements |
getSizeRequirements()
|
org.w3c.dom.css.CSSStyleDeclaration |
getStyle()
|
static java.lang.String |
getText(org.w3c.dom.Element elem)
|
View |
getViewAtPoint(java.awt.Point pt)
Returns a view, which embeds the given point. |
int |
getViewHeight()
|
int |
getViewWidth()
|
void |
handleRelativeView()
|
boolean |
hasAbsoluteChildren()
This is called by XSmilesVisualElement when a node is removed from the DOM, let's remove all components from view |
boolean |
hasAbsolutePosition()
Returns true if view is absolute positioned. |
boolean |
hasRelativePosition()
Returns true if view is relative positioned. |
void |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
|
boolean |
isInTable()
Checks if this view is inside TableView. |
boolean |
isLeftFloated()
Returns true if view has float left. |
boolean |
isRightFloated()
Returns true if view has float right. |
protected void |
moveChildViews(int x,
int y)
|
void |
moveView(int axis,
int pixels)
Moves view and its children. |
protected void |
notifyViewRemovedRecursively(View child)
go through all descendant views and notify them of removal |
void |
paint(java.awt.Graphics g)
paints this view |
void |
paintBackground(java.awt.Graphics g)
|
void |
paintBorder(java.awt.Graphics g)
|
void |
removeChild(View child)
|
void |
removeChildren()
|
void |
removeFromTree()
Removes this view from the view tree. |
void |
repaint(java.awt.Image img)
|
void |
repaintDocument()
|
void |
repaintDocument(View view)
|
void |
repaintView()
|
void |
setAbsoluteCoordinates()
This is called for absolute positioned views. |
void |
setAbsolutePosition(int x,
int y)
set the absolute position of this view, only the parent is allowed to call this |
void |
setContentHeight(int height)
|
void |
setContentWidth(int width)
|
protected void |
setMaxContentSize()
|
void |
setParentView(View parent)
|
protected void |
setRelativePosition()
|
void |
setSizeRequirements()
|
void |
setStyle(org.w3c.dom.css.CSSStyleDeclaration s)
|
void |
setViewHeight(int height)
|
void |
setViewWidth(int width)
|
protected boolean |
testValue(java.lang.String text)
Check if the text node is real text or just indentation in original xhtml document. |
void |
viewRemoved()
this method is called when a view is removed from the hierarchy. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int posX
protected int posY
protected java.util.Vector childViews
protected java.util.Vector absoluteChildViews
protected java.util.Vector relativeChildViews
protected CSSRenderer renderer
protected org.w3c.dom.Node domElement
protected org.w3c.dom.css.CSSStyleDeclaration style
protected View parent
protected BaseView.ViewDimensions dimensions
protected boolean absolutePosition
protected boolean relativePosition
protected boolean visible
protected java.awt.Color bgColor
protected SizeRequirements sizeRequirements
protected CSSBorder border
protected CSSBackgroundImage backImage
protected double zoom
protected boolean hasRelativeWidth
protected boolean hasRelativeHeight
protected boolean floatLeft
protected boolean floatRight
protected boolean closeFloat
| Constructor Detail |
public BaseView(CSSRenderer r,
org.w3c.dom.Node node,
View parent)
| Method Detail |
public void addChildView(View v)
addChildView in interface Viewpublic void addAbsoluteChildView(View v)
public void addRelativeChildView(View v)
public View getChildView(int index)
public org.w3c.dom.Node getDOMElement()
getDOMElement in interface Viewpublic org.w3c.dom.css.CSSStyleDeclaration getStyle()
getStyle in interface Viewpublic int getMaximumSpan(int axis)
View
getMaximumSpan in interface Viewpublic int getMinimumSpan(int axis)
View
getMinimumSpan in interface Viewpublic int getPreferredSpan(int axis)
View
getPreferredSpan in interface View
public void setAbsolutePosition(int x,
int y)
View
setAbsolutePosition in interface Viewpublic int getAbsolutePositionX()
getAbsolutePositionX in interface Viewpublic int getAbsolutePositionY()
getAbsolutePositionY in interface Viewpublic int getViewWidth()
getViewWidth in interface Viewpublic int getViewHeight()
getViewHeight in interface Viewpublic void setContentWidth(int width)
public void setContentHeight(int height)
public void setViewWidth(int width)
public void setViewHeight(int height)
public BaseView.ViewDimensions getDimensions()
public CSSRenderer getCSSRenderer()
getCSSRenderer in interface Viewpublic void doLayout()
View
doLayout in interface Viewprotected void setMaxContentSize()
public boolean hasAbsolutePosition()
hasAbsolutePosition in interface Viewpublic boolean hasRelativePosition()
public boolean isLeftFloated()
public boolean isRightFloated()
public void setAbsoluteCoordinates()
public void handleRelativeView()
protected void setRelativePosition()
protected void moveChildViews(int x,
int y)
public java.awt.Rectangle getRectangle()
getRectangle in interface Viewpublic void paint(java.awt.Graphics g)
paint in interface Viewpublic void paintBorder(java.awt.Graphics g)
public void paintBackground(java.awt.Graphics g)
public void repaint(java.awt.Image img)
repaint in interface View
public java.awt.Rectangle calculateIntersection(java.awt.Rectangle rect1,
java.awt.Rectangle rect2)
public void createChildViews(org.w3c.dom.Node parent)
createChildViews in interface View
public View createChildView(org.w3c.dom.Node child,
org.w3c.dom.Node parent)
createChildView in interface View
protected void addView(org.w3c.dom.Node node,
View view,
View parentView,
java.lang.String display)
public View createComponentView(VisualComponentService e)
public View createView(org.w3c.dom.Node node,
java.lang.String display)
public void insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
public static java.lang.String getText(org.w3c.dom.Element elem)
public View getViewAtPoint(java.awt.Point pt)
protected View findContainingBlock(BaseView view)
protected boolean testValue(java.lang.String text)
public void dump(java.lang.String indent)
public View getParentView()
getParentView in interface Viewpublic void setParentView(View parent)
setParentView in interface Viewpublic void setStyle(org.w3c.dom.css.CSSStyleDeclaration s)
setStyle in interface Viewpublic void removeFromTree()
removeFromTree in interface Viewpublic View getFirstChild()
getFirstChild in interface Viewpublic void viewRemoved()
viewRemoved in interface Viewprotected void notifyViewRemovedRecursively(View child)
public void removeChild(View child)
removeChild in interface Viewpublic void removeChildren()
removeChildren in interface Viewpublic void repaintDocument()
repaintDocument in interface Viewpublic void repaintDocument(View view)
repaintDocument in interface Viewpublic void repaintView()
repaintView in interface Viewpublic java.util.Vector getChildren()
getChildren in interface Viewpublic boolean hasAbsoluteChildren()
View
hasAbsoluteChildren in interface Viewpublic void setSizeRequirements()
setSizeRequirements in interface Viewpublic SizeRequirements getSizeRequirements()
getSizeRequirements in interface View
public void moveView(int axis,
int pixels)
public boolean isInTable()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||