/* SwingML
* Copyright (C) 2002 SwingML Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors:
* Marcelo W. Lopez Cremona <marcelo_java@argentina.com>
*
*/
package org.swingml.view.renderer;
import java.awt.Container;
import org.swingml.*;
import org.swingml.component.JCheckBoxComponent;
import org.swingml.model.JCheckBoxModel;
import org.swingml.view.Renderer;
import org.swingml.view.RendererUtil;
public class JCheckBoxRenderer extends RendererUtil implements Renderer {
public Container render(AbstractSwingMLModel aModel, Container aParent) {
JCheckBoxModel theModel = (JCheckBoxModel) aModel;
JCheckBoxComponent theCheckBox = new JCheckBoxComponent(theModel);
String theOrientation = theModel.getOrientation();
if (theOrientation != null) {
aParent.add(theCheckBox, theOrientation);
} else {
aParent.add(theCheckBox);
}
return theCheckBox;
}
}