Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26599
Added Files:
FacadeModellor.java package.html
Log Message:
initial
--- NEW FILE: package.html ---
<body>
Defines the package that contains the facade modellors.
</body>
--- NEW FILE: FacadeModellor.java ---
//---------------------------------------------------------------------------------
// $Id: FacadeModellor.java,v 1.1 2006/08/11 11:44:37 nordholt Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.facade.modellor;
import java.util.List;
import java.util.LinkedList;
import net.sourceforge.bprocessor.model.modellor.Modellor;
import net.sourceforge.bprocessor.model.Space;
import net.sourceforge.bprocessor.model.Attribute;
import net.sourceforge.bprocessor.model.Surface;
import org.apache.log4j.Logger;
/**
* The facade modellor models the elements for a facade space.
*/
public class FacadeModellor extends Modellor {
/** Default */
private static final long serialVersionUID = 1L;
/** The logger */
private static Logger log = Logger.getLogger(FacadeModellor.class);
/** Name of the modellor */
private String name;
/** Number of vertical posts */
private int vertPosts;
/** Number of horizontal posts */
private int horPosts;
/** Default vertical post width */
private double vertPostWidth;
/** Default horizontal post width */
private double horPostWidth;
/** The space this modellor is connected to */
private Space space;
/** The front surface of the facade */
private Surface front;
/** The empty constructor */
public FacadeModellor() {
this.name = "Facade Modellor";
}
/** The constructor for the modellor
* @param s the space this modellor models for.
*/
public FacadeModellor(Space s) {
this.space = s;
this.name = "Facade Modellor";
}
/**
* Create a new instance of the modellor, based on a space
* @param s The space the modellor should reside in
* @return The created modellor object for the given space
*/
public Modellor newInstance(Space s) {
return new FacadeModellor(s);
}
/**
* The update method
* @param entity Changed entity
*/
public void update(Object entity) {
}
/**
* Set the attributes of the object to the values in the list
* @param attributes The attributes to set
*/
public void setAttributes(List attributes) {
}
/**
* Return a list of the attributes in the object
* @return the list of attributes for the object
*/
public List getAttributes() {
LinkedList attributes = new LinkedList();
attributes.add(new Attribute("Name", name));
Attribute a = new Attribute("V-posts", new Double(vertPosts));
a.setPrecision(1);
attributes.add(a);
attributes.add(new Attribute("H-posts", new Double(horPosts)));
attributes.add(new Attribute("V-postwidth", new Double(vertPostWidth)));
attributes.add(new Attribute("H-postwidth", new Double(horPostWidth)));
return attributes;
}
/**
* Get the name
* @return The name
*/
public String getName() {
return name;
}
/**
* @see net.sourceforge.bprocessor.model.Parametric#getGeneralName()
*/
public String getGeneralName() {
return "Facade Modellor";
}
/** Delete */
public void delete() {
}
}
|