[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/attrview AttributeView.java,1.26,1.27
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-01-19 17:25:11
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7696/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Added better info in the attributeview for cams but there are still several layout problems Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** AttributeView.java 19 Jan 2006 10:59:40 -0000 1.26 --- AttributeView.java 19 Jan 2006 17:25:02 -0000 1.27 *************** *** 371,374 **** --- 371,503 ---- cameraName.setFont(fontPlain); add(cameraName); + + // make a empty line + JPanel hfiller = new JPanel(); + hfiller.setOpaque(true); + con.weightx = 1.0; + con.gridwidth = GridBagConstraints.REMAINDER; + layout.setConstraints(hfiller, con); + add(hfiller); + + // make tab indentation + JLabel emptyLine = new JLabel(" "); + con.weightx = 1; + con.gridwidth = GridBagConstraints.REMAINDER; + layout.setConstraints(emptyLine, con); + add(emptyLine); + + JPanel type = new JPanel(); + type.setMinimumSize(new Dimension(120, 120)); + type.setBorder(BorderFactory.createTitledBorder("Type")); + type.setLayout(new GridBagLayout()); + GridBagConstraints typeCon = new GridBagConstraints(); + typeCon.fill = GridBagConstraints.HORIZONTAL; + typeCon.gridwidth = 2; // Let top label cover 2 collums + typeCon.weightx = 0.5; + typeCon.gridx = 0; + typeCon.gridy = 0; + JLabel cam = new JLabel("Camera:"); + cam.setFont(fontBold); + type.add(cam, typeCon); + + // ADD the camera coordinates + double[] camera = c.getCamera(); + typeCon.gridwidth = 1; + typeCon.gridx = 0; + typeCon.gridy = 1; + JLabel camxl = new JLabel("x:"); + type.add(camxl, typeCon); + JTextField camx = new JTextField("" + camera[0]); + typeCon.gridx = 1; + typeCon.gridy = 1; + type.add(camx, typeCon); + JLabel camyl = new JLabel("y:"); + typeCon.gridx = 0; + typeCon.gridy = 2; + type.add(camyl, typeCon); + JTextField camy = new JTextField("" + camera[1]); + typeCon.gridx = 1; + typeCon.gridy = 2; + type.add(camy, typeCon); + JLabel camzl = new JLabel("z:"); + typeCon.gridx = 0; + typeCon.gridy = 3; + type.add(camzl, typeCon); + JTextField camz = new JTextField("" + camera[2]); + typeCon.gridx = 1; + typeCon.gridy = 3; + type.add(camz, typeCon); + + // ADD the eye pointcoordinates + typeCon.gridwidth = 2; // Let top label cover 2 collums + + double[] eye = c.getCenter(); + typeCon.gridx = 0; + typeCon.gridy = 4; + JLabel eyel = new JLabel("Eye-point:"); + cam.setFont(fontBold); + type.add(eyel, typeCon); + typeCon.gridwidth = 1; + JLabel eyexl = new JLabel("x:"); + typeCon.gridx = 0; + typeCon.gridy = 5; + type.add(eyexl, typeCon); + JTextField eyex = new JTextField("" + eye[0]); + typeCon.gridx = 1; + typeCon.gridy = 5; + type.add(eyex, typeCon); + JLabel eyeyl = new JLabel("y:"); + typeCon.gridx = 0; + typeCon.gridy = 6; + type.add(eyeyl, typeCon); + JTextField eyey = new JTextField("" + eye[1]); + typeCon.gridx = 1; + typeCon.gridy = 6; + type.add(eyey, typeCon); + JLabel eyezl = new JLabel("z:"); + typeCon.gridx = 0; + typeCon.gridy = 7; + type.add(eyezl, typeCon); + JTextField eyez = new JTextField("" + eye[2]); + typeCon.gridx = 1; + typeCon.gridy = 7; + type.add(eyez, typeCon); + + + // ADD the roll coordinates + typeCon.gridwidth = 2; // Let top label cover 2 collums + double[] roll = c.getRoll(); + typeCon.gridx = 0; + typeCon.gridy = 8; + JLabel rolll = new JLabel("Roll:"); + cam.setFont(fontBold); + type.add(rolll, typeCon); + typeCon.gridwidth = 1; + JLabel rollxl = new JLabel("x:"); + typeCon.gridx = 0; + typeCon.gridy = 9; + type.add(rollxl, typeCon); + JTextField rollx = new JTextField("" + roll[0]); + typeCon.gridx = 1; + typeCon.gridy = 9; + type.add(rollx, typeCon); + JLabel rollyl = new JLabel("y:"); + typeCon.gridx = 0; + typeCon.gridy = 10; + type.add(rollyl, typeCon); + JTextField rolly = new JTextField("" + roll[1]); + typeCon.gridx = 1; + typeCon.gridy = 10; + type.add(rolly, typeCon); + JLabel rollzl = new JLabel("z:"); + typeCon.gridx = 0; + typeCon.gridy = 11; + type.add(rollzl, typeCon); + JTextField rollz = new JTextField("" + roll[2]); + typeCon.gridx = 1; + typeCon.gridy = 11; + type.add(rollz, typeCon); + + add(type); } |