PDA

View Full Version : Windows with lot of LayoutData



francesco.calabri
14 Apr 2011, 6:48 AM
Hi all,
I'm trying to implement a keyboard-window for my application, but i have some problems with rendering it in a correct form in all browsers.

this is the example code:

EntryPoint:


package example.client;

import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.CenterLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class ProjectEP implements EntryPoint {

public void onModuleLoad() {

RootPanel.get().clear();
Viewport v = new Viewport();
v.setLayout(new CenterLayout());
final KeyBoard keyboard = new KeyBoard() {
@Override
protected void onEditComplete(String result, ButtonEvent ce) {
Info.display("Your edit", result);
}
};
v.add(new Button("Click 2 Edit", new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
keyboard.show();
}
}));
RootPanel.get().add(v);
}

}


this is the KeyBoard class:



package example.client;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.util.IconHelper;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.button.ToggleButton;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.google.gwt.user.client.Element;

/**
* Displays a keyboard
*
* @author Francesco Calabri
*/
public abstract class KeyBoard extends Window {

private TextField<String> textField;

private static final String ALT_VALUE = "ALT_VALUE";

private static final RowData def_rowData = new RowData(1, .14, new Margins(
0, 3, 0, 3));

private LayoutContainer buttonContainer;
private final static String b_style_c = "t-button-char";
private final static String b_style = "t-button";
private static SelectionListener<ButtonEvent> def_listener;
private static final double ratio = (1d / 14d);

private List<Button> buttons = new ArrayList<Button>();

private LayoutContainer errorLabel;

public KeyBoard() {

setSize(850, 430);
setModal(true);
setResizable(false);
setPlain(true);
setLayout(new FitLayout());

errorLabel = new LayoutContainer();
errorLabel.setStyleAttribute("color", "red");
errorLabel.setStyleAttribute("font-size", "14px");
errorLabel.setStyleAttribute("margin", "6px");
errorLabel.setStyleAttribute("textAlign", "right");

textField = new TextField<String>();
textField.addStyleName("t-text-field");
textField.setMessageTarget(errorLabel.getId());
if (GXT.isIE)
textField.getElement().setAttribute("vertical-align", "middle");

def_listener = new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
String value = textField.getValue();
String digit = ce.getButton().getText();
if (digit.startsWith("&") && digit.endsWith(";")) {
digit = parseHTMLcode(digit);
}
String result = value == null ? digit : value + digit;
textField.setValue(result);
textField.focus();
}
};

}

public TextField<String> getTextField() {
return textField;
}

public LayoutContainer getErrorLabel() {
return errorLabel;
}

@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
// main container
LayoutContainer rows = new LayoutContainer(new RowLayout());

// text field
LayoutContainer text = new LayoutContainer(new FitLayout());
text.add(textField);
rows.add(text, new RowData(1, .2, new Margins(3)));

