- the text box should be readonly as in swing
This commit is contained in:
Heng Sin Low 2009-12-14 05:45:29 +00:00
parent 6db1d10b71
commit 4af7a6d33c
2 changed files with 10 additions and 1 deletions

View File

@ -161,4 +161,11 @@ public class EditorBox extends Div {
public void setToolTipText(String tooltiptext) {
txt.setTooltiptext(tooltiptext);
}
/**
* @return Button
*/
public Button getButton() {
return btn;
}
}

View File

@ -292,12 +292,14 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener
@Override
public boolean isReadWrite() {
return !getComponent().getTextbox().isReadonly();
return getComponent().getButton().isEnabled();
}
@Override
public void setReadWrite(boolean readWrite) {
getComponent().setEnabled(readWrite);
getComponent().getTextbox().setReadonly(true);
}