Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6559/src/net/sourceforge/bprocessor/gui/attrview
Modified Files:
GenericPanel.java
Log Message:
Fixed minor bugs, and made spaces on surfaces to links
Index: GenericPanel.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** GenericPanel.java 7 Mar 2006 22:54:44 -0000 1.9
--- GenericPanel.java 7 Mar 2006 23:06:35 -0000 1.10
***************
*** 26,34 ****
--- 26,38 ----
import net.sourceforge.bprocessor.model.Attribute;
import net.sourceforge.bprocessor.model.Camera;
+ import net.sourceforge.bprocessor.model.ConstructionSpace;
import net.sourceforge.bprocessor.model.Description;
import net.sourceforge.bprocessor.model.Entity;
+ import net.sourceforge.bprocessor.model.FunctionalSpace;
+ import net.sourceforge.bprocessor.model.Material;
import net.sourceforge.bprocessor.model.Parametric;
import net.sourceforge.bprocessor.model.Project;
import net.sourceforge.bprocessor.model.Selection;
+ import net.sourceforge.bprocessor.model.Surface;
/**
***************
*** 139,144 ****
//da.addMouseListener(this);
where.add(new AttributeRow(da));
! } else if (a.getValue() instanceof Entity) {
! // Handles the description field
LinkAttribute la = new LinkAttribute(a);
la.addLinkAttributeListener(new AttributeListener() {
--- 143,149 ----
//da.addMouseListener(this);
where.add(new AttributeRow(da));
! } else if (a.getValue() instanceof Surface || a.getValue() instanceof FunctionalSpace
! || a.getValue() instanceof ConstructionSpace) {
! // Handles the links
LinkAttribute la = new LinkAttribute(a);
la.addLinkAttributeListener(new AttributeListener() {
***************
*** 157,161 ****
//da.addMouseListener(this);
where.add(new AttributeRow(la));
! } else {
log.info("[GenericPanel] Something were not implemented");
}
--- 162,183 ----
//da.addMouseListener(this);
where.add(new AttributeRow(la));
! } else if (a.getValue() instanceof Material) {
! // Handles the materials
! MaterialAttribute ma = new MaterialAttribute(a);
! ma.addMaterialAttributeListener(new AttributeListener() {
! public void valueChanged(Attribute a) {
! obj.setAttributes(attributes);
! if (obj instanceof Entity) {
! simpleUpdate = true;
! ((Entity)obj).changed();
! } else if (obj instanceof Camera) {
! Project.getInstance().changed((Camera)obj);
! } else {
! log.info("Were not a Entity object " + obj);
! }
! }
! });
! where.add(new AttributeRow(ma));
! } else {
log.info("[GenericPanel] Something were not implemented");
}
***************
*** 173,177 ****
if (ga instanceof LinkAttribute) {
Selection.primary().set(ga.attribute().getValue());
- //Selection.primary().changed();
} else {
if (current != null) {
--- 195,198 ----
|