// numbers row
LayoutContainer numberRow = new LayoutContainer(new RowLayout(
Orientation.HORIZONTAL));
// one
Button one = new Button("1", def_listener);
one.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(one, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// two
Button two = new Button("2", def_listener);
two.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(two, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// three
Button three = new Button("3", def_listener);
three.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(three, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// four
Button four = new Button("4", def_listener);
four.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(four, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// five
Button five = new Button("5", def_listener);
five.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(five, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// six
Button six = new Button("6", def_listener);
six.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(six, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// seven
Button seven = new Button("7", def_listener);
seven.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(seven, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// eight
Button eight = new Button("8", def_listener);
eight.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(eight, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// nine
Button nine = new Button("9", def_listener);
nine.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(nine, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// zero
Button zero = new Button("0", def_listener);
zero.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(zero, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// ?
Button question = new Button("?", def_listener);
question.setData(ALT_VALUE, "!");
question.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(question, new FitData(1));
buttons.add(question);
numberRow.add(buttonContainer, new RowData(ratio, 1));

// *
Button per = new Button("*", def_listener);
per.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(per, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio, 1));

// canc
Button canc = new Button("CANC", new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
String value = textField.getValue();
if (value != null && value.length() > 0)
textField.setValue(value.substring(0, value.length() - 1));
textField.focus();
}
});
canc.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(canc, new FitData(1));
numberRow.add(buttonContainer, new RowData(ratio * 2d, 1));

rows.add(numberRow, def_rowData);

// first row
LayoutContainer firstRow = new LayoutContainer(new RowLayout(
Orientation.HORIZONTAL));
// q
Button q = new Button("q", def_listener);
q.setData(ALT_VALUE, "Q");
q.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(q, new FitData(1));
buttons.add(q);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// w
Button w = new Button("w", def_listener);
w.setData(ALT_VALUE, "W");
w.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(w, new FitData(1));
buttons.add(w);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// e
Button e = new Button("e", def_listener);
e.setData(ALT_VALUE, "E");
e.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(e, new FitData(1));
buttons.add(e);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// r
Button r = new Button("r", def_listener);
r.setData(ALT_VALUE, "R");
r.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(r, new FitData(1));
buttons.add(r);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// t
Button t = new Button("t", def_listener);
t.setData(ALT_VALUE, "T");
t.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(t, new FitData(1));
buttons.add(t);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// y
Button y = new Button("y", def_listener);
y.setData(ALT_VALUE, "Y");
y.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(y, new FitData(1));
buttons.add(y);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// u
Button u = new Button("u", def_listener);
u.setData(ALT_VALUE, "U");
u.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(u, new FitData(1));
buttons.add(u);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// i
Button i = new Button("i", def_listener);
i.setData(ALT_VALUE, "I");
i.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(i, new FitData(1));
buttons.add(i);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// o
Button o = new Button("o", def_listener);
o.setData(ALT_VALUE, "O");
o.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(o, new FitData(1));
buttons.add(o);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// p
Button p = new Button("p", def_listener);
p.setData(ALT_VALUE, "P");
p.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(p, new FitData(1));
buttons.add(p);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// è
Button egrave = new Button("&egrave;", def_listener);
egrave.setData(ALT_VALUE, "&Egrave;");
egrave.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(egrave, new FitData(1));
buttons.add(egrave);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// apostrofo
Button apostrofo = new Button("'", def_listener);
apostrofo.setData(ALT_VALUE, "\"");
apostrofo.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(apostrofo, new FitData(1));
buttons.add(apostrofo);
firstRow.add(buttonContainer, new RowData(ratio, 1));

// (
Button openPar = new Button("(", def_listener);
openPar.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(openPar, new FitData(1));
firstRow.add(buttonContainer, new RowData(ratio, 1));

// )
Button closePar = new Button(")", def_listener);
closePar.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(closePar, new FitData(1));
firstRow.add(buttonContainer, new RowData(ratio, 1));

rows.add(firstRow, def_rowData);

// second row
LayoutContainer secondRow = new LayoutContainer(new RowLayout(
Orientation.HORIZONTAL));
// %
Button perc = new Button("%", def_listener);
perc.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(perc, new FitData(1));
secondRow.add(buttonContainer, new RowData(ratio, 1));

// a
Button a = new Button("a", def_listener);
a.setData(ALT_VALUE, "A");
a.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(a, new FitData(1));
buttons.add(a);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// s
Button s = new Button("s", def_listener);
s.setData(ALT_VALUE, "S");
s.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(s, new FitData(1));
buttons.add(s);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// d
Button d = new Button("d", def_listener);
d.setData(ALT_VALUE, "D");
d.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(d, new FitData(1));
buttons.add(d);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// f
Button f = new Button("f", def_listener);
f.setData(ALT_VALUE, "F");
f.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(f, new FitData(1));
buttons.add(f);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// g
Button g = new Button("g", def_listener);
g.setData(ALT_VALUE, "G");
g.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(g, new FitData(1));
buttons.add(g);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// h
Button h = new Button("h", def_listener);
h.setData(ALT_VALUE, "H");
h.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(h, new FitData(1));
buttons.add(h);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// j
Button j = new Button("j", def_listener);
j.setData(ALT_VALUE, "J");
j.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(j, new FitData(1));
buttons.add(j);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// k
Button k = new Button("k", def_listener);
k.setData(ALT_VALUE, "K");
k.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(k, new FitData(1));
buttons.add(k);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// l
Button l = new Button("l", def_listener);
l.setData(ALT_VALUE, "L");
l.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(l, new FitData(1));
buttons.add(l);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// ò
Button ograve = new Button("&ograve;", def_listener);
ograve.setData(ALT_VALUE, "&Ograve;");
ograve.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(ograve, new FitData(1));
buttons.add(ograve);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// à
Button agrave = new Button("&agrave;", def_listener);
agrave.setData(ALT_VALUE, "&Agrave;");
agrave.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(agrave, new FitData(1));
buttons.add(agrave);
secondRow.add(buttonContainer, new RowData(ratio, 1));

// [
Button openParQ = new Button("[", def_listener);
openParQ.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(openParQ, new FitData(1));
secondRow.add(buttonContainer, new RowData(ratio, 1));

// ]
Button closeParQ = new Button("]", def_listener);
closeParQ.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(closeParQ, new FitData(1));
secondRow.add(buttonContainer, new RowData(ratio, 1));

rows.add(secondRow, def_rowData);

// third row
LayoutContainer thirdRow = new LayoutContainer(new RowLayout(
Orientation.HORIZONTAL));
// -
Button trat = new Button("-", def_listener);
trat.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(trat, new FitData(1));
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// _
Button underscore = new Button("_", def_listener);
underscore.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(underscore, new FitData(1));
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// z
Button z = new Button("z", def_listener);
z.setData(ALT_VALUE, "Z");
z.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(z, new FitData(1));
buttons.add(z);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// x
Button x = new Button("x", def_listener);
x.setData(ALT_VALUE, "X");
x.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(x, new FitData(1));
buttons.add(x);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// c
Button c = new Button("c", def_listener);
c.setData(ALT_VALUE, "C");
c.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(c, new FitData(1));
buttons.add(c);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// v
Button v = new Button("v", def_listener);
v.setData(ALT_VALUE, "V");
v.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(v, new FitData(1));
buttons.add(v);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// b
Button b = new Button("b", def_listener);
b.setData(ALT_VALUE, "B");
b.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(b, new FitData(1));
buttons.add(b);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// n
Button n = new Button("n", def_listener);
n.setData(ALT_VALUE, "N");
n.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(n, new FitData(1));
buttons.add(n);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// m
Button m = new Button("m", def_listener);
m.setData(ALT_VALUE, "M");
m.addStyleName(b_style_c);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(m, new FitData(1));
buttons.add(m);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// ,
Button comar = new Button(",", def_listener);
comar.setData(ALT_VALUE, ";");
comar.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(comar, new FitData(1));
buttons.add(comar);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// .
Button dot = new Button(".", def_listener);
dot.setData(ALT_VALUE, ":");
dot.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(dot, new FitData(1));
buttons.add(dot);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// ù
Button ugrave = new Button("&ugrave;", def_listener);
ugrave.setData(ALT_VALUE, "&Ugrave;");
ugrave.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(ugrave, new FitData(1));
buttons.add(ugrave);
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// {
Button openParG = new Button("{", def_listener);
openParG.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(openParG, new FitData(1));
thirdRow.add(buttonContainer, new RowData(ratio, 1));

// }
Button closeParG = new Button("}", def_listener);
closeParG.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(closeParG, new FitData(1));
thirdRow.add(buttonContainer, new RowData(ratio, 1));

rows.add(thirdRow, def_rowData);

// fourth row
LayoutContainer fourthRow = new LayoutContainer(new RowLayout(
Orientation.HORIZONTAL));

// maiusc
final ToggleButton maiusc = new ToggleButton("maiusc");
maiusc.addSelectionListener(new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
for (Button b : buttons) {
// do swap from text and alternative-text
String alternativeText = b.getData(ALT_VALUE);
b.setData(ALT_VALUE, b.getText());
b.setText(alternativeText);
}
textField.focus();
}
});
maiusc.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(maiusc, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio * 2d, 1));

// <
Button lt = new Button("<", def_listener);
lt.setData(ALT_VALUE, ">");
lt.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(lt, new FitData(1));
buttons.add(lt);
fourthRow.add(buttonContainer, new RowData(ratio, 1));

// @
Button at = new Button("@", def_listener);
at.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(at, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio, 1));

// space
Button space = new Button(" ", def_listener);
space.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(space, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio * 5, 1));

// =
Button equal = new Button("=", def_listener);
equal.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(equal, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio, 1));

// +
Button plus = new Button("+", def_listener);
plus.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(plus, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio, 1));

