[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/attrview AttributeView.java,1.12,1.13
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-06 11:15:07
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32254/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Fixes to usage of GridBagLayout Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AttributeView.java 23 Dec 2005 11:19:03 -0000 1.12 --- AttributeView.java 6 Jan 2006 11:14:50 -0000 1.13 *************** *** 132,151 **** JLabel name = new JLabel("Name:"); ! con.anchor = GridBagConstraints.PAGE_START; ! con.weightx = 1.0; layout.setConstraints(name, con); ! add(name); ! JTextField nameEdit = new JTextField(o.getName(), 10); con.gridwidth = GridBagConstraints.REMAINDER; layout.setConstraints(nameEdit, con); add(nameEdit); nameEdit.addKeyListener(new MyKeyListener(o)); ! Object[] options = {"Arbejdsværelse", "Badeværelse", "Gang", "Køkken", "Stue", "Værelse"}; JComboBox klassifikation = new JComboBox(options); - con.weightx = 0.0; layout.setConstraints(klassifikation, con); add(klassifikation); } --- 132,158 ---- JLabel name = new JLabel("Name:"); ! con.anchor = GridBagConstraints.NORTHEAST; layout.setConstraints(name, con); ! add(name); ! JTextField nameEdit = new JTextField(o.getName()); con.gridwidth = GridBagConstraints.REMAINDER; + con.weightx = 1.0; + con.fill = GridBagConstraints.HORIZONTAL; layout.setConstraints(nameEdit, con); add(nameEdit); nameEdit.addKeyListener(new MyKeyListener(o)); ! Object[] options = {"Arbejdsv¾relse", "Badev¾relse", "Gang", "K¿kken", "Stue", "V¾relse"}; JComboBox klassifikation = new JComboBox(options); layout.setConstraints(klassifikation, con); add(klassifikation); + + JPanel filler = new JPanel(); + con.weighty = 1.0; + con.fill = GridBagConstraints.BOTH; + layout.setConstraints(filler, con); + add(filler); + revalidate(); } *************** *** 163,167 **** JLabel name = new JLabel("Name:"); con.anchor = GridBagConstraints.NORTH; ! con.weightx = 1.0; layout.setConstraints(name, con); add(name); --- 170,174 ---- JLabel name = new JLabel("Name:"); con.anchor = GridBagConstraints.NORTH; ! con.weightx = 1.0; layout.setConstraints(name, con); add(name); *************** *** 171,174 **** --- 178,182 ---- layout.setConstraints(nameEdit, con); add(nameEdit); + revalidate(); } *************** *** 194,197 **** --- 202,206 ---- layout.setConstraints(surfaceName, con); add(surfaceName); + revalidate(); } |