[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/actions CreateConstructionSpaceActionLis
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-12-13 12:00:58
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20795/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java SpaceMenuAction.java ModellorMenuAction.java CreateNetActionListener.java CreateFunctionalSpaceActionListener.java ImportFileReader.java FileImportActionListener.java Log Message: Major change wrt Space/Container Index: ImportFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ImportFileReader.java 12 Dec 2007 12:48:31 -0000 1.16 --- ImportFileReader.java 13 Dec 2007 12:00:55 -0000 1.17 *************** *** 25,34 **** import net.sourceforge.bprocessor.model.Classification; - import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; --- 25,33 ---- import net.sourceforge.bprocessor.model.Classification; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 72,76 **** * @throws IOException a possible file read error */ ! public static void importObjFile(File f, Space into, double scale, int basisPlane, boolean calcNormals) throws IOException { --- 71,75 ---- * @throws IOException a possible file read error */ ! public static void importObjFile(File f, Container into, double scale, int basisPlane, boolean calcNormals) throws IOException { *************** *** 85,91 **** Set<Surface> surfaces = new HashSet<Surface>(); Map<Vertex, Set<Edge>> v2es = new HashMap<Vertex, Set<Edge>>(); ! List<Space> groups = new LinkedList<Space>(); Map<String, Material> materialMap = new HashMap<String, Material>(); ! Space currentGroup = into.createConstructionSpace("Object"); Material currentMaterial = null; boolean missNormals = false; --- 84,90 ---- Set<Surface> surfaces = new HashSet<Surface>(); Map<Vertex, Set<Edge>> v2es = new HashMap<Vertex, Set<Edge>>(); ! List<Container> groups = new LinkedList<Container>(); Map<String, Material> materialMap = new HashMap<String, Material>(); ! Container currentGroup = into.createConstructionSpace("Object"); Material currentMaterial = null; boolean missNormals = false; *************** *** 200,204 **** } } ! for (Space s : groups) { if (!s.collect().isEmpty()) { into.add(s); --- 199,203 ---- } } ! for (Container s : groups) { if (!s.collect().isEmpty()) { into.add(s); *************** *** 343,347 **** * @throws IOException A possible file read exception */ ! public static void importCsvFile(File file, Space where, int chosenFloor) throws IOException { if (file.exists()) { BufferedReader bf; --- 342,346 ---- * @throws IOException A possible file read exception */ ! public static void importCsvFile(File file, Container where, int chosenFloor) throws IOException { if (file.exists()) { BufferedReader bf; *************** *** 360,364 **** int previousSpaceId = spaceid; int classification = 0; ! Space currentSpace = null; Surface outerSurface = null; List<Vertex> verts = new ArrayList<Vertex>(); --- 359,363 ---- int previousSpaceId = spaceid; int classification = 0; ! Container currentSpace = null; Surface outerSurface = null; List<Vertex> verts = new ArrayList<Vertex>(); *************** *** 406,410 **** if (spaceid != previousSpaceId) { currentSpace = new Container("Space with id " + spaceid, ! Space.CONSTRUCTION, true); where.add(currentSpace); currentSpace.setClassification(new Classification("Type " + classification, -1)); --- 405,409 ---- if (spaceid != previousSpaceId) { currentSpace = new Container("Space with id " + spaceid, ! Container.CONSTRUCTION, true); where.add(currentSpace); currentSpace.setClassification(new Classification("Type " + classification, -1)); *************** *** 480,484 **** * @return the generated surface */ ! private static Surface addToRead(List<Vertex> verts, Space currentSpace, Space where, Surface outer) { List<Edge> es = makeEdgesFromVertexes(verts); --- 479,483 ---- * @return the generated surface */ ! private static Surface addToRead(List<Vertex> verts, Container currentSpace, Container where, Surface outer) { List<Edge> es = makeEdgesFromVertexes(verts); Index: SpaceMenuAction.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/SpaceMenuAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SpaceMenuAction.java 26 Sep 2006 09:50:54 -0000 1.1 --- SpaceMenuAction.java 13 Dec 2007 12:00:55 -0000 1.2 *************** *** 9,13 **** import javax.swing.AbstractAction; ! import net.sourceforge.bprocessor.model.Space; --- 9,13 ---- import javax.swing.AbstractAction; ! import net.sourceforge.bprocessor.model.Container; *************** *** 17,21 **** public abstract class SpaceMenuAction extends AbstractAction { /** The entity */ ! protected Space space; /** --- 17,21 ---- public abstract class SpaceMenuAction extends AbstractAction { /** The entity */ ! protected Container space; /** *************** *** 24,28 **** * @param name the name of the action */ ! public SpaceMenuAction(Space s, String name) { super(name); this.space = s; --- 24,28 ---- * @param name the name of the action */ ! public SpaceMenuAction(Container s, String name) { super(name); this.space = s; Index: CreateNetActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateNetActionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreateNetActionListener.java 2 Nov 2007 12:11:22 -0000 1.6 --- CreateNetActionListener.java 13 Dec 2007 12:00:55 -0000 1.7 *************** *** 11,15 **** import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; --- 11,15 ---- import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; *************** *** 23,28 **** */ public void actionPerformed(ActionEvent event) { ! Space net = Space.createNet("B-net"); ! Space active = Project.getInstance().getActiveSpace(); active.add(net); active.changed(); --- 23,28 ---- */ public void actionPerformed(ActionEvent event) { ! Container net = Container.createNet("B-net"); ! Container active = Project.getInstance().getActiveSpace(); active.add(net); active.changed(); Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** FileImportActionListener.java 12 Dec 2007 12:48:31 -0000 1.18 --- FileImportActionListener.java 13 Dec 2007 12:00:55 -0000 1.19 *************** *** 27,33 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Component; - import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; import org.apache.log4j.Logger; --- 27,32 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Component; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; import org.apache.log4j.Logger; *************** *** 109,113 **** } else if (lfile.getName().endsWith(".obj")) { try { ! Space s = new Container(lfile.getName(), Space.CONSTRUCTION, true); s.setUnion(true); Component lo = new Component(Byte.MAX_VALUE, lfile, s); --- 108,112 ---- } else if (lfile.getName().endsWith(".obj")) { try { ! Container s = new Container(lfile.getName(), Container.CONSTRUCTION, true); s.setUnion(true); Component lo = new Component(Byte.MAX_VALUE, lfile, s); Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CreateConstructionSpaceActionListener.java 17 Oct 2007 09:08:11 -0000 1.16 --- CreateConstructionSpaceActionListener.java 13 Dec 2007 12:00:55 -0000 1.17 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; import java.awt.event.ActionEvent; *************** *** 29,34 **** */ public void actionPerformed(ActionEvent e) { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; space = owner.createConstructionSpace(""); owner.add(space); --- 29,34 ---- */ public void actionPerformed(ActionEvent e) { ! Container owner = Project.getInstance().getActiveSpace(); ! Container space; space = owner.createConstructionSpace(""); owner.add(space); Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CreateFunctionalSpaceActionListener.java 17 Oct 2007 09:08:11 -0000 1.15 --- CreateFunctionalSpaceActionListener.java 13 Dec 2007 12:00:55 -0000 1.16 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; import java.awt.event.ActionEvent; *************** *** 29,34 **** */ public void actionPerformed(ActionEvent e) { ! Space owner = Project.getInstance().getActiveSpace(); ! Space space; space = owner.createFunctionalSpace(""); owner.add(space); --- 29,34 ---- */ public void actionPerformed(ActionEvent e) { ! Container owner = Project.getInstance().getActiveSpace(); ! Container space; space = owner.createFunctionalSpace(""); owner.add(space); Index: ModellorMenuAction.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ModellorMenuAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModellorMenuAction.java 10 Apr 2007 21:01:10 -0000 1.2 --- ModellorMenuAction.java 13 Dec 2007 12:00:55 -0000 1.3 *************** *** 14,18 **** import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.modellor.Modellor; --- 14,18 ---- import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.modellor.Modellor; *************** *** 26,30 **** /** The space */ ! protected Space space; /** The modellor */ --- 26,30 ---- /** The space */ ! protected Container space; /** The modellor */ *************** *** 36,40 **** * @param m the modellor */ ! public ModellorMenuAction(Space s, Modellor m) { super(m.getGeneralName()); this.space = s; --- 36,40 ---- * @param m the modellor */ ! public ModellorMenuAction(Container s, Modellor m) { super(m.getGeneralName()); this.space = s; |