Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17468/src/net/sourceforge/bprocessor/model
Added Files:
Attributes.java Parametric.java
Log Message:
A class for modeling attributes in objects in the model and a interface for the objects that want to be showable in the attributeview in the standard way
--- NEW FILE: Attributes.java ---
//---------------------------------------------------------------------------------
// $Id: Attributes.java,v 1.1 2006/01/30 11:41:12 rimestad Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.model;
import org.apache.log4j.Logger;
/**
* A class for holding the info for objects in the model so that it can be
* shown in the attributeview in the gui
*/
public class Attributes {
/** The logger */
private static Logger log = Logger.getLogger(Attributes.class);
/** The value object */
private Object value;
/** The name */
private String name;
/** The precision of the object */
private int precision;
/**
* Constructor
* @param name The name
* @param type The type
* @param value The value
*/
public Attributes(String name, Object value, int precision) {
setName(name);
setValue(value);
setPrecision(precision);
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the precision.
*/
public int getPrecision() {
return precision;
}
/**
* @param precision The precision to set.
*/
public void setPrecision(int precision) {
this.precision = precision;
}
/**
* @return Returns the value.
*/
public Object getValue() {
return value;
}
/**
* @param value The value to set.
*/
public void setValue(Object value) {
this.value = value;
}
}
--- NEW FILE: Parametric.java ---
//---------------------------------------------------------------------------------
// $Id: Parametric.java,v 1.1 2006/01/30 11:41:12 rimestad Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.model;
import java.util.List;
/**
* Interface for objects shown by standards in the gui attributeview
*/
public interface Parametric {
/**
* 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();
}
|