All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.properties.CssBorderTop

java.lang.Object
   |
   +----org.w3c.css.properties.CssProperty
           |
           +----org.w3c.css.properties.CssBorderTop

public class CssBorderTop
extends CssProperty
implements CssOperator

   'border-top'

Value: <border-top-width> || <border-style> || <color>
Initial: not defined for shorthand properties
Applies to: all elements
Inherited: no
Percentage values: N/A

This is a shorthand property for setting the width, style and color of an element's top border.

   H1 { border-bottom: thick solid red }
 

The above rule will set the width, style and color of the border below the H1 element. Omitted values will be set to their initial values:

   H1 { border-bottom: thick solid }
 

Since the color value is omitted in the example above, the border color will be the same as the 'color' value of the element itself.

Note that while the 'border-style' property accepts up to four values, this property only accepts one style value.


Constructor Index

 o CssBorderTop()
Create a new CssBorderFace
 o CssBorderTop(CssExpression)
Create a new CssBorderFace

Method Index

 o addToStyle(CssStyle)
Add this property to the CssStyle
 o equals(CssProperty)
Compares two properties for equality.
 o get()
Returns the value of this property
 o getColor()
Returns the color property
 o getImportant()
Returns true if this property is important.
 o getPropertyInStyle(CssStyle, boolean)
Get this property in the style.
 o getPropertyName()
Returns the name of this property
 o getStyle()
Returns the style property
 o getWidth()
Returns the width property
 o print(CssPrinterStyle)
Print this property.
 o setImportant()
Set this property to be important.
 o setInfo(int, String)
Update the source file and the line.
 o setSelectors(CssSelectors)
Set the context.
 o toString()
Returns a string representation of the object.

Constructors

 o CssBorderTop
 public CssBorderTop()
Create a new CssBorderFace

 o CssBorderTop
 public CssBorderTop(CssExpression expression) throws InvalidParamException
Create a new CssBorderFace

Parameters:
expression - The expression for this property
Throws: InvalidParamException
The expression is incorrect

Methods

 o get
 public Object get()
Returns the value of this property

Overrides:
get in class CssProperty
 o getColor
 public CssColor getColor()
Returns the color property

 o getWidth
 public CssValue getWidth()
Returns the width property

 o getStyle
 public String getStyle()
Returns the style property

 o toString
 public String toString()
Returns a string representation of the object.

Overrides:
toString in class CssProperty
 o getPropertyName
 public String getPropertyName()
Returns the name of this property

Overrides:
getPropertyName in class CssProperty
 o setImportant
 public void setImportant()
Set this property to be important. Overrides this method for a macro

Overrides:
setImportant in class CssProperty
 o getImportant
 public boolean getImportant()
Returns true if this property is important. Overrides this method for a macro

Overrides:
getImportant in class CssProperty
 o print
 public void print(CssPrinterStyle printer)
Print this property.

Parameters:
printer - The printer.
Overrides:
print in class CssProperty
See Also:
toString, getPropertyName
 o addToStyle
 public void addToStyle(CssStyle style)
Add this property to the CssStyle

Parameters:
style - The CssStyle
Overrides:
addToStyle in class CssProperty
 o getPropertyInStyle
 public CssProperty getPropertyInStyle(CssStyle style,
                                       boolean resolve)
Get this property in the style.

Parameters:
style - The style where the property is
resolve - if true, resolve the style to find this property
Overrides:
getPropertyInStyle in class CssProperty
 o setInfo
 public void setInfo(int line,
                     String source)
Update the source file and the line. Overrides this method for a macro

Parameters:
line - The line number where this property is defined
source - The source file where this property is defined
Overrides:
setInfo in class CssProperty
 o setSelectors
 public void setSelectors(CssSelectors selector)
Set the context. Overrides this method for a macro

Overrides:
setSelectors in class CssProperty
See Also:
order, handleRule
 o equals
 public boolean equals(CssProperty property)
Compares two properties for equality.

Parameters:
value - The other property.
Overrides:
equals in class CssProperty

All Packages  Class Hierarchy  This Package  Previous  Next  Index