Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4465
Modified Files:
AttributeView.java
Log Message:
Added support for Surfaces
Index: AttributeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AttributeView.java 1 Jul 2005 06:43:38 -0000 1.1
--- AttributeView.java 1 Jul 2005 11:26:12 -0000 1.2
***************
*** 11,16 ****
import net.sourceforge.bprocessor.kernel.notification.Notifier;
import net.sourceforge.bprocessor.model.ConstructionSpaceFacade;
- import net.sourceforge.bprocessor.model.Domain;
import net.sourceforge.bprocessor.model.FunctionalSpaceFacade;
import java.awt.GridLayout;
--- 11,16 ----
import net.sourceforge.bprocessor.kernel.notification.Notifier;
import net.sourceforge.bprocessor.model.ConstructionSpaceFacade;
import net.sourceforge.bprocessor.model.FunctionalSpaceFacade;
+ import net.sourceforge.bprocessor.model.SurfaceFacade;
import java.awt.GridLayout;
***************
*** 36,40 ****
/** Current object */
! private Domain current;
/**
--- 36,40 ----
/** Current object */
! private Object current;
/**
***************
*** 79,82 ****
--- 79,90 ----
repaint();
+ } else if (type.equals(Notification.SURFACE_SELECTED)) {
+ SurfaceFacade sf = SurfaceFacade.getInstance();
+
+ current = sf.findById(n.getObject());
+
+ ap.display(current);
+
+ repaint();
}
}
***************
*** 89,93 ****
public boolean isNotificationEnabled(String type) {
if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) ||
! type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) {
return true;
}
--- 97,102 ----
public boolean isNotificationEnabled(String type) {
if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) ||
! type.equals(Notification.CONSTRUCTION_SPACE_SELECTED) ||
! type.equals(Notification.SURFACE_SELECTED)) {
return true;
}
***************
*** 99,104 ****
*/
class AttributesPanel extends JPanel {
! /** Current domain */
! private Domain current;
/**
--- 108,113 ----
*/
class AttributesPanel extends JPanel {
! /** Current object */
! private Object current;
/**
***************
*** 110,118 ****
/**
! * Display the domain
! * @param d The domain
*/
! void display(Domain d) {
! current = d;
List names = new ArrayList();
--- 119,127 ----
/**
! * Display the object
! * @param o The object
*/
! void display(Object o) {
! current = o;
List names = new ArrayList();
|