View Javadoc

1   /**********************************************
2    * Copyright (C) 2009 Lukas Laag
3    * This file is part of Vectomatic.
4    * 
5    * Vectomatic is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    * 
10   * Vectomatic is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   * 
15   * You should have received a copy of the GNU General Public License
16   * along with Vectomatic.  If not, see http://www.gnu.org/licenses/
17   **********************************************/
18  package org.vectomatic.client.rep.controller;
19  
20  import org.vectomatic.client.UIConstants;
21  import org.vectomatic.client.rep.RepApplication;
22  
23  import com.google.gwt.user.client.ui.Button;
24  import com.google.gwt.user.client.ui.ClickListener;
25  import com.google.gwt.user.client.ui.DialogBox;
26  import com.google.gwt.user.client.ui.FlexTable;
27  import com.google.gwt.user.client.ui.Label;
28  import com.google.gwt.user.client.ui.Widget;
29  
30  /**
31   * About panel for the application
32   */
33  public class AboutPanel extends DialogBox {
34  	public AboutPanel() {
35  		super(false, true);
36  		UIConstants constants = RepApplication.app._constants;
37  		setText(constants.aboutPanel());
38  		FlexTable contentTable = new FlexTable();
39  		contentTable.setWidget(0, 0, new Label(constants.aboutLabel1()));
40  		contentTable.setWidget(1, 0, new Label(constants.aboutLabel2()));
41  		contentTable.setWidget(2, 0, new Label(constants.aboutLabel3()));
42  		contentTable.setWidget(3, 0, new Label(constants.aboutLabel4()));
43  		contentTable.setWidget(4, 0, new Label(constants.aboutLabel5()));
44  		
45  		Button okButton = new Button(constants.okButton());
46  		okButton.setWidth("150px");
47  		okButton.addClickListener(new ClickListener() {
48  			public void onClick(Widget sender) {
49  				hide();
50  			}				
51  		});
52  		contentTable.setWidget(5, 0, okButton);
53  		setWidget(contentTable);
54  	}
55  }