[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/attrview AttributeView.java,1.25,1.26
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-01-19 10:59:49
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28732/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Added a CameraTreeView so that the avail cameras are in the tree view and so that it can be selected and shown (only with name) in the attribute view Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AttributeView.java 18 Jan 2006 11:41:17 -0000 1.25 --- AttributeView.java 19 Jan 2006 10:59:40 -0000 1.26 *************** *** 8,11 **** --- 8,12 ---- import net.sourceforge.bprocessor.gui.Defaults; + import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Observer; *************** *** 351,354 **** --- 352,377 ---- /** + * Display the camera + * @param c The camera + */ + void displayCamera(Camera c) { + GridBagLayout layout = new GridBagLayout(); + GridBagConstraints con = new GridBagConstraints(); + setLayout(layout); + + JLabel name = new JLabel("Name: "); + con.anchor = GridBagConstraints.NORTH; + con.weightx = 0; + layout.setConstraints(name, con); + name.setFont(fontBold); + add(name); + + JLabel cameraName = new JLabel(c.getName()); + layout.setConstraints(cameraName, con); + cameraName.setFont(fontPlain); + add(cameraName); + } + + /** * Display the object * @param o The object *************** *** 362,365 **** --- 385,390 ---- } else if (current instanceof Surface) { displaySurface((Surface) current); + } else if (current instanceof Camera) { + displayCamera((Camera) current); } else { if (current != null) { |