class CssTab extends Css {
/**
* Constructor
* @param String $href The url to the css filename (i.e. /css/my.css)
*/
function CssTab($href='') {
$this->Css($href!=''?$href:CSS_FILE_NAME_TAB);
}
/**
* Returns the css class details for an active Tab in a component
* @param String $name The Name of the CSS class
* @param String $color The Color of the class
* @param String $backgroundcolor The Background Color of the class
* @param String $bordercolor The Color of the border
* @param String $cssPx The CSS border width
* @return String the complete css
*/
function getTabActive($name,$color='',$backgroundcolor='',$bordercolor='', $cssPx='') {
$html = '';
$html .= $this->getStart("$name");
if ($color!='') {
$html .= $this->getCss("color","#$color");
}
if ($backgroundcolor!='') {
$html .= $this->getCss("background-color","#$backgroundcolor");
}
$borderColor = $bordercolor!=''?$bordercolor:CSS_TAB_COLOR;
$html .= $this->getCss("border","#$borderColor ".CSS_1PX.' '.CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("top" ,$bordercolor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("left" ,$bordercolor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("right" ,$bordercolor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("bottom",$bordercolor,CSS_0PX,CSS_BORDER_STYLE_SOLID);
$html .= $this->getCss("text-align","center");
$html .= $this->getEnd();
return $html;
}
/**
* Returns the css class details for a Tab Body in a component
* @param String $name The Name of the CSS class
* @param String $color The Color of the class
* @param String $backgroundcolor The Background Color of the class
* @param String $bordercolor The Color of the border
* @param String $cssPx The CSS border width
* @return String the complete css
*/
function getTabBody($name,$color='',$backgroundcolor='',$bordercolor='',$cssPx='') {
$html = '';
$html .= $this->getStart("$name");
if ($color!='') {
$html .= $this->getCss("color","#$color");
}
if ($backgroundcolor!='') {
$html .= $this->getCss("background-color","#$backgroundcolor");
}
$borderColor = $bordercolor!=''?$bordercolor:CSS_TAB_COLOR;
$html .= $this->getCss("border","#000 ".CSS_0PX.' '.CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("top" ,$bordercolor,CSS_0PX,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("left" ,$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("right" ,$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("bottom",$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getEnd();
return $html;
}
/**
* Returns the css class details for a Tab in a component
* @param String $name The Name of the CSS class
* @param String $color The Color of the class
* @param String $backgroundcolor The Background Color of the class
* @param String $bordercolor The Color of the border
* @param String $cssPx The CSS border width
* @return String the complete css
*/
function getTab($name,$color='',$backgroundcolor='',$bordercolor='',$cssPx='') {
$html = '';
$html .= $this->getStart("$name");
if ($color!='') {
$html .= $this->getCss("color","#$color");
}
if ($backgroundcolor!='') {
$html .= $this->getCss("background-color","#$backgroundcolor");
}
$borderColor = $bordercolor!=''?$bordercolor:CSS_TAB_COLOR;
$html .= $this->getCss("border","#$borderColor ".CSS_0PX.' '.CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("top" ,$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("left" ,$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("right" ,$borderColor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getBorderLine("bottom",$bordercolor,$cssPx,CSS_BORDER_STYLE_SOLID);
$html .= $this->getCss("text-align","center");
$html .= $this->getEnd();
return $html;
}