KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lucane > applications > jmail > base > Common


1 package org.lucane.applications.jmail.base;
2
3 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
4  * This file is part of JMail *
5  * Copyright (C) 2002-2003 Yvan Norsa <norsay@wanadoo.fr> *
6  * *
7  * JMail is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * any later version. *
11  * *
12  * JMail is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License along *
18  * with JMail; if not, write to the Free Software Foundation, Inc., *
19  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
20  * *
21  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

22
23 import java.awt.*;
24
25 /** This class contains some methods common to multiple classes */
26 class Common
27 {
28     /** Current version of JMail */
29     public static final String JavaDoc JMAIL_VERSION = "0.8.6";
30
31     /** Allows to make the panneling easier
32      * This method comes from the book "Java 2" (Laura Lemay & Rogers Cadenhead)
33      * @param gbc global constraints to be applied
34      * @param gx grid x coordinate
35      * @param gy grid y coordinate
36      * @param gw grid width
37      * @param gh grid height
38      * @param wx x weight
39      * @param wy y weight
40      */

41     public static void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy)
42     {
43     gbc.gridx = gx;
44     gbc.gridy = gy;
45     gbc.gridwidth = gw;
46     gbc.gridheight = gh;
47     gbc.weightx = wx;
48     gbc.weighty = wy;
49     }
50 }
51
Popular Tags