[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/actions SpaceMenuAction.java, 1.2, 1.3 M
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2009-06-25 22:18:09
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17492/src/net/sourceforge/bprocessor/gui/actions Modified Files: SpaceMenuAction.java ModellorMenuAction.java ImportFileReader.java FileImportActionListener.java Log Message: Renamed Space to Item and Container to Space Index: SpaceMenuAction.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/SpaceMenuAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SpaceMenuAction.java 13 Dec 2007 12:00:55 -0000 1.2 --- SpaceMenuAction.java 25 Jun 2009 22:17:33 -0000 1.3 *************** *** 9,13 **** import javax.swing.AbstractAction; ! import net.sourceforge.bprocessor.model.Container; --- 9,13 ---- import javax.swing.AbstractAction; ! import net.sourceforge.bprocessor.model.Space; *************** *** 17,21 **** public abstract class SpaceMenuAction extends AbstractAction { /** The entity */ ! protected Container space; /** --- 17,21 ---- public abstract class SpaceMenuAction extends AbstractAction { /** The entity */ ! protected Space space; /** *************** *** 24,28 **** * @param name the name of the action */ ! public SpaceMenuAction(Container s, String name) { super(name); this.space = s; --- 24,28 ---- * @param name the name of the action */ ! public SpaceMenuAction(Space s, String name) { super(name); this.space = s; Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** FileImportActionListener.java 19 Jun 2009 13:32:32 -0000 1.24 --- FileImportActionListener.java 25 Jun 2009 22:17:33 -0000 1.25 *************** *** 27,32 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; - import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.Space; import org.apache.log4j.Logger; --- 27,32 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.Item; import org.apache.log4j.Logger; *************** *** 121,125 **** } else if (lfile.getName().endsWith(".obj")) { try { ! Container s = Space.createUnion(lfile.getName()); //Component lo = new Component(Byte.MAX_VALUE, lfile, s); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), --- 121,125 ---- } else if (lfile.getName().endsWith(".obj")) { try { ! Space s = Item.createUnion(lfile.getName()); //Component lo = new Component(Byte.MAX_VALUE, lfile, s); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), *************** *** 135,139 **** } else if (lfile.getName().endsWith(".dgn")) { try { ! Container result = ImportFileReader.importDgnFormat(lfile); Project.getInstance().world().add(result); Project.getInstance().changed(Project.getInstance()); --- 135,139 ---- } else if (lfile.getName().endsWith(".dgn")) { try { ! Space result = ImportFileReader.importDgnFormat(lfile); Project.getInstance().world().add(result); Project.getInstance().changed(Project.getInstance()); Index: ModellorMenuAction.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ModellorMenuAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ModellorMenuAction.java 17 Dec 2007 13:09:35 -0000 1.4 --- ModellorMenuAction.java 25 Jun 2009 22:17:33 -0000 1.5 *************** *** 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; --- 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; *************** *** 26,30 **** /** The space */ ! protected Container space; /** The modellor */ --- 26,30 ---- /** The space */ ! protected Space space; /** The modellor */ *************** *** 36,40 **** * @param m the modellor */ ! public ModellorMenuAction(Container s, Modellor m) { super(m.title()); this.space = s; --- 36,40 ---- * @param m the modellor */ ! public ModellorMenuAction(Space s, Modellor m) { super(m.title()); this.space = s; Index: ImportFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ImportFileReader.java 19 Jun 2009 13:32:32 -0000 1.20 --- ImportFileReader.java 25 Jun 2009 22:17:33 -0000 1.21 *************** *** 30,35 **** import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Project; - import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; --- 30,35 ---- import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.Item; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 73,77 **** * @throws IOException a possible file read error */ ! public static void importObjFile(File f, Container into, double scale, int basisPlane, boolean calcNormals) throws IOException { --- 73,77 ---- * @throws IOException a possible file read error */ ! public static void importObjFile(File f, Space into, double scale, int basisPlane, boolean calcNormals) throws IOException { *************** *** 86,92 **** 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; --- 86,92 ---- 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; *************** *** 201,205 **** } } ! for (Container s : groups) { if (!s.collect().isEmpty()) { into.add(s); --- 201,205 ---- } } ! for (Space s : groups) { if (!s.collect().isEmpty()) { into.add(s); *************** *** 344,348 **** * @throws IOException A possible file read exception */ ! public static void importCsvFile(File file, Container where, int chosenFloor) throws IOException { if (file.exists()) { BufferedReader bf; --- 344,348 ---- * @throws IOException A possible file read exception */ ! public static void importCsvFile(File file, Space where, int chosenFloor) throws IOException { if (file.exists()) { BufferedReader bf; *************** *** 361,365 **** int previousSpaceId = spaceid; int classification = 0; ! Container currentSpace = null; Surface outerSurface = null; List<Vertex> verts = new ArrayList<Vertex>(); --- 361,365 ---- int previousSpaceId = spaceid; int classification = 0; ! Space currentSpace = null; Surface outerSurface = null; List<Vertex> verts = new ArrayList<Vertex>(); *************** *** 406,410 **** } if (spaceid != previousSpaceId) { ! currentSpace = Space.createConstructionSpace("Space with id " + spaceid); where.add(currentSpace); currentSpace.setClassification(new Classification("Type " + classification, -1)); --- 406,410 ---- } if (spaceid != previousSpaceId) { ! currentSpace = Item.createConstructionSpace("Space with id " + spaceid); where.add(currentSpace); currentSpace.setClassification(new Classification("Type " + classification, -1)); *************** *** 480,484 **** * @return the generated surface */ ! private static Surface addToRead(List<Vertex> verts, Container currentSpace, Container where, Surface outer) { List<Edge> es = makeEdgesFromVertexes(verts); --- 480,484 ---- * @return the generated surface */ ! private static Surface addToRead(List<Vertex> verts, Space currentSpace, Space where, Surface outer) { List<Edge> es = makeEdgesFromVertexes(verts); *************** *** 535,539 **** private static class DgnReader { private InputStream input; ! private Container output; public DgnReader(InputStream input) { this.input = input; --- 535,539 ---- private static class DgnReader { private InputStream input; ! private Space output; public DgnReader(InputStream input) { this.input = input; *************** *** 601,606 **** * @throws IOException */ ! public Container readFile() throws IOException { ! output = Space.createConstructionSpace("Design"); while (input.available() > 0) { readElement(); --- 601,606 ---- * @throws IOException */ ! public Space readFile() throws IOException { ! output = Item.createConstructionSpace("Design"); while (input.available() > 0) { readElement(); *************** *** 615,622 **** * @throws IOException IOException */ ! public static Container importDgnFormat(File file) throws IOException { InputStream stream = new FileInputStream(file); DgnReader reader = new DgnReader(stream); ! Container result = reader.readFile(); return result; } --- 615,622 ---- * @throws IOException IOException */ ! public static Space importDgnFormat(File file) throws IOException { InputStream stream = new FileInputStream(file); DgnReader reader = new DgnReader(stream); ! Space result = reader.readFile(); return result; } |