Author: dongxu Date: Thu Sep 12 04:01:20 2013 New Revision: 1522286 URL: http://svn.apache.org/r1522286 Log: fine tuning the pixel of composing panel, while issue #35 should be fixed later
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java?rev=1522286&r1=1522285&r2=1522286&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java Thu Sep 12 04:01:20 2013 @@ -88,8 +88,8 @@ import com.google.gwt.user.client.ui.Com import com.google.gwt.user.client.ui.DockLayoutPanel; import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; +import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HTMLTable.RowFormatter; -import com.google.gwt.user.client.ui.HasHorizontalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.ListBox; @@ -99,11 +99,18 @@ public class __ComposePanel extends Comp @UiField FlexTable headerTable; @UiField Style style; + interface Style extends CssResource { String hiddenInput(); + String add(); + String iconlink(); + String formlinks(); + String left(); + String right(); + String operation(); } public interface Resources extends ClientBundle { @@ -117,8 +124,6 @@ public class __ComposePanel extends Comp public interface Css extends CssResource { } } - - public __ComposePanel() { initWidget(binder.createAndBindUi(this)); @@ -126,9 +131,9 @@ public class __ComposePanel extends Comp RowFormatter rowFormatter = headerTable.getRowFormatter(); // Add some text -// cellFormatter.setHorizontalAlignment(0, 1, -// HasHorizontalAlignment.ALIGN_RIGHT); - + // cellFormatter.setHorizontalAlignment(0, 1, + // HasHorizontalAlignment.ALIGN_RIGHT); + headerTable.setWidget(0, 0, new Label("From")); headerTable.setWidget(1, 0, new Label("To")); @@ -142,27 +147,34 @@ public class __ComposePanel extends Comp // Add a button that will add more rows to the table ListBox lb = new ListBox(); - lb.addItem("foo"); + lb.addItem("echowdx#googlemail.com"); lb.addItem("bar"); Button addRowButton = new Button("Send message"); Button removeRowButton = new Button("Save as draft"); Button cancel = new Button("Cancel"); - HorizontalPanel buttonPanel = new HorizontalPanel(); - buttonPanel.add(lb); -// buttonPanel.add(new Anchor("Edit identities")); + FlowPanel operationPanel = new FlowPanel(); + FlowPanel contactPanel = new FlowPanel(); + FlowPanel buttonPanel = new FlowPanel(); + + contactPanel.add(lb); + contactPanel.addStyleName(style.left()); + // buttonPanel.add(new Anchor("Edit identities")); buttonPanel.add(addRowButton); buttonPanel.add(removeRowButton); buttonPanel.add(cancel); - headerTable.setWidget(0, 1, buttonPanel); + buttonPanel.addStyleName(style.right()); + operationPanel.add(contactPanel); + operationPanel.add(buttonPanel); + operationPanel.addStyleName(style.operation()); + headerTable.setWidget(0, 1, operationPanel); headerTable.setWidget(1, 1, create()); - + headerTable.setWidget(2, 1, create()); headerTable.setWidget(3, 1, create()); headerTable.setWidget(4, 1, create()); headerTable.setWidget(5, 1, create()); - - HorizontalPanel linkPanel = new HorizontalPanel(); + FlowPanel linkPanel = new FlowPanel(); Anchor cc = new Anchor("Add Cc"); cc.addStyleName(style.iconlink()); cc.addStyleName(style.add()); @@ -182,7 +194,7 @@ public class __ComposePanel extends Comp headerTable.setWidget(6, 1, linkPanel); cellFormatter.addStyleName(6, 1, style.formlinks()); headerTable.setWidget(7, 1, create()); - + rowFormatter.addStyleName(2, style.hiddenInput()); rowFormatter.addStyleName(3, style.hiddenInput()); rowFormatter.addStyleName(4, style.hiddenInput()); Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml?rev=1522286&r1=1522285&r2=1522286&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml Thu Sep 12 04:01:20 2013 @@ -32,8 +32,21 @@ padding: 2px 8px 2px 20px; } + .left { + float: left; + } + + .right { + float: right; + } + + .operation { + margin: 0 -1px; + } + .add { background-position: -7px -357px; + margin-right: 6px; } .formlinks { @@ -108,7 +121,7 @@ } .composeHeader td { - padding: 1px 8px; + padding: 3px 8px; } .headerTable td { @@ -119,6 +132,7 @@ <g:DockLayoutPanel ui:field="thisPanel" unit="PX" addStyleNames="{style.box}"> <<<<<<< HEAD +<<<<<<< HEAD <g:north size="135"> <<<<<<< HEAD <g:SimplePanel ui:field="composeHeaderContainer" @@ -136,6 +150,9 @@ ======= <g:north size="143"> >>>>>>> beautify composing panel +======= + <g:north size="135"> +>>>>>>> fine tuning the pixel of composing panel, while issue #35 should be fixed later <g:SimplePanel ui:field="composeHeader" addStyleNames="{style.composeHeader}"> <g:FlexTable ui:field="headerTable" addStyleNames="{style.headerTable}" /> </g:SimplePanel> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org