Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/accordiontable/AccordionTable.java

Diff revisions: vs.
  @@ -1,13 +1,8 @@
1 1 package com.temp.client.foundation.widget.accordiontable;
2 2
3 - import com.temp.client.foundation.widget.AccordionVerticalPairPanel;
4 - import com.temp.client.foundation.widget.AccordionVerticalPairPanel.WidgetPair;
5 -
6 - import com.google.gwt.user.client.ui.Composite;
7 - import com.google.gwt.user.client.ui.DockPanel;
8 - import com.google.gwt.user.client.ui.HorizontalPanel;
9 - import com.google.gwt.user.client.ui.Label;
10 - import com.google.gwt.user.client.ui.VerticalPanel;
3 + import com.google.gwt.user.client.ui.*;
4 + import com.temp.client.foundation.widget.*;
5 + import com.temp.client.foundation.widget.AccordionVerticalPairPanel.*;
11 6
12 7 /**
13 8 * Accordion Table is a Composite containing
  @@ -15,7 +10,6 @@
15 10 * table borders and corresponding styles
16 11 *
17 12 * @author palla
18 - *
19 13 */
20 14
21 15 public class AccordionTable extends Composite {
  @@ -28,51 +22,49 @@
28 22 private static final String TITLE_HEADER_STYLE_NAME = "dataTable-table-header";
29 23 private static final String TITLE_HEADER_PANEL_STYLE_NAME = "dataTable-table-header-panel";
30 24
31 -
32 - public AccordionTable(String title) {
25 + public AccordionTable( String title ) {
33 26
34 27 VerticalPanel rowContainer = new VerticalPanel();
35 - rowContainer.setStyleName(TABLE_CONTAINER_CSS);
36 - rowContainer.add(tableHeader);
37 - rowContainer.add(rows);
28 + rowContainer.setStyleName( TABLE_CONTAINER_CSS );
29 + rowContainer.add( tableHeader );
30 + rowContainer.add( rows );
38 31
39 32 VerticalPanel panel = new VerticalPanel();
40 - if (title != null) {
41 - panel.add(createTitlePanel(title));
33 + if ( title != null ) {
34 + panel.add( createTitlePanel( title ) );
42 35 }
43 - panel.add(rowContainer);
36 + panel.add( rowContainer );
44 37
45 - tableHeader.setStyleName(TABLE_HEADER_CSS);
38 + tableHeader.setStyleName( TABLE_HEADER_CSS );
46 39
47 - initWidget(panel);
40 + initWidget( panel );
48 41 }
49 42
50 43 public void clear() {
51 44 rows.clear();
52 45 }
53 46
54 - public void add(WidgetPair pair) {
55 - rows.add(pair);
47 + public void add( WidgetPair pair ) {
48 + rows.add( pair );
56 49 }
57 50
58 51 public AccordionVerticalPairPanel getRows() {
59 52 return rows;
60 53 }
61 54
62 - public void setTableHeader(AccordionTablePrimaryRow header) {
63 - tableHeader.add(header);
55 + public void setTableHeader( AccordionTablePrimaryRow header ) {
56 + tableHeader.add( header );
64 57 }
65 58
66 - private DockPanel createTitlePanel(String title) {
59 + private DockPanel createTitlePanel( String title ) {
67 60 DockPanel titlePanel = new DockPanel();
68 - titlePanel.setWidth("100%");
69 - titlePanel.setStylePrimaryName(TITLE_HEADER_PANEL_STYLE_NAME);
61 + titlePanel.setWidth( "100%" );
62 + titlePanel.setStylePrimaryName( TITLE_HEADER_PANEL_STYLE_NAME );
70 63 Label titleLabel = new Label();
71 - titleLabel.setText(title);
72 - titleLabel.setStylePrimaryName(TITLE_HEADER_STYLE_NAME);
73 - titlePanel.add(titleLabel, DockPanel.WEST);
74 - titlePanel.setCellWidth(titleLabel, "85%");
64 + titleLabel.setText( title );
65 + titleLabel.setStylePrimaryName( TITLE_HEADER_STYLE_NAME );
66 + titlePanel.add( titleLabel, DockPanel.WEST );
67 + titlePanel.setCellWidth( titleLabel, "85%" );
75 68 return titlePanel;
76 69 }
77 -
78 70 }