Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21509/src/net/sourceforge/bprocessor/gui/attrview
Modified Files:
ClassificationTextAttribute.java GenericPanel.java
Log Message:
Implemented produkttypes for the classifications
Index: GenericPanel.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** GenericPanel.java 16 Nov 2006 23:20:04 -0000 1.28
--- GenericPanel.java 17 Dec 2006 20:24:12 -0000 1.29
***************
*** 209,213 ****
where.add(new AttributeRow(catext));
if (a.getClassification() != null &&
! !a.getClassification().getId().equalsIgnoreCase("-1")) {
// Handles the id part of classification
ClassificationIdAttribute caid = new ClassificationIdAttribute(a);
--- 209,214 ----
where.add(new AttributeRow(catext));
if (a.getClassification() != null &&
! !a.getClassification().getId().equalsIgnoreCase("-1") &&
! a.getLevel() != 4) {
// Handles the id part of classification
ClassificationIdAttribute caid = new ClassificationIdAttribute(a);
Index: ClassificationTextAttribute.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/ClassificationTextAttribute.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ClassificationTextAttribute.java 16 Nov 2006 23:20:04 -0000 1.3
--- ClassificationTextAttribute.java 17 Dec 2006 20:24:12 -0000 1.4
***************
*** 57,60 ****
--- 57,63 ----
private JLabel icon;
+ /** The label */
+ private JLabel label;
+
/** The popup menu */
private JPopupMenu classification;
***************
*** 71,75 ****
public ClassificationTextAttribute(Attribute attribute) {
super(BoxLayout.X_AXIS);
!
this.attribute = attribute;
this.listeners = new LinkedList();
--- 74,78 ----
public ClassificationTextAttribute(Attribute attribute) {
super(BoxLayout.X_AXIS);
! label = new JLabel(attribute.getName() + ": ");
this.attribute = attribute;
this.listeners = new LinkedList();
***************
*** 77,87 ****
component = Box.createHorizontalBox();
if (attribute.getClassification() != null) {
! component.add((JLabel) createValueLabel(attribute.getClassification()));
} else {
! component.add(new JLabel("Classification"));
}
createMenu(attribute.getValue());
Box header = Box.createHorizontalBox();
header.add(Box.createHorizontalStrut(7));
header.add(component);
header.add(Box.createHorizontalGlue());
--- 80,96 ----
component = Box.createHorizontalBox();
if (attribute.getClassification() != null) {
! JLabel cur = (JLabel) createValueLabel(attribute.getClassification());
! cur.setFont(AttributeView.FONT_PLAIN);
! component.add(cur);
} else {
! JLabel cur = new JLabel("unassigned");
! cur.setFont(AttributeView.FONT_PLAIN);
! component.add(cur);
}
createMenu(attribute.getValue());
Box header = Box.createHorizontalBox();
header.add(Box.createHorizontalStrut(7));
+
+ header.add(label);
header.add(component);
header.add(Box.createHorizontalGlue());
***************
*** 102,105 ****
--- 111,115 ----
*/
public void addMouseListener(MouseListener mouseListener) {
+ label.addMouseListener(mouseListener);
component.addMouseListener(mouseListener);
icon.addMouseListener(this);
***************
*** 299,303 ****
if (((Classification) attribute.getValue()).getType() == 0) {
cur.addAll(Project.getInstance().getClassification("-99", 0).getChildren());
! } else {
cur.addAll(Project.getInstance().getClassification("-99", 1).getChildren());
}
--- 309,314 ----
if (((Classification) attribute.getValue()).getType() == 0) {
cur.addAll(Project.getInstance().getClassification("-99", 0).getChildren());
! }
! if (((Classification) attribute.getValue()).getType() == 0) {
cur.addAll(Project.getInstance().getClassification("-99", 1).getChildren());
}
|