[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl GLView.java, 1.59, 1.60
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2007-06-19 14:36:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15481/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: added a tip-bar to the bottom of the GL-view Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** GLView.java 7 May 2007 13:39:39 -0000 1.59 --- GLView.java 19 Jun 2007 13:38:45 -0000 1.60 *************** *** 20,23 **** --- 20,24 ---- import java.awt.Dimension; import java.awt.BorderLayout; + import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; *************** *** 31,35 **** --- 32,38 ---- + import javax.swing.BorderFactory; import javax.swing.JComboBox; + import javax.swing.JSeparator; import javax.swing.JTextField; import javax.swing.JPanel; *************** *** 39,42 **** --- 42,46 ---- import javax.swing.JPopupMenu; import javax.swing.SwingUtilities; + import org.apache.log4j.Logger; *************** *** 64,67 **** --- 68,73 ---- private JPanel lengthPanel; + + private JLabel tipLabel; /** *************** *** 84,88 **** jp.setMinimumSize(new Dimension(320, 240)); jp.setPreferredSize(new Dimension(640, 480)); ! GUI.getInstance().incrementPB(); lengthPanel = new JPanel(); --- 90,94 ---- jp.setMinimumSize(new Dimension(320, 240)); jp.setPreferredSize(new Dimension(640, 480)); ! GUI.getInstance().incrementPB(); lengthPanel = new JPanel(); *************** *** 92,98 **** lengthPanel.add(lengthField, BorderLayout.CENTER); factor = new FactorBox(); ! //lengthPanel.add(factor, BorderLayout.EAST); ! GUI.getInstance().incrementPB(); ! jp.add(lengthPanel, BorderLayout.SOUTH); GUI.getInstance().incrementPB(); --- 98,118 ---- lengthPanel.add(lengthField, BorderLayout.CENTER); factor = new FactorBox(); ! //lengthPanel.add(factor, BorderLayout.EAST); ! ! JPanel tipPanel = new JPanel(); ! tipPanel.setLayout(new BorderLayout()); ! tipPanel.add(new JLabel("Tip: "), BorderLayout.WEST); ! tipLabel = new JLabel("Hello World!"); ! Font basicFont = tipLabel.getFont(); ! tipLabel.setFont(new Font(basicFont.getName(), Font.PLAIN, basicFont.getSize())); ! tipPanel.add(tipLabel, BorderLayout.CENTER); ! ! JPanel bottomPanel = new JPanel(); ! bottomPanel.setLayout(new BorderLayout()); ! bottomPanel.setBorder(BorderFactory.createEtchedBorder()); ! bottomPanel.add(lengthPanel, BorderLayout.NORTH); ! bottomPanel.add(new JSeparator(), BorderLayout.CENTER); ! bottomPanel.add(tipPanel, BorderLayout.SOUTH); ! jp.add(bottomPanel, BorderLayout.SOUTH); GUI.getInstance().incrementPB(); *************** *** 223,226 **** --- 243,254 ---- /** + * Sets the tip in the tip-panel + * @param tip the tip to be displayed + */ + public void setTip(String tip) { + tipLabel.setText(tip); + } + + /** * * @return String |