// ok
Button ok = new Button("OK", new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
if (textField.isValid()) {
onEditComplete(textField.getValue(), ce);
} else {
MessageBox.alert("Error",
"Check error message", null);
}
}
});
ok.addStyleName(b_style);
buttonContainer = new LayoutContainer(new FitLayout());
buttonContainer.add(ok, new FitData(1));
fourthRow.add(buttonContainer, new RowData(ratio * 3d, 1));

rows.add(fourthRow, def_rowData);

rows.add(errorLabel, new RowData(1, .04d));

add(rows);

}

protected abstract void onEditComplete(String result, ButtonEvent ce);

private String parseHTMLcode(String digit) {
if (digit.equals("&egrave;"))
return "\u00E8";
if (digit.equals("&eacute;"))
return "\u00E9";
if (digit.equals("&ograve;"))
return "\u00F2";
if (digit.equals("&agrave;"))
return "\u00E0";
if (digit.equals("&ugrave;"))
return "\u00F9";
if (digit.equals("&Egrave;"))
return "\u00C8";
if (digit.equals("&Eacute;"))
return "\u00C9";
if (digit.equals("&Ograve;"))
return "\u00D2";
if (digit.equals("&Agrave;"))
return "\u00C0";
if (digit.equals("&Ugrave;"))
return "\u00D9";
return "<?>";
}

}


here's the necessary css rules:


.t-button-char .x-btn-text {
font-size: 28px;
color: navy;
}
.t-button .x-btn-text {
font-size: 28px;
}
.t-text-field .x-form-field {
font-size: 46px;
}



> In IE7 the window is rendered correctly, but I'm not able to have a readable textfield.

> In FF and Chrome the window is NOT rendered correctly. This happens too often when windows have many nested LayoutContainers.

I'm doing it wrong, or it's a limit of GWT/GXT/browsers?

Thanks a lot,
F