bprocessor-commit Mailing List for B-processor (Page 48)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <he...@us...> - 2007-10-18 13:47:42
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17054/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java Removed Files: ClassificationIdAttribute.java Log Message: got rid of some code Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** GenericPanel.java 18 Oct 2007 11:54:36 -0000 1.43 --- GenericPanel.java 18 Oct 2007 13:47:43 -0000 1.44 *************** *** 25,33 **** import javax.swing.border.TitledBorder; - import org.apache.log4j.Logger; - import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Camera; - import net.sourceforge.bprocessor.model.Classification; import net.sourceforge.bprocessor.model.Description; import net.sourceforge.bprocessor.model.Entity; --- 25,30 ---- *************** *** 42,48 **** */ class GenericPanel extends JPanel implements MouseListener { - /** The logger */ - private static Logger log = Logger.getLogger(GenericPanel.class); - /** The current object shown */ private Parametric obj; --- 39,42 ---- *************** *** 185,188 **** --- 179,184 ---- } + + private void handleClassification(Attribute attribute, JComponent where) { ClassificationTextAttribute catext = new ClassificationTextAttribute(attribute); *************** *** 200,224 **** genAttributes.add(catext); where.add(new AttributeRow(catext)); - if (attribute.getValue() instanceof Classification) { - Classification c = (Classification)attribute.getValue(); - if (c != null && !c.getId().equalsIgnoreCase("-1") && - attribute.getName().equalsIgnoreCase("Classification")) { - // Handles the id part of classification - ClassificationIdAttribute caid = new ClassificationIdAttribute(attribute); - caid.addClassificationAttributeListener(new AttributeListener() { - public void valueChanged(Attribute a) { - obj.setAttributes(attributes); - if (obj instanceof Entity) { - simpleUpdate = true; - ((Entity)obj).changed(); - } else if (obj instanceof Camera) { - Project.getInstance().changed((Camera)obj); - } - } - }); - genAttributes.add(caid); - where.add(new AttributeRow(caid)); - } - } } --- 196,199 ---- --- ClassificationIdAttribute.java DELETED --- |
From: Michael L. <he...@us...> - 2007-10-18 12:30:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18770/src/net/sourceforge/bprocessor/model Modified Files: Classification.java Log Message: a random change that produces same result.. Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Classification.java 9 Aug 2007 16:07:53 -0000 1.21 --- Classification.java 18 Oct 2007 12:30:18 -0000 1.22 *************** *** 8,23 **** import java.util.ArrayList; - import java.util.Iterator; import java.util.List; - import org.apache.log4j.Logger; - /** * This class persist the model from/to an XML document */ public class Classification extends Structure<Classification> implements Parametric { - /** The logger */ - private static Logger log = Logger.getLogger(Classification.class); - /** The id of the classification */ private String id; --- 8,17 ---- *************** *** 171,175 **** res.add(new Attribute("Name", getName(), false)); res.add(new Attribute("Code", getFullId(null), false)); ! res.add(new Attribute("Classification Type", null, possibleTypes)); return res; } --- 165,169 ---- res.add(new Attribute("Name", getName(), false)); res.add(new Attribute("Code", getFullId(null), false)); ! res.add(new Attribute("Classification Type", possibleTypes, false)); return res; } *************** *** 185,192 **** */ public void setAttributes(List<Attribute> attributes) { - Iterator iter = attributes.iterator(); - while (iter.hasNext()) { - Attribute a = (Attribute)iter.next(); - } } } --- 179,182 ---- |
From: Michael L. <he...@us...> - 2007-10-18 11:59:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6409/src/net/sourceforge/bprocessor/model Modified Files: Attribute.java Log Message: removed some code Index: Attribute.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Attribute.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Attribute.java 11 Oct 2007 10:21:46 -0000 1.23 --- Attribute.java 18 Oct 2007 11:59:20 -0000 1.24 *************** *** 35,58 **** private Space level; - /** The precision of the object */ - private int precision; - /** If the attribute can be modified or not */ private boolean editable; - - /** - * Constructor - * @param name The name - * @param value The value - * @param precision The precision - */ - public Attribute(String name, Object value, int precision) { - setName(name); - setValue(value); - setPrecision(precision); - editable = true; - } - /** * True if the attribute is editable --- 35,41 ---- *************** *** 77,81 **** */ public Attribute(String name, Object value) { ! this(name, value, 0); } --- 60,66 ---- */ public Attribute(String name, Object value) { ! setName(name); ! setValue(value); ! editable = true; } *************** *** 135,153 **** this.name = name; } ! ! /** ! * @return Returns the precision. ! */ ! public int getPrecision() { ! return precision; ! } ! ! /** ! * @param precision The precision to set. ! */ ! public void setPrecision(int precision) { ! this.precision = precision; ! } ! /** * @return Returns the value. --- 120,124 ---- this.name = name; } ! /** * @return Returns the value. |
From: Michael L. <he...@us...> - 2007-10-18 11:54:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4471/src/net/sourceforge/bprocessor/model Modified Files: Command.java Added Files: Operation.java Log Message: refactor --- NEW FILE: Operation.java --- //--------------------------------------------------------------------------------- // $Id: Operation.java,v 1.1 2007/10/18 11:54:40 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; /** * */ public class Operation { /** * Retruns the name of this Operation * @return the name of this Operation */ public String name() { return "!"; } } Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Command.java 18 Oct 2007 09:27:24 -0000 1.2 --- Command.java 18 Oct 2007 11:54:40 -0000 1.3 *************** *** 8,15 **** package net.sourceforge.bprocessor.model; /** * Command */ ! public class Command { ! } --- 8,33 ---- package net.sourceforge.bprocessor.model; + import java.util.LinkedList; + import java.util.List; + + /** * Command */ ! public class Command implements Parametric { ! ! /** {@inheritDoc} */ ! public List<Attribute> getAttributes() { ! List<Attribute> attributes = new LinkedList(); ! return attributes; ! } ! ! /** {@inheritDoc} */ ! public String getGeneralName() { ! return "Command"; ! } ! ! /** {@inheritDoc} */ ! public void setAttributes(List<Attribute> attributes) { ! } } |
From: Michael L. <he...@us...> - 2007-10-18 11:54:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4454/src/net/sourceforge/bprocessor/gui/attrview Modified Files: ClassificationIdAttribute.java GenericPanel.java Log Message: refactor Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** GenericPanel.java 18 Oct 2007 08:46:34 -0000 1.42 --- GenericPanel.java 18 Oct 2007 11:54:36 -0000 1.43 *************** *** 49,53 **** /** The list of attributes */ ! private List attributes; /** The list of generic attributes */ --- 49,53 ---- /** The list of attributes */ ! private List<Attribute> attributes; /** The list of generic attributes */ *************** *** 102,148 **** } ! /** ! * local method for generating the content ! * @param what The list of attributes ! * @param where The place to put all the generated content; ! */ ! private void generateContent(List what, JComponent where) { ! Iterator iter = what.iterator(); ! while (iter.hasNext()) { ! Attribute a = (Attribute)iter.next(); ! if (a.getValue() instanceof String || a.getValue() instanceof Double) { ! // All the simple types in a field just for editing ! StringAttribute sa = new StringAttribute(a); ! sa.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(sa); ! where.add(new AttributeRow(sa)); ! } else if (a.getValue() instanceof List) { ! // Take care of all list attributes ! List elems = (List)a.getValue(); ! Iterator iterElems = elems.iterator(); ! Box more = Box.createVerticalBox(); ! TitledBorder b = BorderFactory.createTitledBorder( ! BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), ! a.getName()); ! b.setTitleJustification(TitledBorder.CENTER); ! more.setBorder(b); ! if (iterElems.next() instanceof Attribute) { ! generateContent(elems, more); ! } ! where.add(more); ! } else if (a.getValue() instanceof Description) { ! // Handles the description field ! DescriptionAttribute da = new DescriptionAttribute(a); ! da.addDescriptionAttributeListener(new AttributeListener() { public void valueChanged(Attribute a) { obj.setAttributes(attributes); --- 102,210 ---- } ! private void handleString(Attribute attribute, JComponent where) { ! StringAttribute sa = new StringAttribute(attribute); ! sa.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(sa); ! where.add(new AttributeRow(sa)); ! } ! ! private void handleList(Attribute attribute, JComponent where) { ! List elems = (List) attribute.getValue(); ! Iterator iterElems = elems.iterator(); ! Box more = Box.createVerticalBox(); ! TitledBorder b = BorderFactory.createTitledBorder( ! BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), ! attribute.getName()); ! b.setTitleJustification(TitledBorder.CENTER); ! more.setBorder(b); ! if (iterElems.next() instanceof Attribute) { ! generateContent(elems, more); ! } ! where.add(more); ! } ! ! private void handleDescription(Attribute attribute, JComponent where) { ! DescriptionAttribute da = new DescriptionAttribute(attribute); ! da.addDescriptionAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(da); ! where.add(new AttributeRow(da)); ! } ! ! private void handleMaterial(Attribute attribute, JComponent where) { ! MaterialAttribute ma = new MaterialAttribute(attribute); ! ma.addMaterialAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(ma); ! where.add(new AttributeRow(ma)); ! } ! ! private void handleBoolean(Attribute attribute, JComponent where) { ! BooleanAttribute ba = new BooleanAttribute(attribute); ! ba.addBooleanAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(ba); ! where.add(new AttributeRow(ba)); ! } ! ! private void handleClassification(Attribute attribute, JComponent where) { ! ClassificationTextAttribute catext = new ClassificationTextAttribute(attribute); ! catext.addClassificationAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(catext); ! where.add(new AttributeRow(catext)); ! if (attribute.getValue() instanceof Classification) { ! Classification c = (Classification)attribute.getValue(); ! if (c != null && !c.getId().equalsIgnoreCase("-1") && ! attribute.getName().equalsIgnoreCase("Classification")) { ! // Handles the id part of classification ! ClassificationIdAttribute caid = new ClassificationIdAttribute(attribute); ! caid.addClassificationAttributeListener(new AttributeListener() { public void valueChanged(Attribute a) { obj.setAttributes(attributes); *************** *** 155,265 **** } }); ! genAttributes.add(da); ! where.add(new AttributeRow(da)); ! } else if (a.getValue() instanceof Material) { ! // Handles the materials ! MaterialAttribute ma = new MaterialAttribute(a); ! ma.addMaterialAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } } ! }); ! genAttributes.add(ma); ! where.add(new AttributeRow(ma)); } else if (a.getValue() instanceof Boolean) { ! // Handles the booleans ! BooleanAttribute ba = new BooleanAttribute(a); ! ba.addBooleanAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(ba); ! where.add(new AttributeRow(ba)); } else if (a.getThe2ndValue() instanceof Structure) { ! // Handles the text part classification ! ClassificationTextAttribute catext = new ClassificationTextAttribute(a); ! catext.addClassificationAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(catext); ! where.add(new AttributeRow(catext)); ! if (a.getValue() instanceof Classification) { ! Classification c = (Classification)a.getValue(); ! if (c != null && !c.getId().equalsIgnoreCase("-1") && ! a.getName().equalsIgnoreCase("Classification")) { ! // Handles the id part of classification ! ClassificationIdAttribute caid = new ClassificationIdAttribute(a); ! caid.addClassificationAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(caid); ! where.add(new AttributeRow(caid)); ! } ! } } else if (a.getValue() instanceof Selector) { ! Selector s = (Selector)a.getValue(); ! SelectorAttribute satt = new SelectorAttribute(a); ! satt.addItemListener(new SelectorListener(s) { ! public void itemStateChanged(ItemEvent e) { ! if (e.getStateChange() == e.SELECTED) { ! getSelector().setCurrentValue(e.getItem()); ! if (obj instanceof Entity) { ! obj.setAttributes(attributes); ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! } ! }); ! genAttributes.add(satt); ! where.add(new AttributeRow(satt)); } else if (a.getValue() instanceof Parametric) { ! // Handles the links ! LinkAttribute la = new LinkAttribute(a); ! la.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(la); ! where.add(new AttributeRow(la)); ! } else { ! log.info("[GenericPanel] Something were not implemented"); } } --- 217,283 ---- } }); ! genAttributes.add(caid); ! where.add(new AttributeRow(caid)); ! } ! } ! } ! ! private void handleSelector(Attribute attribute, JComponent where) { ! Selector s = (Selector)attribute.getValue(); ! SelectorAttribute satt = new SelectorAttribute(attribute); ! satt.addItemListener(new SelectorListener(s) { ! public void itemStateChanged(ItemEvent e) { ! if (e.getStateChange() == ItemEvent.SELECTED) { ! getSelector().setCurrentValue(e.getItem()); ! if (obj instanceof Entity) { obj.setAttributes(attributes); ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); } ! } ! } ! }); ! genAttributes.add(satt); ! where.add(new AttributeRow(satt)); ! } ! ! private void handleLink(Attribute attribute, JComponent where) { ! LinkAttribute la = new LinkAttribute(attribute); ! la.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); ! genAttributes.add(la); ! where.add(new AttributeRow(la)); ! } ! ! private void generateContent(List what, JComponent where) { ! Iterator iter = what.iterator(); ! while (iter.hasNext()) { ! Attribute a = (Attribute)iter.next(); ! if (a.getValue() instanceof String || a.getValue() instanceof Double) { ! handleString(a, where); ! } else if (a.getValue() instanceof List) { ! handleList(a, where); ! } else if (a.getValue() instanceof Description) { ! handleDescription(a, where); ! } else if (a.getValue() instanceof Material) { ! handleMaterial(a, where); } else if (a.getValue() instanceof Boolean) { ! handleBoolean(a, where); } else if (a.getThe2ndValue() instanceof Structure) { ! handleClassification(a, where); } else if (a.getValue() instanceof Selector) { ! handleSelector(a, where); } else if (a.getValue() instanceof Parametric) { ! handleLink(a, where); } } Index: ClassificationIdAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/ClassificationIdAttribute.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ClassificationIdAttribute.java 10 Aug 2007 09:26:57 -0000 1.7 --- ClassificationIdAttribute.java 18 Oct 2007 11:54:36 -0000 1.8 *************** *** 211,240 **** public void stopEditing() { if (editor != null) { - //Object val = attribute.getValue(); String id = editor.getText(); StringTokenizer st = new StringTokenizer(id, "."); ! Classification clas; if (((Classification) attribute.getValue()).getType() == 0) { ! clas = Project.getInstance().getConstructionClas(); } else { ! clas = Project.getInstance().getFunctionalClas(); } String curid; while (st.hasMoreTokens()) { curid = st.nextToken(); ! Iterator it = clas.getChildren().iterator(); while (it.hasNext()) { Classification current = (Classification) it.next(); if (curid.equalsIgnoreCase(current.getId())) { ! clas = current; } } } ! attribute.setThe2ndValue(clas); component.remove(editor); editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel(clas.getFullId(attribute.getLevel()))); component.revalidate(); valueChanged(); --- 211,239 ---- public void stopEditing() { if (editor != null) { String id = editor.getText(); StringTokenizer st = new StringTokenizer(id, "."); ! Classification classification; if (((Classification) attribute.getValue()).getType() == 0) { ! classification = Project.getConstructionClas(); } else { ! classification = Project.getFunctionalClas(); } String curid; while (st.hasMoreTokens()) { curid = st.nextToken(); ! Iterator it = classification.getChildren().iterator(); while (it.hasNext()) { Classification current = (Classification) it.next(); if (curid.equalsIgnoreCase(current.getId())) { ! classification = current; } } } ! attribute.setThe2ndValue(classification); component.remove(editor); editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel(classification.getFullId(attribute.getLevel()))); component.revalidate(); valueChanged(); |
From: Michael L. <he...@us...> - 2007-10-18 11:54:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4454/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: refactor Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** PopupMenu.java 15 Oct 2007 12:43:56 -0000 1.44 --- PopupMenu.java 18 Oct 2007 11:54:36 -0000 1.45 *************** *** 30,33 **** --- 30,34 ---- import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Camera; + import net.sourceforge.bprocessor.model.Command; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Entity; *************** *** 546,559 **** public static JPopupMenu getBackgroundMenu() { JPopupMenu menu = new JPopupMenu(); ! AbstractAction copyEnvelope = new AbstractAction("Copy Envelope of Owner") { ! public void actionPerformed(ActionEvent arg0) { ! Space space = Project.getInstance().getActiveSpace(); ! if (space != Project.getInstance().world()) { ! space.copyOwnerEnvelope(); ! space.changed(); ! } } }; ! menu.add(copyEnvelope); return menu; } --- 547,558 ---- public static JPopupMenu getBackgroundMenu() { JPopupMenu menu = new JPopupMenu(); ! AbstractAction action = new AbstractAction("Command") { ! public void actionPerformed(ActionEvent event) { ! System.out.println("-- action --"); ! Command command = new Command(); ! AttributeView.instance().display(command); } }; ! menu.add(action); return menu; } |
From: Michael L. <he...@us...> - 2007-10-18 09:27:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12837/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: Command class cleared Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Command.java 11 Jan 2006 10:04:36 -0000 1.1 --- Command.java 18 Oct 2007 09:27:24 -0000 1.2 *************** *** 9,34 **** /** ! * Command interface for representing undoable commands. */ ! public interface Command { ! /** ! * Apply this Command ! */ ! public void apply(); ! ! /** ! * Undo this Command ! */ ! public void undo(); ! ! /** ! * Redo this Command ! */ ! public void redo(); - /** - * Return the name for display in menues etc. - * @return The display name - */ - public String name(); } --- 9,15 ---- /** ! * Command */ ! public class Command { } |
From: Michael L. <he...@us...> - 2007-10-18 09:19:26
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9671/src/net/sourceforge/bprocessor/model Modified Files: History.java Log Message: History class cleared Index: History.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/History.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** History.java 11 Jan 2006 10:19:58 -0000 1.1 --- History.java 18 Oct 2007 09:19:28 -0000 1.2 *************** *** 8,107 **** package net.sourceforge.bprocessor.model; - import java.util.Stack; - /** ! * The History for containing commands for undo and redo support */ public class History { - /** The undo stack */ - private Stack undoStack; - - /** The redo stack */ - private Stack redoStack; - - /** A singular history instance */ - private static History instance = new History(); - - /** - * Return the singular history instance - * @return The history - */ - public static History getInstance() { - return instance; - } - - /** - * Constructor for History - */ - public History() { - undoStack = new Stack(); - redoStack = new Stack(); - } - - /** - * Apply a command, clear the redo stack and - * push the new command on the undo stack. - * @param command The command to apply - */ - public void apply(Command command) { - command.apply(); - redoStack.clear(); - undoStack.push(command); - } - - /** - * Undo the command on top of undo stack and push - * it on the redo stack - */ - public void undo() { - if (!undoStack.isEmpty()) { - Command top = (Command) undoStack.pop(); - top.undo(); - redoStack.push(top); - } - } - - /** - * Redo the command on top of redo stack and push - * it on the undo stack - */ - public void redo() { - if (!redoStack.isEmpty()) { - Command top = (Command) redoStack.pop(); - top.redo(); - undoStack.push(top); - } - } - /** - * Return the top of the undo stack or null if empty. - * @return The top of the undo stack - */ - public Command undoTop() { - if (!undoStack.isEmpty()) { - return (Command) undoStack.peek(); - } else { - return null; - } - } - - /** - * Return the top of the redo stack or null if empty. - * @return The top of the redo stack - */ - public Command redoTop() { - if (!redoStack.isEmpty()) { - return (Command) redoStack.peek(); - } else { - return null; - } - } - - /** - * Clear this History - */ - public void clear() { - undoStack.clear(); - redoStack.clear(); - } } --- 8,15 ---- package net.sourceforge.bprocessor.model; /** ! * History */ public class History { } |
From: Michael L. <he...@us...> - 2007-10-18 08:46:37
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29183/src/net/sourceforge/bprocessor/model Modified Files: Entity.java Log Message: avoids creating parameterblock in entity when not needed Index: Entity.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Entity.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Entity.java 13 Aug 2007 11:36:21 -0000 1.20 --- Entity.java 18 Oct 2007 08:46:37 -0000 1.21 *************** *** 26,30 **** /** Parameterblock for extra parameters */ ! private ParameterBlock parameters = new ParameterBlock(); /** --- 26,30 ---- /** Parameterblock for extra parameters */ ! private ParameterBlock parameters; /** |
From: Michael L. <he...@us...> - 2007-10-18 08:46:31
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29175/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java Log Message: avoids creating parameterblock in entity when not needed Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** GenericPanel.java 10 Aug 2007 09:26:57 -0000 1.41 --- GenericPanel.java 18 Oct 2007 08:46:34 -0000 1.42 *************** *** 91,100 **** } ! private void generateContentFor(Parametric param) { ! attributes = param.getAttributes(); generateContent(attributes, content); ! if (param instanceof Entity) { ! Entity paramEnt = (Entity)param; ! generateContent(paramEnt.getParameters().getAttributes(), content); } } --- 91,102 ---- } ! private void generateContentFor(Parametric parametric) { ! attributes = parametric.getAttributes(); generateContent(attributes, content); ! if (parametric instanceof Entity) { ! Entity entity = (Entity) parametric; ! if (entity.getParameters() != null) { ! generateContent(entity.getParameters().getAttributes(), content); ! } } } |
From: Michael L. <he...@us...> - 2007-10-18 08:46:30
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29167/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: avoids creating parameterblock in entity when not needed Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** NetFacadeModellor.java 9 Aug 2007 16:04:33 -0000 1.35 --- NetFacadeModellor.java 18 Oct 2007 08:46:30 -0000 1.36 *************** *** 349,359 **** Collection<Edge> edges = n.getEdges(); for (Edge e : edges) { ! Map env = e.getParameters().environment(); if (env.get("width") == null) { ! e.getParameters().put("width", frameWidth); } } for (Surface s : n.getSurfaces()) { ! Map env = s.getParameters().environment(); if (env.get("type") == null) { List options = new LinkedList(); --- 349,369 ---- Collection<Edge> edges = n.getEdges(); for (Edge e : edges) { ! ParameterBlock parameters = e.getParameters(); ! if (parameters == null) { ! parameters = new ParameterBlock(); ! e.setParameters(parameters); ! } ! Map env = parameters.environment(); if (env.get("width") == null) { ! parameters.put("width", frameWidth); } } for (Surface s : n.getSurfaces()) { ! ParameterBlock parameters = s.getParameters(); ! if (parameters == null) { ! parameters = new ParameterBlock(); ! s.setParameters(parameters); ! } ! Map env = parameters.environment(); if (env.get("type") == null) { List options = new LinkedList(); *************** *** 363,367 **** Selector sel = new Selector(options); sel.setCurrentValue("Glass"); ! s.getParameters().put(new Attribute("type", sel)); } if (!single && (env.get("cut") == null)) { --- 373,377 ---- Selector sel = new Selector(options); sel.setCurrentValue("Glass"); ! parameters.put(new Attribute("type", sel)); } if (!single && (env.get("cut") == null)) { *************** *** 371,375 **** Selector sel = new Selector(options); sel.setCurrentValue("type1"); ! s.getParameters().put(new Attribute("cut", sel)); } } --- 381,385 ---- Selector sel = new Selector(options); sel.setCurrentValue("type1"); ! parameters.put(new Attribute("cut", sel)); } } |
From: Michael L. <he...@us...> - 2007-10-18 07:58:09
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10295/src/net/sourceforge/bprocessor/gui/actions Modified Files: ImportFileReader.java Log Message: swaps coordinates and scales in .obj reader Index: ImportFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImportFileReader.java 15 Oct 2007 12:42:51 -0000 1.3 --- ImportFileReader.java 18 Oct 2007 07:58:12 -0000 1.4 *************** *** 88,94 **** String[] lineContent = line.split("\\s"); if (lineContent[0].equals("v")) { ! Vertex v = new Vertex(Double.parseDouble(lineContent[1]), ! Double.parseDouble(lineContent[2]), ! Double.parseDouble(lineContent[3])); verts.add(v); v2es.put(v, new HashSet<Edge>()); --- 88,96 ---- String[] lineContent = line.split("\\s"); if (lineContent[0].equals("v")) { ! double x = Double.parseDouble(lineContent[1]); ! double y = Double.parseDouble(lineContent[2]); ! double z = Double.parseDouble(lineContent[3]); ! double factor = 0.1; ! Vertex v = new Vertex(z * factor, x * factor, y * factor); verts.add(v); v2es.put(v, new HashSet<Edge>()); |
From: Michael L. <he...@us...> - 2007-10-17 18:04:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6229/src/net/sourceforge/bprocessor/gui/attrview Removed Files: MyKeyListener.java AttributePanel.java MyMouseListener.java MyFocusListener.java Log Message: removed more unused code --- MyFocusListener.java DELETED --- --- MyKeyListener.java DELETED --- --- AttributePanel.java DELETED --- --- MyMouseListener.java DELETED --- |
From: Michael L. <he...@us...> - 2007-10-17 17:27:48
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23724/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java AttributePanel.java Log Message: removed unused code Index: AttributePanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributePanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AttributePanel.java 10 Apr 2006 11:54:38 -0000 1.8 --- AttributePanel.java 17 Oct 2007 17:27:44 -0000 1.9 *************** *** 27,31 **** import net.sourceforge.bprocessor.model.Vertex; - import org.apache.log4j.Logger; /** --- 27,30 ---- *************** *** 33,41 **** */ class AttributePanel extends JPanel { - /** Default serial-version-uid */ - private static final long serialVersionUID = 1L; - - /** The logger */ - private static Logger log = Logger.getLogger(AttributePanel.class); /** Current object */ --- 32,35 ---- Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** AttributeView.java 31 Jan 2007 21:01:12 -0000 1.40 --- AttributeView.java 17 Oct 2007 17:27:44 -0000 1.41 *************** *** 75,82 **** if (object instanceof Parametric) { this.add(BorderLayout.NORTH, new GenericPanel((Parametric)object)); - } else { - AttributePanel ap = new AttributePanel(); - ap.display(object); - this.add(BorderLayout.CENTER, ap); } } --- 75,78 ---- *************** *** 100,110 **** if (this.getComponents().length > 0) { Component jc = this.getComponent(0); ! if (jc instanceof AttributePanel) { ! AttributePanel ap = (AttributePanel)jc; ! Object current = ap.getCurrent(); ! if (object == current) { ! ap.display(current); ! } ! } else if (jc instanceof GenericPanel) { GenericPanel gp = (GenericPanel)jc; Object current = gp.getParametric(); --- 96,100 ---- if (this.getComponents().length > 0) { Component jc = this.getComponent(0); ! if (jc instanceof GenericPanel) { GenericPanel gp = (GenericPanel)jc; Object current = gp.getParametric(); |
From: Michael L. <he...@us...> - 2007-10-17 11:08:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv802/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: point sizes changed Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Display.java 15 Oct 2007 11:45:45 -0000 1.36 --- Display.java 17 Oct 2007 11:08:56 -0000 1.37 *************** *** 49,52 **** --- 49,53 ---- private static final boolean TRUE = true; + private static boolean initialized; private static boolean selecting; *************** *** 71,74 **** --- 72,78 ---- private static Space active; + + private static float hilitesize = 9.0f; + private static float normalsize = 7.0f; private static float[] white = new float[] {1.0f, 1.0f, 1.0f}; private static float[] black = new float[] {0.0f, 0.0f, 0.0f}; *************** *** 917,921 **** color = black; } ! paintVertices(vertices, color, 9.0f); } } --- 921,925 ---- color = black; } ! paintVertices(vertices, color, normalsize); } } *************** *** 968,978 **** for (Geometric current : geometrics) { if (current instanceof Vertex) { if (current.getOwner() != null) { ! paint((Vertex) current, redish, 9.0f); } else { if (targetColor != null) { ! paint((Vertex) current, targetColor, 6.0f); } else { ! paint((Vertex) current, blueish, 6.0f); } } --- 972,986 ---- for (Geometric current : geometrics) { if (current instanceof Vertex) { + float size = normalsize; + if (current == target) { + size = hilitesize; + } if (current.getOwner() != null) { ! paint((Vertex) current, redish, size); } else { if (targetColor != null) { ! paint((Vertex) current, targetColor, size); } else { ! paint((Vertex) current, blueish, size); } } *************** *** 1099,1103 **** color = middleblue; } ! paint(current, color, 9.0f); } } --- 1107,1111 ---- color = middleblue; } ! paint(current, color, normalsize); } } |
From: Michael L. <he...@us...> - 2007-10-17 09:08:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18041/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java DomainPopupListener.java CreateSpaceActionListener.java Log Message: clean up Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** SpaceTool.java 3 Sep 2007 11:31:34 -0000 1.86 --- SpaceTool.java 17 Oct 2007 09:08:19 -0000 1.87 *************** *** 229,232 **** --- 229,233 ---- createFuncItem.addActionListener(funcListener); + // MARK 1 JMenuItem createConstItem = new JMenuItem("New Construction " + category); ActionListener constListener = new CreateSpaceActionListener(surface, *************** *** 234,237 **** --- 235,240 ---- false); createConstItem.addActionListener(constListener); + + JMenuItem selectSpaceItem = new JMenuItem("Select " + category); selectSpaceItem.addActionListener(new SpaceMenuAction(space, "Select") { Index: CreateSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CreateSpaceActionListener.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** CreateSpaceActionListener.java 26 Sep 2007 08:36:34 -0000 1.20 --- CreateSpaceActionListener.java 17 Oct 2007 09:08:19 -0000 1.21 *************** *** 9,36 **** import net.sourceforge.bprocessor.gui.attrview.AttributeView; - import net.sourceforge.bprocessor.gui.attrview.ClassificationTextAttribute; - - import javax.swing.JButton; - import javax.swing.JDialog; - import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import java.awt.event.MouseAdapter; - import java.awt.event.MouseEvent; - - import net.sourceforge.bprocessor.model.Classification; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Space; - import org.apache.log4j.Logger; - /** * The create functional space action listener for the domain popupmenu. */ ! public class CreateSpaceActionListener extends MouseAdapter implements ActionListener { ! /** The logger */ ! private static Logger log = Logger.getLogger(CreateSpaceActionListener.class); ! /** The Surface */ private Surface surface; --- 9,22 ---- import net.sourceforge.bprocessor.gui.attrview.AttributeView; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Space; /** * The create functional space action listener for the domain popupmenu. */ ! public class CreateSpaceActionListener implements ActionListener { /** The Surface */ private Surface surface; *************** *** 42,51 **** private boolean functional; - /** The classification attribute */ - private ClassificationTextAttribute cta; - - /** The dialog window */ - private JDialog dialog; - /** * CreateSpaceActionListener --- 28,31 ---- *************** *** 62,147 **** /** ! * @param e The action event */ ! public void actionPerformed(ActionEvent e) { Space owner = surface.getOwner(); ! try { ! Space space; ! if (functional) { ! space = owner.createFunctionalSpace(""); ! } else { ! space = owner.createConstructionSpace(""); ! } ! owner.add(space); ! if (front) { ! surface.assignFront(space); ! } else { ! surface.assignBack(space); ! } ! surface.changed(); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! } catch (Exception ex) { ! ex.printStackTrace(); } ! } ! ! /** ! * Start editing ! * @param event The MouseEvent ! */ ! @Override ! public void mouseClicked(MouseEvent event) { ! cta.startEditing(); ! ! } ! ! /** ! * My action listener ! */ ! class MyActionListener implements ActionListener { ! ! /** ! * the action performed event handling ! * @param e is the action event ! */ ! public void actionPerformed(ActionEvent e) { ! String name = ((JButton) e.getSource()).getText(); ! if (name.equalsIgnoreCase("Ok")) { ! if (cta.attribute().getThe2ndValue() != null) { ! Space owner = surface.getOwner(); ! ! if (cta.attribute().getThe2ndValue() != null) { ! try { ! Space space; ! if (functional) { ! space = owner.createFunctionalSpace( ! (Classification)cta.attribute().getThe2ndValue()); ! } else { ! space = owner.createConstructionSpace( ! (Classification)cta.attribute().getThe2ndValue()); ! } ! owner.add(space); ! if (front) { ! surface.assignFront(space); ! } else { ! surface.assignBack(space); ! } ! surface.changed(); ! Project.getInstance().checkpoint(); ! } catch (Exception ex) { ! ex.printStackTrace(); ! } ! } ! dialog.setVisible(false); ! } ! } ! ! if (name.equalsIgnoreCase("Cancel")) { ! dialog.setVisible(false); ! ! } } ! } } --- 42,64 ---- /** ! * @param event The action event */ ! public void actionPerformed(ActionEvent event) { Space owner = surface.getOwner(); ! Space space; ! if (functional) { ! space = owner.createFunctionalSpace(""); ! } else { ! space = owner.createConstructionSpace(""); } ! owner.add(space); ! if (front) { ! surface.assignFront(space); ! } else { ! surface.assignBack(space); } ! surface.changed(); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); } } Index: DomainPopupListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/DomainPopupListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DomainPopupListener.java 26 Sep 2007 08:36:34 -0000 1.6 --- DomainPopupListener.java 17 Oct 2007 09:08:19 -0000 1.7 *************** *** 14,18 **** import net.sourceforge.bprocessor.model.Surface; - import org.apache.log4j.Logger; /** --- 14,17 ---- *************** *** 20,26 **** */ public class DomainPopupListener implements ActionListener { - /** The logger */ - private static Logger log = Logger.getLogger(DomainPopupListener.class); - /** The domain */ private Space domain; --- 19,22 ---- |
From: Michael L. <he...@us...> - 2007-10-17 09:08:13
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18032/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: clean up Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** Space.java 16 Oct 2007 11:02:48 -0000 1.184 --- Space.java 17 Oct 2007 09:08:15 -0000 1.185 *************** *** 261,271 **** * @param cl The classification * @return The space - * @throws Exception If a part is being extended */ ! public Space createConstructionSpace(Classification cl) throws Exception { Space cur; - if (this.level == PART_LEVEL) { - throw new Exception("Not legal to make further levels of detail, max level is PART"); - } if (this.level == ELEMENT_LEVEL) { cur = new Space("", Space.CONSTRUCTION, PART_LEVEL, false); --- 261,267 ---- * @param cl The classification * @return The space */ ! public Space createConstructionSpace(Classification cl) { Space cur; if (this.level == ELEMENT_LEVEL) { cur = new Space("", Space.CONSTRUCTION, PART_LEVEL, false); *************** *** 290,299 **** * @param name The name * @return The space - * @throws Exception If a part is being extended */ ! public Space createFunctionalSpace(String name) throws Exception { ! if (this.level == PART_LEVEL) { ! throw new Exception("Not leagal to make further levels of detail, max level is PART"); ! } if (this.level == ELEMENT_LEVEL) { return new Space(name, Space.FUNCTIONAL, PART_LEVEL, true); --- 286,291 ---- * @param name The name * @return The space */ ! public Space createFunctionalSpace(String name) { if (this.level == ELEMENT_LEVEL) { return new Space(name, Space.FUNCTIONAL, PART_LEVEL, true); |
From: Michael L. <he...@us...> - 2007-10-17 09:08:10
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18013/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java CreateConstructorActionListener.java CreateNetActionListener.java CreateFunctionalSpaceActionListener.java CreateSurfaceActionListener.java Log Message: clean up Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CreateConstructionSpaceActionListener.java 14 Sep 2007 10:57:55 -0000 1.15 --- CreateConstructionSpaceActionListener.java 17 Oct 2007 09:08:11 -0000 1.16 *************** *** 14,27 **** import java.awt.event.ActionListener; - import org.apache.log4j.Logger; - /** * The create->construction space action listener */ ! public class CreateConstructionSpaceActionListener implements ActionListener { ! /** The logger */ ! private static Logger log = Logger.getLogger(CreateConstructionSpaceActionListener.class); ! ! /** * CreateConstructionSpaceActionListener --- 14,21 ---- import java.awt.event.ActionListener; /** * The create->construction space action listener */ ! public class CreateConstructionSpaceActionListener implements ActionListener { /** * CreateConstructionSpaceActionListener *************** *** 35,49 **** */ public void actionPerformed(ActionEvent e) { ! try { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; ! space = owner.createConstructionSpace(""); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! Project.getInstance().changed(owner); ! } catch (Exception error) { ! error.printStackTrace(); ! } } } --- 29,39 ---- */ public void actionPerformed(ActionEvent e) { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; ! space = owner.createConstructionSpace(""); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! Project.getInstance().changed(owner); } } Index: CreateNetActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateNetActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateNetActionListener.java 14 Apr 2007 14:56:48 -0000 1.4 --- CreateNetActionListener.java 17 Oct 2007 09:08:11 -0000 1.5 *************** *** 14,18 **** import net.sourceforge.bprocessor.model.Space; - import org.apache.log4j.Logger; /** --- 14,17 ---- *************** *** 20,32 **** */ public class CreateNetActionListener implements ActionListener { - - /** The logger */ - private static Logger log = Logger.getLogger(CreateNetActionListener.class); - /** * Action performed ! * @param arg0 the action event */ ! public void actionPerformed(ActionEvent arg0) { Space net = new Net("B-net"); Space active = Project.getInstance().getActiveSpace(); --- 19,27 ---- */ public class CreateNetActionListener implements ActionListener { /** * Action performed ! * @param event the action event */ ! public void actionPerformed(ActionEvent event) { Space net = new Net("B-net"); Space active = Project.getInstance().getActiveSpace(); *************** *** 36,39 **** Project.getInstance().changed(active); } - } --- 31,33 ---- Index: CreateConstructorActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructorActionListener.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CreateConstructorActionListener.java 5 Oct 2006 07:46:31 -0000 1.8 --- CreateConstructorActionListener.java 17 Oct 2007 09:08:11 -0000 1.9 *************** *** 7,17 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.gui.GUI; - import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import javax.swing.JOptionPane; - - import org.apache.log4j.Logger; /** --- 7,12 ---- *************** *** 19,24 **** */ public class CreateConstructorActionListener implements ActionListener { - /** The logger */ - private static Logger log = Logger.getLogger(CreateConstructorActionListener.class); /** --- 14,17 ---- *************** *** 33,43 **** */ public void actionPerformed(ActionEvent e) { - String result = JOptionPane.showInputDialog(GUI.getInstance(), - "Name", - "Create Constructor", - JOptionPane.QUESTION_MESSAGE); - if (log.isDebugEnabled()) { - log.debug("Input: " + result); - } } } --- 26,29 ---- Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CreateFunctionalSpaceActionListener.java 14 Sep 2007 10:57:55 -0000 1.14 --- CreateFunctionalSpaceActionListener.java 17 Oct 2007 09:08:11 -0000 1.15 *************** *** 14,26 **** import java.awt.event.ActionListener; - import org.apache.log4j.Logger; - /** * The create->functional space action listener */ public class CreateFunctionalSpaceActionListener implements ActionListener { - /** The logger */ - private static Logger log = Logger.getLogger(CreateFunctionalSpaceActionListener.class); - /** * CreateFunctionalSpaceActionListener --- 14,21 ---- *************** *** 34,48 **** */ public void actionPerformed(ActionEvent e) { ! try { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; ! space = owner.createFunctionalSpace(""); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! Project.getInstance().changed(owner); ! } catch (Exception error) { ! error.printStackTrace(); ! } } } --- 29,39 ---- */ public void actionPerformed(ActionEvent e) { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; ! space = owner.createFunctionalSpace(""); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! Project.getInstance().changed(owner); } } Index: CreateSurfaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateSurfaceActionListener.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CreateSurfaceActionListener.java 5 Oct 2006 07:46:31 -0000 1.9 --- CreateSurfaceActionListener.java 17 Oct 2007 09:08:11 -0000 1.10 *************** *** 7,27 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.gui.GUI; - import net.sourceforge.bprocessor.model.Project; - import net.sourceforge.bprocessor.model.Surface; - import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import javax.swing.JOptionPane; - - import org.apache.log4j.Logger; - /** * The create->surface action listener */ public class CreateSurfaceActionListener implements ActionListener { - /** The logger */ - private static Logger log = Logger.getLogger(CreateSurfaceActionListener.class); - /** * CreateSurfaceActionListener --- 7,16 ---- *************** *** 32,51 **** /** * Action performed ! * @param e The action event */ ! public void actionPerformed(ActionEvent e) { ! String result = JOptionPane.showInputDialog(GUI.getInstance(), ! "Name", ! "Create Surface", ! JOptionPane.QUESTION_MESSAGE); ! if (log.isDebugEnabled()) { ! log.debug("Input: " + result); ! } ! ! if (result != null && !result.trim().equals("")) { ! Surface s = new Surface(); ! ! Project.getInstance().world().add(s); ! } } } --- 21,27 ---- /** * Action performed ! * @param event The action event */ ! public void actionPerformed(ActionEvent event) { } } |
From: Michael L. <he...@us...> - 2007-10-17 09:08:10
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18013/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: clean up Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** GUI.java 16 Oct 2007 13:41:19 -0000 1.76 --- GUI.java 17 Oct 2007 09:08:11 -0000 1.77 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.actions.AboutActionListener; import net.sourceforge.bprocessor.gui.actions.CreateConstructionSpaceActionListener; - import net.sourceforge.bprocessor.gui.actions.CreateConstructorActionListener; import net.sourceforge.bprocessor.gui.actions.CreateFunctionalSpaceActionListener; import net.sourceforge.bprocessor.gui.actions.CreateNetActionListener; --- 9,12 ---- *************** *** 268,276 **** JMenu create = (JMenu)arg0.getSource(); create.removeAll(); - JMenuItem createConstructor = new JMenuItem("Constructor"); - createConstructor.setMnemonic(KeyEvent.VK_N); - createConstructor.addActionListener(new CreateConstructorActionListener()); - createConstructor.setEnabled(false); - create.add(createConstructor); int lvl = Project.getInstance().getActiveSpace().getLevel(); if (lvl < Space.PART_LEVEL) { --- 267,270 ---- *************** *** 281,285 **** createFunctionalSpace.addActionListener(new CreateFunctionalSpaceActionListener()); create.add(createFunctionalSpace); ! JMenuItem createConstructionSpace = new JMenuItem("Construction " + append); createConstructionSpace.setMnemonic(KeyEvent.VK_O); --- 275,280 ---- createFunctionalSpace.addActionListener(new CreateFunctionalSpaceActionListener()); create.add(createFunctionalSpace); ! ! // MARK 2 JMenuItem createConstructionSpace = new JMenuItem("Construction " + append); createConstructionSpace.setMnemonic(KeyEvent.VK_O); |
From: Michael L. <he...@us...> - 2007-10-16 13:41:16
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5908/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Renamed repaint tree to refresh data view Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** GUI.java 11 Oct 2007 10:23:33 -0000 1.75 --- GUI.java 16 Oct 2007 13:41:19 -0000 1.76 *************** *** 456,467 **** edit.addSeparator(); ! JMenuItem repaintTree = new JMenuItem("Repaint tree"); ! repaintTree.setEnabled(true); ! repaintTree.addActionListener(new EditAction() { ! public void actionPerformed(ActionEvent arg0) { makeTree(); }; }); ! edit.add(repaintTree); Selection.primary().addObserver(new EditMenuListener(edit)); return edit; --- 456,467 ---- edit.addSeparator(); ! JMenuItem refreshDataView = new JMenuItem("Refresh Data View"); ! refreshDataView.setEnabled(true); ! refreshDataView.addActionListener(new EditAction() { ! public void actionPerformed(ActionEvent event) { makeTree(); }; }); ! edit.add(refreshDataView); Selection.primary().addObserver(new EditMenuListener(edit)); return edit; |
From: Michael L. <he...@us...> - 2007-10-16 13:31:27
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1767/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Hm Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.195 retrieving revision 1.196 diff -C2 -d -r1.195 -r1.196 *** Surface.java 16 Oct 2007 13:11:17 -0000 1.195 --- Surface.java 16 Oct 2007 13:31:29 -0000 1.196 *************** *** 1966,1981 **** * @return the nearest edge */ ! public Edge findClosestEdge(Vertex vertex, Collection<? extends Geometric> includes) { if (this.getEdges().containsAll(includes)) { - Vertex v = null; Edge closest = null; double distance = Double.MAX_VALUE; ! for (Geometric g : includes) { ! Edge cur = (Edge)g; ! Vertex tmp = cur.intersection(vertex); if (tmp.minus(vertex).length() < distance) { distance = tmp.minus(vertex).length(); ! v = tmp; ! closest = cur; } } --- 1966,1978 ---- * @return the nearest edge */ ! public Edge findClosestEdge(Vertex vertex, Collection<Edge> includes) { if (this.getEdges().containsAll(includes)) { Edge closest = null; double distance = Double.MAX_VALUE; ! for (Edge current : includes) { ! Vertex tmp = current.intersection(vertex); if (tmp.minus(vertex).length() < distance) { distance = tmp.minus(vertex).length(); ! closest = current; } } |
From: Michael L. <he...@us...> - 2007-10-16 13:11:22
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26390/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Modification of behaviour of extrusionall Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.194 retrieving revision 1.195 diff -C2 -d -r1.194 -r1.195 *** Surface.java 16 Oct 2007 11:47:16 -0000 1.194 --- Surface.java 16 Oct 2007 13:11:17 -0000 1.195 *************** *** 623,631 **** Surface holetop; if (hole.normal().equalEps(this.normal())) { ! holetop = hole.extrusionall(delta, sides, tops); } else { ! holetop = hole.extrusionall(-delta, sides, tops); } top.addHole(holetop); } return top; --- 623,632 ---- Surface holetop; if (hole.normal().equalEps(this.normal())) { ! holetop = hole.extrusion(delta, sides); } else { ! holetop = hole.extrusion(-delta, sides); } top.addHole(holetop); + tops.add(holetop); } return top; |
From: Michael L. <he...@us...> - 2007-10-16 11:47:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25336/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: extrusion bug fixed Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** Surface.java 15 Oct 2007 12:41:24 -0000 1.193 --- Surface.java 16 Oct 2007 11:47:16 -0000 1.194 *************** *** 691,695 **** // spaces here. if (AUTOMATIC) { ! assignSpaceForExtrusion(delta, sides, top); } return top; --- 691,699 ---- // spaces here. if (AUTOMATIC) { ! Collection<Surface> faces = new LinkedList(); ! for (int i = 0; i < n; i++) { ! faces.add(facemap[i]); ! } ! assignSpaceForExtrusion(delta, faces, top); } return top; |
From: Michael L. <he...@us...> - 2007-10-16 11:03:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7755/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Fixed bug in Space.simplify() Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** Space.java 15 Oct 2007 12:41:24 -0000 1.183 --- Space.java 16 Oct 2007 11:02:48 -0000 1.184 *************** *** 2175,2179 **** public boolean check() { { - // Check ownership relation { Iterator iter = getElements().iterator(); --- 2175,2178 ---- *************** *** 2238,2241 **** --- 2237,2249 ---- } } + { + for (Space element : getElements()) { + for (Surface surface : element.getEnvelope()) { + if (surface.getOwner() != this) { + throw new Error("inconsistency in envelope of " + element); + } + } + } + } return true; } *************** *** 2750,2754 **** Collection<Edge> deletion = new LinkedList(); Set<Surface> empties = new HashSet(); - Collection<Surface> affected = new HashSet<Surface>(); for (Edge current : getEdges()) { if (current.from == current.to) { --- 2758,2761 ---- *************** *** 2767,2771 **** } for (Surface current : empties) { ! remove(current); } } --- 2774,2778 ---- } for (Surface current : empties) { ! current.delete(); } } |
From: Michael L. <he...@us...> - 2007-10-16 11:03:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7773/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Fixed bug in Space.simplify() Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.252 retrieving revision 1.253 diff -C2 -d -r1.252 -r1.253 *** View.java 15 Oct 2007 14:08:53 -0000 1.252 --- View.java 16 Oct 2007 11:02:53 -0000 1.253 *************** *** 71,74 **** --- 71,76 ---- private static final boolean DISP = false; + + private boolean enabled; /** OBJECTS flag */ *************** *** 458,461 **** --- 460,464 ---- }); tickler.setRepeats(false); + enabled = true; } *************** *** 578,728 **** } ! /** ! * The function responsible for drawing at each update ! * @param gld The GLDrawable object ! */ ! public void display(GLAutoDrawable gld) { ! try { ! gl = gld.getGL(); ! glu = new GLU(); ! ! // remove old displayLists ! for (Integer i : deletedLists) { ! gl.glDeleteLists(i, i); ! } ! deletedLists.clear(); ! ! boolean hitdetection = false; ! ! gl.glClearColor(bgColor[0], bgColor[1], bgColor[2], bgColor[3]); ! gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); ! ! if (picking > 0) { ! try { ! gl.glRenderMode(GL.GL_RENDER); ! selectBuffer = BufferUtil.newIntBuffer(selectionLength); ! gl.glSelectBuffer(selectionLength, selectBuffer); ! gl.glRenderMode(GL.GL_SELECT); ! hitdetection = true; ! } catch (Exception error) { ! System.out.println("error " + error); ! throw new Error(); ! } ! } ! ! initCamera(); ! gl.glPushMatrix(); ! picking = 0; ! ! enableClipplanes(); ! ! gl.glColor3fv(lineColor, 0); ! gl.glLineWidth(1.0f); ! ! Display.selecting(hitdetection); ! Display.construction(gridEnabled); ! Display.mode(drawMode); ! Display.transparency(showTransparent); ! initNames(gl); ! Display.objects(objectTable); ! Display.colors(colorMap); ! Display.targetColor(targetColor); ! Display.excluded(excluded); ! if (target instanceof Geometric) { ! Display.target((Geometric) target); ! } else { ! Display.target(null); ! } ! if (selectionMode == INTERSECTIONS) { ! Display.intersecting(true); ! } else { ! Display.intersecting(false); } ! Collection<Geometric> extras = new LinkedList(); ! extras.addAll(tempEdges); ! extras.addAll(tempConstructors); ! extras.addAll(tempVertices); ! Display.extras(extras); ! Display.glos(glObjects3D); ! Display.draw(gld, gl, glu); ! Display.selecting(false); Display.intersecting(false); ! ! gl.glEnable(GL.GL_DEPTH_TEST); ! ! disableClipplanes(); ! ! //draw the clipping planes ! Collection<ClippingPlane> clips ! = Project.getInstance().getCurrentCamera().getClipplanes(); ! ! for (ClippingPlane current : clips) { ! Collection selection = Selection.primary(); ! if (current == target) { ! gl.glDisable(GL.GL_DEPTH_TEST); ! drawClipplane(current); ! gl.glEnable(GL.GL_DEPTH_TEST); } else { ! if (selection.contains(current)) { ! gl.glColor3fv(SELECTED_COLOR, 0); ! } else { ! gl.glColor3fv(CLIP_PLANE_COLOR, 0); ! } ! drawClipplane(current); } } ! ! ! gl.glMatrixMode(GL.GL_PROJECTION); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glPushMatrix(); ! gl.glLoadIdentity(); ! if (hitdetection) { ! int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport, 0); ! } ! glu.gluOrtho2D(0, width, 0, height); ! gl.glMatrixMode(GL.GL_MODELVIEW); ! gl.glPushMatrix(); ! gl.glLoadIdentity(); ! ! if (glv.getTool() instanceof SpaceTool) { ! labelSelection(hitdetection); ! } ! ! ! drawSpacePath(hitdetection); ! ! for (Widget widget : widgets) { ! widget.display(gl, glu, hitdetection); } ! ! gl.glMatrixMode(GL.GL_PROJECTION); ! gl.glPopMatrix(); ! gl.glMatrixMode(GL.GL_MODELVIEW); ! gl.glPopMatrix(); ! ! ! gl.glPopMatrix(); ! if (hitdetection) { ! gl.glFlush(); ! hits = gl.glRenderMode(GL.GL_RENDER); ! if (hits < 0) { ! System.out.println("overflow in selection buffer!"); ! // There were overflow in the selctionBuffer double the buffer and try again ! selectionLength *= 2; ! picking = 10; ! //glv.repaint(true); ! } ! if (log.isDebugEnabled()) { ! log.debug("Hits: " + hits); ! } ! } else { ! gld.swapBuffers(); } - } catch (Exception e) { - e.printStackTrace(); - throw new Error(); } } --- 581,734 ---- } ! private void draw(GLAutoDrawable gld) { ! ! gl = gld.getGL(); ! glu = new GLU(); ! ! // remove old displayLists ! for (Integer i : deletedLists) { ! gl.glDeleteLists(i, i); ! } ! deletedLists.clear(); ! ! boolean hitdetection = false; ! ! gl.glClearColor(bgColor[0], bgColor[1], bgColor[2], bgColor[3]); ! gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); ! ! if (picking > 0) { ! try { ! gl.glRenderMode(GL.GL_RENDER); ! selectBuffer = BufferUtil.newIntBuffer(selectionLength); ! gl.glSelectBuffer(selectionLength, selectBuffer); ! gl.glRenderMode(GL.GL_SELECT); ! hitdetection = true; ! } catch (Exception error) { ! System.out.println("error " + error); ! throw new Error(); } ! } ! ! initCamera(); ! gl.glPushMatrix(); ! picking = 0; ! ! enableClipplanes(); ! ! gl.glColor3fv(lineColor, 0); ! gl.glLineWidth(1.0f); ! ! Display.selecting(hitdetection); ! Display.construction(gridEnabled); ! Display.mode(drawMode); ! Display.transparency(showTransparent); ! initNames(gl); ! Display.objects(objectTable); ! Display.colors(colorMap); ! Display.targetColor(targetColor); ! Display.excluded(excluded); ! if (target instanceof Geometric) { ! Display.target((Geometric) target); ! } else { ! Display.target(null); ! } ! if (selectionMode == INTERSECTIONS) { ! Display.intersecting(true); ! } else { Display.intersecting(false); + } + Collection<Geometric> extras = new LinkedList(); + extras.addAll(tempEdges); + extras.addAll(tempConstructors); + extras.addAll(tempVertices); + Display.extras(extras); + Display.glos(glObjects3D); + Display.draw(gld, gl, glu); + Display.selecting(false); + Display.intersecting(false); ! ! gl.glEnable(GL.GL_DEPTH_TEST); ! ! disableClipplanes(); ! ! //draw the clipping planes ! Collection<ClippingPlane> clips ! = Project.getInstance().getCurrentCamera().getClipplanes(); ! ! for (ClippingPlane current : clips) { ! Collection selection = Selection.primary(); ! if (current == target) { ! gl.glDisable(GL.GL_DEPTH_TEST); ! drawClipplane(current); ! gl.glEnable(GL.GL_DEPTH_TEST); ! } else { ! if (selection.contains(current)) { ! gl.glColor3fv(SELECTED_COLOR, 0); } else { ! gl.glColor3fv(CLIP_PLANE_COLOR, 0); } + drawClipplane(current); } ! } ! ! ! gl.glMatrixMode(GL.GL_PROJECTION); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glPushMatrix(); ! gl.glLoadIdentity(); ! if (hitdetection) { ! int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport, 0); ! } ! glu.gluOrtho2D(0, width, 0, height); ! gl.glMatrixMode(GL.GL_MODELVIEW); ! gl.glPushMatrix(); ! gl.glLoadIdentity(); ! ! if (glv.getTool() instanceof SpaceTool) { ! labelSelection(hitdetection); ! } ! ! ! drawSpacePath(hitdetection); ! ! for (Widget widget : widgets) { ! widget.display(gl, glu, hitdetection); ! } ! ! gl.glMatrixMode(GL.GL_PROJECTION); ! gl.glPopMatrix(); ! gl.glMatrixMode(GL.GL_MODELVIEW); ! gl.glPopMatrix(); ! ! ! gl.glPopMatrix(); ! if (hitdetection) { ! gl.glFlush(); ! hits = gl.glRenderMode(GL.GL_RENDER); ! if (hits < 0) { ! System.out.println("overflow in selection buffer!"); ! selectionLength *= 2; ! picking = 10; } ! } else { ! gld.swapBuffers(); ! } ! } ! ! /** ! * The function responsible for drawing at each update ! * @param gld The GLDrawable object ! */ ! public void display(GLAutoDrawable gld) { ! if (enabled) { ! try { ! draw(gld); ! } catch (Exception e) { ! enabled = false; ! e.printStackTrace(); ! Project.getInstance().world().check(); } } } *************** *** 1574,1577 **** --- 1580,1588 ---- public Object getObjectAtPoint(double x, double y, Collection unWantedEntities, int mode, Plane xy) { + + if (!enabled) { + return null; + } + this.x = x; this.y = y; |