Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14423/src/net/sourceforge/bprocessor/model/modellor
Modified Files:
Modellor.java
Added Files:
Box.java
Log Message:
New experimental box modellor
Index: Modellor.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Modellor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Modellor.java 18 Jun 2007 09:03:43 -0000 1.12
--- Modellor.java 18 Jun 2007 13:22:01 -0000 1.13
***************
*** 125,128 ****
--- 125,137 ----
public abstract Modellor newInstance(Space space);
+
+ /**
+ * Create space
+ * @return Space
+ */
+ public Space createSpace() {
+ return null;
+ }
+
/**
* Get parameter block for element
***************
*** 221,223 ****
--- 230,240 ----
setAttributes(map);
}
+
+ /**
+ *
+ * @return true if modern
+ */
+ public boolean modern() {
+ return false;
+ }
}
--- NEW FILE: Box.java ---
//---------------------------------------------------------------------------------
// $Id: Box.java,v 1.1 2007/06/18 13:22:01 henryml 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.modellor;
import java.util.List;
import java.util.Map;
import net.sourceforge.bprocessor.model.Attribute;
import net.sourceforge.bprocessor.model.Project;
import net.sourceforge.bprocessor.model.Space;
/**
*
*/
public class Box extends Modellor {
private Space union;
private Space space;
/**
*
*/
public Box() {
// TODO Auto-generated constructor stub
}
/**
* Constructs modellor
* @param union Union
*/
public Box(Space union) {
this.union = union;
union.setModellor(this);
space = new Space("Interior", Space.CONSTRUCTION, Space.SPACE_LEVEL, true);
union.add(space);
}
/** {@inheritDoc} */
@Override
public void getAttributes(List<Attribute> attributes) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public void getSubContent(Map<String, Object> map) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public int getUseableLevel() {
return Space.PROJECT_LEVEL;
}
/** {@inheritDoc} */
@Override
public Modellor newInstance(Space space) {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public void setAttributes(Map<String, Attribute> map) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public void setSubContent(Map<String, Object> map) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public void update(Object entity) {
System.out.println("update " + space);
}
/** {@inheritDoc} */
@Override
public void delete() {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
public String getGeneralName() {
return "Box";
}
/**
* {@inheritDoc}
*/
public String getName() {
return "Settings";
}
/**
* {@inheritDoc}
*/
public boolean modern() {
return true;
}
/**
* {@inheritDoc}
*/
public Space createSpace() {
Space union = new Space("Box", Space.CONSTRUCTION, Space.SPACE_LEVEL, true);
union.setUnion(true);
Modellor modellor = new Box(union);
Project.getInstance().addObserver(modellor);
return union;
}
}
|