com.cc.framework.ui.painter.def
Class DefTabbarPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPainter
      extended bycom.cc.framework.ui.painter.def.DefPainterBase
          extended bycom.cc.framework.ui.painter.def.DefTabbarPainter
Direct Known Subclasses:
DefTabsetPainter

public class DefTabbarPainter
extends DefPainterBase

Painter class for the tabbar control

Since:
1.2
Version:
$Revision: 1.53 $
Author:
Gernot Schulz

Field Summary
 
Fields inherited from class com.cc.framework.ui.painter.ControlPainter
log
 
Constructor Summary
DefTabbarPainter(PainterContext painterContext, TabbarControl ctrl)
          Constructor for DefTabbarPainter
 
Method Summary
protected  JavaScript createClientScript(TabDesignModel[] tabs)
          Creates an JavaScript for the client Side Handler of the control.
protected  org.apache.ecs.ConcreteElement doCreateBody(TabDesignModel[] tabs)
          This method creates the content for the selected tab.
protected  org.apache.ecs.ConcreteElement doCreateElement()
          Creates the HTML-Element.
 Color getBgColor()
          Retrieves the Background color of the control
protected  TabbarControl getCtrl()
          Retrieves the control for this painter
 java.lang.String getElementClass(int type)
          The method returns the HTML style class required for a list or treelist control.
protected  java.lang.String[] getJSImageResources()
          Creates the array which holds the images resources used by our JavaScript tree
protected  java.lang.String getJSRangeResource()
           
protected  java.lang.String getJSType()
           
 ImageModel getTabImage(TabDesignModel tab)
          Returns the optional image for the given tab
protected  boolean isOverlapping()
          Checks if the tabs should be painted in overlapping mode
protected  boolean isSelected(TabDesignModel tab)
          Checks if the specified tab is selected
protected  boolean showFrame()
          Checks if the frame should be painted
 
Methods inherited from class com.cc.framework.ui.painter.def.DefPainterBase
createHelpElement, createHelpElement, doCreateHelpButton, doCreateHelpIcon
 
Methods inherited from class com.cc.framework.ui.painter.ControlPainter
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAfterCreate, doAttachDecorations, doBeforeCreate, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefTabbarPainter

public DefTabbarPainter(PainterContext painterContext,
                        TabbarControl ctrl)
Constructor for DefTabbarPainter

Parameters:
painterContext - The PainterContext
ctrl - The Control to render
Method Detail

getCtrl

protected TabbarControl getCtrl()
Retrieves the control for this painter

Returns:
Control

isSelected

protected boolean isSelected(TabDesignModel tab)
Checks if the specified tab is selected

Parameters:
tab - the tab to check
Returns:
true if the tab is selected

isOverlapping

protected boolean isOverlapping()
Checks if the tabs should be painted in overlapping mode

Returns:
true when overlapping tabs should be drawn

showFrame

protected boolean showFrame()
Checks if the frame should be painted

Returns:
true if the frame should be painted

getBgColor

public Color getBgColor()
Retrieves the Background color of the control

Returns:
Background color

getTabImage

public ImageModel getTabImage(TabDesignModel tab)
Returns the optional image for the given tab

Parameters:
tab - the tab
Returns:
ImageModel

getElementClass

public java.lang.String getElementClass(int type)
Description copied from class: ControlPainter
The method returns the HTML style class required for a list or treelist control.

Overrides:
getElementClass in class DefPainterBase
See Also:
ControlPainter.getElementClass(int)

doCreateBody

protected org.apache.ecs.ConcreteElement doCreateBody(TabDesignModel[] tabs)
This method creates the content for the selected tab. If the control is configured as RunAt="CLIENT" than all tabs will be rendered in hidden DIV elements.

Parameters:
tabs - The collection with the visible tabs
Returns:
ConcreteElement

createClientScript

protected JavaScript createClientScript(TabDesignModel[] tabs)
Creates an JavaScript for the client Side Handler of the control. The Script is needed if:
  1. The Attribute runAt is set to true
  2. The control has more tab pages then should be visible

Parameters:
tabs - TabDesignModel
Returns:
JavaScript

getJSType

protected java.lang.String getJSType()
Returns:
The control type for JavaScript

getJSRangeResource

protected java.lang.String getJSRangeResource()
Returns:
Resource identifier for the range text resource

getJSImageResources

protected java.lang.String[] getJSImageResources()
Creates the array which holds the images resources used by our JavaScript tree

Returns:
Array containing the images resources

doCreateElement

protected org.apache.ecs.ConcreteElement doCreateElement()
Description copied from class: ControlPainter
Creates the HTML-Element. This Method must be implemented by the concrete Sub-Class

Specified by:
doCreateElement in class ControlPainter
Returns:
ConcreteElement
See Also:
ControlPainter.doCreateElement()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.