Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18193/src/net/sourceforge/bprocessor/gui/treeview
Modified Files:
GenericTreeView.java
Log Message:
another step in instance/container refactor
Index: GenericTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v
retrieving revision 1.132
retrieving revision 1.133
diff -C2 -d -r1.132 -r1.133
*** GenericTreeView.java 12 Dec 2007 12:02:28 -0000 1.132
--- GenericTreeView.java 12 Dec 2007 14:12:19 -0000 1.133
***************
*** 632,636 ****
super(space);
if (space.isInstance()) {
! makeInstanceContent(space);
} else if (space.isContainer()) {
makeContainerContent(space);
--- 632,636 ----
super(space);
if (space.isInstance()) {
! makeInstanceContent((Instance) space);
} else if (space.isContainer()) {
makeContainerContent(space);
***************
*** 646,650 ****
*/
private void makeContainerContent(Space space) {
- Set surfaces = space.getEnvelope();
add(new EnvelopeContainer("Envelope", space));
String lvlstr = Space.levelToString(space.getLevel() + 1);
--- 646,649 ----
***************
*** 664,668 ****
* @param space The space
*/
! private void makeInstanceContent(Space space) {
Set surfaces = space.getEnvelope();
add(new SurfaceContainer("Envelope", surfaces, false));
--- 663,667 ----
* @param space The space
*/
! private void makeInstanceContent(Instance space) {
Set surfaces = space.getEnvelope();
add(new SurfaceContainer("Envelope", surfaces, false));
***************
*** 683,693 ****
Space s = (Space)o;
if (s.isInstance()) {
if (this.getChildCount() == 3) {
! ((GenericNode)getChildAt(0)).update(s.getEnvelope());
! ((GenericNode)getChildAt(1)).update(s.getProto());
! ((GenericNode)getChildAt(2)).update(s.getInstanceAnchor());
} else {
removeAllChildren();
! makeInstanceContent(s);
model.nodeStructureChanged(this);
}
--- 682,693 ----
Space s = (Space)o;
if (s.isInstance()) {
+ Instance instance = (Instance) s;
if (this.getChildCount() == 3) {
! ((GenericNode)getChildAt(0)).update(instance.getEnvelope());
! ((GenericNode)getChildAt(1)).update(instance.getProto());
! ((GenericNode)getChildAt(2)).update(instance.getInstanceAnchor());
} else {
removeAllChildren();
! makeInstanceContent(instance);
model.nodeStructureChanged(this);
}
|