Class StyleSwitcher
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.wicketstuff.minis.behavior.styleswitcher.StyleSwitcher
-
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,IClusterable
public class StyleSwitcher extends Behavior
StyleSwitcher Adds a set of alternate stylesheet links to the header with title attributes. When used in conjunction withStyleSwitcherLink, 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
Nested Classes Modifier and Type Class Description static classStyleSwitcher.JavascriptJavaScript access methods
-
Constructor Summary
Constructors Constructor Description StyleSwitcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStylesheet(String title, ResourceReference reference)Adds stylesheet to this stylesheet switchervoidrenderHead(Component c, IHeaderResponse response)-
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind
-
-
-
-
Method Detail
-
addStylesheet
public void addStylesheet(String title, ResourceReference reference)
Adds stylesheet to this stylesheet switcher- Parameters:
reference- A resource reference to an alternate stylesheettitle- Name of this stylesheet
-
renderHead
public void renderHead(Component c, IHeaderResponse response)
- Specified by:
renderHeadin interfaceIComponentAwareHeaderContributor- Overrides:
renderHeadin classBehavior
-
-