org.wicketstuff.minis.styleswitcher
Class StyleSwitcher

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.wicketstuff.minis.styleswitcher.StyleSwitcher
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.IHeaderContributor

public class StyleSwitcher
extends org.apache.wicket.behavior.AbstractBehavior

StyleSwitcher Adds a set of alternate stylesheet links to the header with title attributes. When used in conjunction with StyleSwitcherLink, it easy to switch active stylesheets with the click of a link. Inspired by Paul Sowden's A List Apart article "Altenative Style" http://alistapart.com/stories/alternate/

Author:
Tauren Mills (tauren), Igor Vaynberg (ivaynberg at apache dot org)
See Also:
Serialized Form

Nested Class Summary
static class StyleSwitcher.Javascript
          Javascript access methods
 
Constructor Summary
StyleSwitcher()
          Construct.
 
Method Summary
 void addStylesheet(java.lang.String title, org.apache.wicket.ResourceReference reference)
          Adds stylesheet to this stylesheet switcher
 void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
           
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, bind, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleSwitcher

public StyleSwitcher()
Construct.

Method Detail

addStylesheet

public void addStylesheet(java.lang.String title,
                          org.apache.wicket.ResourceReference reference)
Adds stylesheet to this stylesheet switcher

Parameters:
reference - A resource reference to an alternate stylesheet
title - Name of this stylesheet

renderHead

public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor
Overrides:
renderHead in class org.apache.wicket.behavior.AbstractBehavior
See Also:
AbstractBehavior.renderHead(org.apache.wicket.markup.html.IHeaderResponse)


Copyright © 2010. All Rights Reserved.