[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/attrview AttributeView.java,1.10,1.11 MyK
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-12-12 10:06:30
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java MyKeyListener.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: MyKeyListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/MyKeyListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MyKeyListener.java 21 Nov 2005 09:52:17 -0000 1.1 --- MyKeyListener.java 12 Dec 2005 10:06:21 -0000 1.2 *************** *** 11,17 **** import javax.swing.text.JTextComponent; ! import net.sourceforge.bprocessor.model.FunctionalSpace; ! import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Project; /** --- 11,17 ---- import javax.swing.text.JTextComponent; ! import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; /** *************** *** 21,28 **** /** The current ConstructionSpace */ ! private ConstructionSpace cons; /** The current FunctionalSpace */ ! private FunctionalSpace funs; /** The current Object */ --- 21,28 ---- /** The current ConstructionSpace */ ! private Space cons; /** The current FunctionalSpace */ ! private Space funs; /** The current Object */ *************** *** 59,73 **** if (keyPressed == KeyEvent.VK_ENTER) { JTextComponent tf = (JTextComponent)e.getSource(); ! String newName = tf.getText(); ! if (current instanceof FunctionalSpace) { ! funs = (FunctionalSpace)current; ! funs.setName(newName); ! Project.getInstance().update(funs); ! } ! if (current instanceof ConstructionSpace) { ! cons = (ConstructionSpace)current; ! cons.setName(newName); ! Project.getInstance().update(cons); } } } --- 59,77 ---- if (keyPressed == KeyEvent.VK_ENTER) { JTextComponent tf = (JTextComponent)e.getSource(); ! String newName = tf.getText(); ! if (current instanceof Space) { ! Space space = (Space) current; ! if (space.isFunctionalSpace()) { ! funs = space; ! funs.setName(newName); ! Project.getInstance().update(funs); ! } ! if (space.isConstructionSpace()) { ! cons = space; ! cons.setName(newName); ! Project.getInstance().update(cons); ! } } + } } Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AttributeView.java 11 Dec 2005 17:27:54 -0000 1.10 --- AttributeView.java 12 Dec 2005 10:06:21 -0000 1.11 *************** *** 10,16 **** import net.sourceforge.bprocessor.kernel.notification.NotificationListener; import net.sourceforge.bprocessor.kernel.notification.Notifier; - import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 10,15 ---- import net.sourceforge.bprocessor.kernel.notification.NotificationListener; import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 65,72 **** String type = n.getType(); if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! FunctionalSpace current = Project.getInstance().findFunctionalSpaceById(n.getObject()); ap.displayFuncSpace(current); } else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! ConstructionSpace current = Project.getInstance().findConstructionSpaceById(n.getObject()); ap.displayConsSpace(current); } else if (type.equals(Notification.SURFACE_SELECTED)) { --- 64,71 ---- String type = n.getType(); if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! Space current = Project.getInstance().findFunctionalSpaceById(n.getObject()); ap.displayFuncSpace(current); } else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! Space current = Project.getInstance().findConstructionSpaceById(n.getObject()); ap.displayConsSpace(current); } else if (type.equals(Notification.SURFACE_SELECTED)) { *************** *** 124,128 **** * @param o The object */ ! void displayFuncSpace(FunctionalSpace o) { removeAll(); --- 123,127 ---- * @param o The object */ ! void displayFuncSpace(Space o) { removeAll(); *************** *** 154,158 **** * @param o The object */ ! void displayConsSpace(ConstructionSpace o) { removeAll(); --- 153,157 ---- * @param o The object */ ! void displayConsSpace(Space o) { removeAll(); |