View Javadoc

1   /**********************************************
2    * Copyright (C) 2010 Lukas Laag
3    * This file is part of svgreal.
4    * 
5    * svgreal 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   * svgreal 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 svgreal.  If not, see http://www.gnu.org/licenses/
17   **********************************************/
18  package org.vectomatic.svg.edit.client;
19  
20  import org.vectomatic.dom.svg.ui.SVGImage;
21  
22  import com.extjs.gxt.ui.client.Style.Orientation;
23  import com.extjs.gxt.ui.client.util.Margins;
24  import com.extjs.gxt.ui.client.widget.Dialog;
25  import com.extjs.gxt.ui.client.widget.Html;
26  import com.extjs.gxt.ui.client.widget.layout.RowData;
27  import com.extjs.gxt.ui.client.widget.layout.RowLayout;
28  import com.google.gwt.dom.client.Style.Unit;
29  
30  /**
31   * Application about dialog class
32   * @author laaglu
33   */
34  public class AboutDialog extends Dialog {
35  
36  	public AboutDialog() {
37  		super();
38  		setHideOnButtonClick(true);
39  		setHeading(AppConstants.INSTANCE.aboutMenuItem());
40  		setModal(true);
41  		setResizable(false);
42  		setSize(300, 330);
43  		okText = AppConstants.INSTANCE.closeButton();
44  		setButtons(Dialog.OK);
45  		RowLayout layout = new RowLayout(Orientation.VERTICAL);
46  		setLayout(layout);
47  		SVGImage logo = new SVGImage(AppBundle.INSTANCE.logo());
48  		logo.getStyle().setWidth(100, Unit.PCT);
49  		logo.getStyle().setHeight(82, Unit.PX);
50  //		logo.setPixelSize(195, 82);
51  		add(logo, new RowData(-1, -1, new Margins(5)));
52  		add(new Html(AppConstants.INSTANCE.aboutText()), new RowData(-1, -1, new Margins(0)));
53  		SVGImage gplv3 = new SVGImage(AppBundle.INSTANCE.gplv3());
54  		gplv3.getStyle().setWidth(100, Unit.PCT);
55  		gplv3.getStyle().setHeight(37, Unit.PX);
56  //		gplv3.setPixelSize(74,37);
57  		add(gplv3, new RowData(-1, -1, new Margins(5)));
58  	}
59  
60  }