Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20305/src/net/sourceforge/bprocessor/gui/attrview
Modified Files:
GenericAttribute.java StringAttribute.java GenericPanel.java
Log Message:
Removed the update method from the attributes and let the genericPanel do the cleaning and re - building of the attributeview
Index: StringAttribute.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/StringAttribute.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StringAttribute.java 13 Feb 2006 21:16:39 -0000 1.5
--- StringAttribute.java 15 Feb 2006 11:12:51 -0000 1.6
***************
*** 239,243 ****
editor.removeKeyListener(this);
editor = null;
! component.add(createValueLabel((String)attribute.getValue()));
component.revalidate();
}
--- 239,243 ----
editor.removeKeyListener(this);
editor = null;
! component.add(createValueLabel(attribute.getValue()));
component.revalidate();
}
***************
*** 245,257 ****
/**
- * Update the content
- */
- public void update() {
- component.remove(0);
- component.add(createValueLabel((String)attribute.getValue()));
- component.revalidate();
- }
-
- /**
* Respond to the enter key by stopping editing.
* @param event The KeyEvent
--- 245,248 ----
Index: GenericPanel.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** GenericPanel.java 13 Feb 2006 21:16:39 -0000 1.6
--- GenericPanel.java 15 Feb 2006 11:12:51 -0000 1.7
***************
*** 8,12 ****
import java.awt.BorderLayout;
- import java.awt.Component;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
--- 8,11 ----
***************
*** 116,120 ****
where.add(more);
} else {
! System.out.println("[GenericPanel] Something were not implemented");
}
}
--- 115,119 ----
where.add(more);
} else {
! log.info("[GenericPanel] Something were not implemented");
}
}
***************
*** 235,244 ****
*/
public void update() {
! Component[] c = content.getComponents();
! for (int i = 0; i < content.getComponentCount(); i++) {
! if (c[i] instanceof GenericAttribute) {
! ((GenericAttribute)c[i]).update();
! }
! }
revalidate();
}
--- 234,240 ----
*/
public void update() {
! //FIXME need to delay call to a reasonable time
! content.removeAll();
! generateContent(obj.getAttributes(), content);
revalidate();
}
Index: GenericAttribute.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericAttribute.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** GenericAttribute.java 11 Feb 2006 18:02:40 -0000 1.2
--- GenericAttribute.java 15 Feb 2006 11:12:51 -0000 1.3
***************
*** 50,56 ****
public abstract void cancelEditing();
- /**
- * Update the content
- */
- public abstract void update();
}
--- 50,52 ----
|