Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface 设置单选按钮gwt的侧面_User Interface_Gwt_Internationalization_Globalization - Fatal编程技术网

User interface 设置单选按钮gwt的侧面

User interface 设置单选按钮gwt的侧面,user-interface,gwt,internationalization,globalization,User Interface,Gwt,Internationalization,Globalization,如何使单选框的文本显示在按钮的左侧而不是右侧 在从左到右的语言上,标准是单选按钮上的文本在单选按钮的右侧,我需要为从右到左的语言编写ui,因此测试应该放在单选按钮的左侧 有什么建议吗?尝试改用这个类。我没有彻底测试它,但它看起来像你想要它做什么 class RightToLeftRadioButton extends RadioButton { public RightToLeftRadioButton(final String name) { super(name);

如何使单选框的文本显示在按钮的左侧而不是右侧

在从左到右的语言上,标准是单选按钮上的文本在单选按钮的右侧,我需要为从右到左的语言编写ui,因此测试应该放在单选按钮的左侧


有什么建议吗?

尝试改用这个类。我没有彻底测试它,但它看起来像你想要它做什么

class RightToLeftRadioButton extends RadioButton {

    public RightToLeftRadioButton(final String name) {
        super(name);
        InputElement inputElem = (InputElement)getElement().getFirstChildElement();
        inputElem.removeFromParent();
        getElement().appendChild(inputElem);
    }

    public RightToLeftRadioButton(final String name, final String label) {
        this(name);
        setText(label);
    }

    public RightToLeftRadioButton(final String name, final String label, final boolean asHTML) {
        this(name);
        if (asHTML) {
            setHTML(label);
        } else {
            setText(label);
        }
    }
}