Resizable Behavior
Components / Samples
Description
This sample shows how to use the 'resizable' behavior.
Sources
package com.googlecode.wicket.jquery.ui.samples.jqueryui.resizable; import com.googlecode.wicket.jquery.core.Options; import com.googlecode.wicket.jquery.ui.interaction.resizable.ResizableAdapter; import com.googlecode.wicket.jquery.ui.interaction.resizable.ResizableBehavior; public class DefaultResizablePage extends AbstractResizablePage { private static final long serialVersionUID = 1L; public DefaultResizablePage() { Options options = new Options(); options.set("minWidth", 200); options.set("maxWidth", 720); options.set("minHeight", 100); options.set("maxHeight", 300); this.add(new ResizableBehavior("#resizable", options, new ResizableAdapter())); } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket jQuery UI: resizable</title> <style> #resizable { width: 350px; height: 95px; padding: 0.5em; overflow: hidden; } #resizable h3 { text-align: center; margin: 0; padding: 0.1em; } #resizable div { overflow: auto; padding: 0.3em; } </style> </wicket:head> </head> <body> <wicket:extend> <div id="resizable" class="ui-widget-content"> <h3 class="ui-widget-header">Resizable panel</h3> <div> Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. </div> </div> </wicket:extend> </body> </html>