HorizontalAlignmentConstant har = HasHorizontalAlignment.ALIGN_RIGHT;
grid = new Grid(1, 2);
verticalPanel.add(grid);
DecoratorPanel dp = new DecoratorPanel();
String labelStyle = css.loginWithLabelStyle();
String imageStyle = css.authProviderIconsStyle();
/* left side */
flexTableLeft = new FlexTable();
dp.add(flexTableLeft);
grid.setWidget(0, 0, dp);
Label loginWithLabel = new Label("Login With");
loginWithLabel.setWordWrap(false);
loginWithLabel.setStyleName(labelStyle);
flexTableLeft.setWidget(0,0,loginWithLabel);
// row 1
int r; int c;
r = 1; c = 0;
facebookImage = new Image(images.facebookIconImageData().getSafeUri());
image = facebookImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Facebook");
flexTableLeft.setWidget(r,c,image);
r = 1; c = 1;
googleImage = new Image(images.googleIconImageData().getSafeUri());
image = googleImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Google");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 1; c = 2;
twitterImage = new Image(images.twitterIconImageData().getSafeUri());
image = twitterImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Twitter");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 1; c = 3;
yahooImage = new Image(images.yahooIconImageData().getSafeUri());
image = yahooImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Yahoo!");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
// row 2
r = 2; c = 0;
linkedinImage = new Image(images.linkedinIconImageData().getSafeUri());
image = linkedinImage;
image.setStyleName(imageStyle);
image.setTitle("Login with LinkedIn");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 2; c = 1;
instagramImage = new Image(images.instagramIconImageData().getSafeUri());
image = instagramImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Instagram");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 2; c = 2;
vimeoImage = new Image(images.vimeoIconImageData().getSafeUri());
image = vimeoImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Vimeo");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 2; c = 3;
githubImage = new Image(images.githubIconImageData().getSafeUri());
image = githubImage;
image.setStyleName(imageStyle);
image.setTitle("Login with github");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
// row 3
r = 3; c = 0;
flickrImage = new Image(images.flickrIconImageData().getSafeUri());
image = flickrImage;
image.setStyleName(imageStyle);
image.setTitle("Login with flickr");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
r = 3; c = 1;
liveImage = new Image(images.liveIconImageData().getSafeUri());
image = liveImage;
image.setStyleName(imageStyle);
image.setTitle("Login with Microsoft Live Connect");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
flexTableLeft.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
flexTableLeft.getFlexCellFormatter().setColSpan(0, 0, 4);
flexTableLeft.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
r = 3; c = 2;
tumblrImage = new Image(images.tumblrIconImageData().getSafeUri());
image = tumblrImage;
image.setStyleName(imageStyle);
image.setTitle("Login with tumblr.");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
flexTableLeft.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
flexTableLeft.getFlexCellFormatter().setColSpan(0, 0, 4);
flexTableLeft.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
r = 3; c = 3;
foursquareImage = new Image(images.foursquareIconImageData().getSafeUri());
image = foursquareImage;
image.setStyleName(imageStyle);
image.setTitle("Login with foursquare");
flexTableLeft.setWidget(r,c,image);
flexTableLeft.getCellFormatter().setHorizontalAlignment(r,c,har);
flexTableLeft.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
flexTableLeft.getFlexCellFormatter().setColSpan(0, 0, 4);
flexTableLeft.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
/********************** right side *******************/
dp = new DecoratorPanel();
flexTableRight = new FlexTable();
dp.add(flexTableRight);
grid.setWidget(0, 1, dp);
loginWithLabel = new Label("Login With Default Account");
loginWithLabel.setWordWrap(false);
loginWithLabel.setStyleName(css.loginWithLabelStyle());