本文整理了Java中com.google.gwt.user.client.ui.ListBox.getElement()
方法的一些代码示例,展示了ListBox.getElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListBox.getElement()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.ListBox
类名称:ListBox
方法名:getElement
暂无
代码示例来源:origin: kaaproject/kaa
private void addListBoxItem(String item) {
addItemWithTitle(getListBox().getElement(), item, item);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private SelectElement getSelectElement() {
return getElement().cast();
}
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
private static native void refresh(Element elt) /*-{
if ($wnd.$ === undefined || $wnd.$ === null) return; // jQuery is not loaded
var w = $wnd.$(elt);
if (w.data('mobile-flipswitch') !== undefined) {
w.flipswitch('refresh');
}
}-*/;
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
private static native void refresh(Element elt) /*-{
if ($wnd.$ === undefined || $wnd.$ === null) return; // jQuery is not loaded
var w = $wnd.$(elt);
if (w.data('mobile-flipswitch') !== undefined) {
w.flipswitch('refresh');
}
}-*/;
代码示例来源:origin: jqm4gwt/jqm4gwt
private static native void refresh(Element elt) /*-{
if ($wnd.$ === undefined || $wnd.$ === null) return; // jQuery is not loaded
var w = $wnd.$(elt);
if (w.data('mobile-flipswitch') !== undefined) {
w.flipswitch('refresh');
}
}-*/;
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
private SelectElement getSelectElement() {
return getElement().cast();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
private SelectElement getSelectElement() {
return getElement().cast();
}
}
代码示例来源:origin: stackoverflow.com
ListBox listBox = new ListBox();
//Add item to listBox.
SelectElement selectElement = SelectElement.as(listBox.getElement());
NodeList<OptionElement> options = selectElement.getOptions();
for (int i = 0; i < options.getLength(); i++) {
options.getItem(i).getStyle().setColor("#FF0000");
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
@Override
public void initialise(final GridBodyCellRenderContext context) {
final Style style = widget.getElement().getStyle();
style.setMarginTop((context.getCellHeight() - HEIGHT) / 2,
Style.Unit.PX);
transform(context);
}
代码示例来源:origin: kiegroup/appformer
@Override
public void initialise(final GridBodyCellRenderContext context) {
final Style style = widget.getElement().getStyle();
style.setMarginTop((context.getCellHeight() - HEIGHT) / 2,
Style.Unit.PX);
transform(context);
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
@Override
public void unload() {
if (listBox != null && listBox.isAttached()) {
$(listBox.getElement()).siblings("input.select-dropdown").off("mousedown");
$(listBox.getElement()).off("change");
$(listBox.getElement()).material_select("destroy");
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
@Override
public void unload() {
if (listBox != null && listBox.isAttached()) {
$(listBox.getElement()).siblings("input.select-dropdown").off("mousedown");
$(listBox.getElement()).off("change");
$(listBox.getElement()).material_select("destroy");
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
@Override
public void setReadOnly(boolean value) {
getReadOnlyMixin().setReadOnly(value);
if (!value) {
$(listBox.getElement()).material_select("destroy");
$(listBox.getElement()).material_select();
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
@Override
public void setReadOnly(boolean value) {
getReadOnlyMixin().setReadOnly(value);
if (!value) {
$(listBox.getElement()).material_select("destroy");
$(listBox.getElement()).material_select();
}
}
代码示例来源:origin: oVirt/ovirt-engine
private void updateItemAvailability(String itemName, boolean isEnabled) {
for (int i = 0; i < bootSequenceBox.getItemCount(); i++) {
if (bootSequenceBox.getItemText(i).equals(itemName)) {
NodeList<Element> options = bootSequenceBox.getElement().getElementsByTagName("option"); //$NON-NLS-1$
if (!isEnabled) {
options.getItem(i).setAttribute("disabled", "disabled"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
options.getItem(i).removeAttribute("disabled"); //$NON-NLS-1$
}
}
}
}
代码示例来源:origin: sk.seges.acris/acris-binding
private static void setSelectedItem(ListBox list, Object item) {
assert list != null;
Object model = list.getElement().getPropertyObject("model");
if (model instanceof ListBindingManager) {
ListBindingManager lbm = (ListBindingManager) model;
list.setSelectedIndex(getEqualItemIndex(lbm.getElements(), item));
} else {
list.setSelectedIndex((Integer) item);
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
protected void checkBrowserDefault(MaterialListValueBox listValueBox, boolean checkElement) {
listValueBox.setOld(true);
assertTrue(listValueBox.isOld());
if (checkElement) {
assertTrue(listValueBox.getListBox().getElement().hasClassName("browser-default"));
}
listValueBox.setOld(false);
assertFalse(listValueBox.isOld());
if (checkElement) {
assertFalse(listValueBox.getListBox().getElement().hasClassName("browser-default"));
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
protected void checkBrowserDefault(MaterialListValueBox listValueBox, boolean checkElement) {
listValueBox.setOld(true);
assertTrue(listValueBox.isOld());
if (checkElement) {
assertTrue(listValueBox.getListBox().getElement().hasClassName("browser-default"));
}
listValueBox.setOld(false);
assertFalse(listValueBox.isOld());
if (checkElement) {
assertFalse(listValueBox.getListBox().getElement().hasClassName("browser-default"));
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
public void testEnabled() {
// given
MaterialListValueBox<T> listValueBox = getWidget();
// when / then
final Element element = listValueBox.getListBox().getElement();
assertFalse(element.hasAttribute(CssName.DISABLED));
listValueBox.setEnabled(true);
assertFalse(element.hasAttribute(CssName.DISABLED));
assertTrue(listValueBox.isEnabled());
listValueBox.setEnabled(false);
assertTrue(element.hasAttribute(CssName.DISABLED));
assertFalse(listValueBox.getListBox().isEnabled());
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
public void testEnabled() {
// given
MaterialListValueBox<T> listValueBox = getWidget();
// when / then
final Element element = listValueBox.getListBox().getElement();
assertFalse(element.hasAttribute(CssName.DISABLED));
listValueBox.setEnabled(true);
assertFalse(element.hasAttribute(CssName.DISABLED));
assertTrue(listValueBox.isEnabled());
listValueBox.setEnabled(false);
assertTrue(element.hasAttribute(CssName.DISABLED));
assertFalse(listValueBox.getListBox().isEnabled());
}
内容来源于网络,如有侵权,请联系作者删除!