01: package org.swingml.view.renderer;
02:
03: import java.awt.*;
04:
05: import org.swingml.*;
06: import org.swingml.component.*;
07: import org.swingml.model.*;
08: import org.swingml.view.*;
09:
10: /**
11: * @author ttolle@crosslogic.com
12: */
13: public class JScrollPaneRenderer extends RendererUtil implements
14: Renderer {
15:
16: public Container render(AbstractSwingMLModel model, Container parent) {
17: JScrollPaneModel scrollPaneModel = (JScrollPaneModel) model;
18: JScrollPaneComponent scrollPane = new JScrollPaneComponent(
19: scrollPaneModel);
20: String o = scrollPaneModel.getOrientation();
21: if (o != null) {
22: parent.add(scrollPane, o);
23: } else {
24: parent.add(scrollPane);
25: }
26: super.iterate(scrollPaneModel, scrollPane);
27:
28: return scrollPane;
29: }
30: }
|