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 ybxdde
12: *
13: */
14: public class JFormattedTextFieldRenderer extends RendererUtil implements
15: Renderer {
16:
17: public Container render(AbstractSwingMLModel aModel,
18: Container aParent) {
19: JFormattedTextFieldModel theModel = (JFormattedTextFieldModel) aModel;
20: JFormattedTextFieldComponent theTextField = new JFormattedTextFieldComponent(
21: theModel);
22: String theOrientation = theModel.getOrientation();
23: if (theOrientation != null) {
24: aParent.add(theTextField, theOrientation);
25: } else {
26: aParent.add(theTextField);
27: }
28:
29: return theTextField;
30: }
31:
32: }
|