Update of /cvsroot/bprocessor//gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10137/src/net/sourceforge/bprocessor/gui/attrview
Modified Files:
GenericPanel.java
Log Message:
didn't paint parameters when repainting, refactored to one methodcall do it all that both paint and update paint calls
Index: GenericPanel.java
===================================================================
RCS file: /cvsroot/bprocessor//gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** GenericPanel.java 8 May 2007 12:34:06 -0000 1.37
--- GenericPanel.java 24 May 2007 21:43:07 -0000 1.38
***************
*** 71,80 ****
this.content = Box.createVerticalBox();
obj = param;
! attributes = param.getAttributes();
! generateContent(attributes, content);
! if (param instanceof Entity) {
! Entity paramEnt = (Entity)param;
! generateContent(paramEnt.getParameters().getAttributes(), content);
! }
Box title = Box.createVerticalBox();
Box header = Box.createHorizontalBox();
--- 71,75 ----
this.content = Box.createVerticalBox();
obj = param;
! generateContentFor(param);
Box title = Box.createVerticalBox();
Box header = Box.createHorizontalBox();
***************
*** 94,97 ****
--- 89,101 ----
addMouseListener(this);
}
+
+ private void generateContentFor(Parametric param) {
+ attributes = param.getAttributes();
+ generateContent(attributes, content);
+ if (param instanceof Entity) {
+ Entity paramEnt = (Entity)param;
+ generateContent(paramEnt.getParameters().getAttributes(), content);
+ }
+ }
/**
***************
*** 388,394 ****
//FIXME need to delay call to a reasonable time
content.removeAll();
! attributes = obj.getAttributes();
! genAttributes.clear();
! generateContent(attributes, content);
revalidate();
}
--- 392,396 ----
//FIXME need to delay call to a reasonable time
content.removeAll();
! generateContentFor(obj);
revalidate();
}
|