info.magnolia.cms.gui.controlx.impl
Class AbstractControl

java.lang.Object
  extended by info.magnolia.cms.gui.controlx.impl.AbstractControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
ListColumn, ListControl, SearchControl

public class AbstractControl
extends java.lang.Object
implements Control

Default Implementation. Gets the nearest RenderKit in the controls tree.

Version:
$Revision: 32667 $ ($Author: gjoseph $)
Author:
Philipp Bracher

Constructor Summary
AbstractControl()
           
 
Method Summary
 void addChild(Control control)
          If no name set yet just set one.
 Control getChild(java.lang.String name)
           
 java.util.Collection getChildren()
           
 java.lang.String getName()
           
 Control getParent()
           
 Renderer getRenderer()
           
 RenderKit getRenderKit()
           
 java.lang.String getRenderType()
           
 void removeAllChildren()
           
 void removeChild(java.lang.String name)
           
 java.lang.String render()
          Get the Renderer assigned to this renderer type and call its renderer() method.
 void setName(java.lang.String name)
           
 void setParent(Control parent)
           
 void setRenderer(Renderer renderer)
           
 void setRenderKit(RenderKit renderKit)
           
 void setRenderType(java.lang.String renderType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractControl

public AbstractControl()
Method Detail

getParent

public Control getParent()
Specified by:
getParent in interface Control
Returns:
Returns the parent.

setParent

public void setParent(Control parent)
Specified by:
setParent in interface Control
Parameters:
parent - The parent to set.

addChild

public void addChild(Control control)
If no name set yet just set one.

Specified by:
addChild in interface Control

getChild

public Control getChild(java.lang.String name)
Specified by:
getChild in interface Control

removeChild

public void removeChild(java.lang.String name)

getChildren

public java.util.Collection getChildren()

removeAllChildren

public void removeAllChildren()

getName

public java.lang.String getName()
Specified by:
getName in interface Control
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Control
Parameters:
name - The name to set.

getRenderKit

public RenderKit getRenderKit()
Specified by:
getRenderKit in interface Control
Returns:
Returns the renderKit.

setRenderKit

public void setRenderKit(RenderKit renderKit)
Specified by:
setRenderKit in interface Control
Parameters:
renderKit - The renderKit to set.

render

public java.lang.String render()
Get the Renderer assigned to this renderer type and call its renderer() method.

Specified by:
render in interface Control

getRenderType

public java.lang.String getRenderType()
Specified by:
getRenderType in interface Control
Returns:
Returns the renderType.

setRenderType

public void setRenderType(java.lang.String renderType)
Specified by:
setRenderType in interface Control
Parameters:
renderType - The renderType to set.

getRenderer

public Renderer getRenderer()
Returns:
Returns the renderer.

setRenderer

public void setRenderer(Renderer renderer)
Parameters:
renderer - The renderer to set.


Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.