01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.samples.explorer.client;
09:
10: import net.mygwt.ui.client.Style;
11: import net.mygwt.ui.client.fx.Draggable;
12: import net.mygwt.ui.client.fx.Resizable;
13: import net.mygwt.ui.client.widget.ContentPanel;
14: import net.mygwt.ui.client.widget.WidgetContainer;
15: import net.mygwt.ui.client.widget.layout.FlowLayout;
16:
17: import com.google.gwt.user.client.ui.VerticalPanel;
18:
19: public class ResizablePage extends Page {
20:
21: protected void createWidget(WidgetContainer container) {
22: VerticalPanel vp = new VerticalPanel();
23: vp.setSpacing(10);
24:
25: ContentPanel cp = new ContentPanel(Style.HEADER,
26: "my-cpanel-small");
27: cp.setText("3-Way Resizing");
28: cp.setIconStyle("icon-text");
29: cp.setPadding(5);
30: cp.addText("Resize test");
31:
32: cp.setWidth(200);
33:
34: Resizable r = new Resizable(cp);
35: r.minWidth = 150;
36: r.maxHeight = 300;
37: r.maxWidth = 400;
38:
39: vp.add(cp);
40:
41: container.setLayout(new FlowLayout());
42: container.add(vp);
43:
44: Draggable d = new Draggable(cp);
45: d.useProxy = false;
46:
47: }
48:
49: }
|