org.jrabbit.standard.profiler.entities.standard
Class SkinnedProfilerEntity

java.lang.Object
  extended by org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
      extended by org.jrabbit.standard.profiler.entities.standard.SkinnedProfilerEntity
All Implemented Interfaces:
Renderable, Referenced, DynamicSkinned, Skinned, Dimensioned, Visible, ProfilerEntity

public class SkinnedProfilerEntity
extends BaseProfilerEntity
implements DynamicSkinned

A SkinnedProfilerEntity renders a Skin. Obviously uses of this are, say, rendering an image or animation instead of just text, or simply having a more flexible means of rendering.

Author:
Chris Molini

Field Summary
protected  Skin skin
          The Skin being rendered.
 
Fields inherited from class org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
height, reference, visible, width
 
Constructor Summary
SkinnedProfilerEntity(java.lang.String reference, Skin skin)
          Creates a SkinnedProfilerEntity that renders the indicated Skin.
SkinnedProfilerEntity(java.lang.String reference, java.lang.String imageReference)
          Creates a SkinnedProfilerEntity that renders the indicated Image in the Cache.
 
Method Summary
 float height()
          Accesses the dimensions of the ProfilerEntity.
 void render()
          Renders the skin.
 void setSkin(Skin skin)
          Redefines the Skin to render.
 Skin skin()
          Accesses the active Skin.
 float width()
          Accesses the dimensions of the ProfilerEntity.
 
Methods inherited from class org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
reference, setVisible, visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

skin

protected Skin skin
The Skin being rendered.

Constructor Detail

SkinnedProfilerEntity

public SkinnedProfilerEntity(java.lang.String reference,
                             Skin skin)
Creates a SkinnedProfilerEntity that renders the indicated Skin.

Parameters:
reference - The String to identify this ProfilerEntity.
skin - The Skin to render.

SkinnedProfilerEntity

public SkinnedProfilerEntity(java.lang.String reference,
                             java.lang.String imageReference)
Creates a SkinnedProfilerEntity that renders the indicated Image in the Cache.

Parameters:
reference - The String to identify this ProfilerEntity.
imageReference - The identifer of the Skin to render.
Method Detail

skin

public Skin skin()
Accesses the active Skin.

Specified by:
skin in interface Skinned
Returns:
The current Skin being rendered.

setSkin

public void setSkin(Skin skin)
Redefines the Skin to render.

Specified by:
setSkin in interface DynamicSkinned
Parameters:
skin - The new Skin to render.

width

public float width()
Accesses the dimensions of the ProfilerEntity.

Specified by:
width in interface Dimensioned
Overrides:
width in class BaseProfilerEntity
Returns:
The current width of the Skin being rendered.

height

public float height()
Accesses the dimensions of the ProfilerEntity.

Specified by:
height in interface Dimensioned
Overrides:
height in class BaseProfilerEntity
Returns:
The current height of the Skin being rendered.

render

public void render()
Renders the skin.

Specified by:
render in interface Renderable