View Javadoc

1   /*
2    * @(#)$Id: Formatter.java 794 2010-03-30 21:06:07Z bpuype $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *                  
6    *
7    * Purpose		: 
8    *
9    * -----------------------------------------------------------------------
10   *
11   * Revision Information:
12   *
13   * Date				Who			Reason
14   *
15   * 18.10.2008			ukurmann	Initial Release
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.tool.util;
28  
29  import java.awt.Component;
30  import java.awt.Dimension;
31  
32  import javax.swing.JButton;
33  import javax.swing.JTextField;
34  import javax.swing.SwingConstants;
35  
36  
37  
38  /**
39   * Comment
40   * @version 1.0 18.10.2008
41   * @author Ueli Kurmann
42   */
43  public class Formatter {
44     
45     public static void formatButton(JButton button){    
46        button.setPreferredSize(new Dimension(160, 25));
47  //      button.setHorizontalAlignment(SwingConstants.LEFT);
48        button.setAlignmentX(Component.LEFT_ALIGNMENT);     
49     }
50     
51     public static void formatTextField(JTextField textField){    
52       textField.setPreferredSize(new Dimension(160, 25));
53       textField.setHorizontalAlignment(SwingConstants.LEFT);
54       textField.setAlignmentX(Component.LEFT_ALIGNMENT);     
55    }
56  }