List of usage examples for com.google.gwt.query.client GQuery show
public GQuery show()
From source file:be.dramaix.ai.slidingpuzzle.client.ConfigPanel.java
License:Apache License
private void onDimensionChange(int newDimension) { GQuery algorithmSelector = SELECTOR.getAlgorithmSelectElement(); GQuery algorithmSelectorSpan = algorithmSelector.siblings("span"); GQuery heuristicSelectorRow = SELECTOR.getHeuristicSelectElement().parent().parent(); if (newDimension == 4) { algorithmType = AlgorithmType.IDA_STAR; algorithmSelector.val(AlgorithmType.IDA_STAR.name()); algorithmSelector.hide();// w ww. ja v a 2 s .c o m algorithmSelectorSpan.text(AlgorithmType.IDA_STAR.getLabel()); heuristicSelectorRow.show(); } else { algorithmSelectorSpan.text(""); algorithmSelector.show(); } SELECTOR.getSolveButton().hide(); SELECTOR.getPlayButton().hide(); }
From source file:be.dramaix.ai.slidingpuzzle.client.ConfigPanel.java
License:Apache License
private void onAlgorithmChange(String algorithm) { algorithmType = AlgorithmType.valueOf(algorithm); GQuery heuristicSelectorRow = SELECTOR.getHeuristicSelectElement().parent().parent(); if (algorithmType == AlgorithmType.BDF) { heuristicSelectorRow.hide();/* w ww . j a v a2 s .c o m*/ } else { heuristicSelectorRow.show(); } }
From source file:com.arcbees.chosen.client.gwt.ChosenListBox.java
License:Apache License
@Override public void setVisible(boolean visible) { this.visible = visible; GQuery chosenElement = getChosenElement(); if (visible) { chosenElement.show(); } else {/*from w w w .j a v a2 s .c o m*/ chosenElement.hide(); } }
From source file:com.watopi.chosen.client.gwt.ChosenListBox.java
License:Open Source License
@Override public void setVisible(boolean visible) { this.visible = visible; if (isSupported()) { GQuery chosenElement = getChosenElement(); if (visible) { chosenElement.show(); } else {//from ww w .j av a 2s . c o m chosenElement.hide(); } } else { super.setVisible(visible); } }
From source file:gwtquery.plugins.lazyload.client.LazyLoad.java
License:Apache License
/** * Lazy load selected pictures, only actually fetching the file when the * picture becomes visible in the user's viewport. * * Pictures must have a "data-original" attribute indicating the URL to load, * and they should have a correct size already. * * @param options configuration options. * @return this.//from ww w . j ava 2s . c o m */ public LazyLoad lazyload(final Options options) { if (get().getLength() == 0) { return this; } final Options opt = options.copy(); final Updater updater = new Updater(get(), opt); each(new Function() { @Override public void f(Element e) { final GQuery current = $(e); current.on(opt.getEventName(), new Function() { @Override public void f(final Element e) { current.off(opt.getEventName(), this); final String data = $(e).attr("data-original"); if (data == null) { return; } $("<img/>").bind(Event.ONLOAD, new Function() { @Override public void f(final Element img) { current.hide().attr("src", $(img).attr("src")); if (opt.getEffect() == null) { current.show(); } else { opt.getEffect().f(e); } } }).attr("src", data); current.removeAttr("data-original"); } }).attr("src", opt.getPlaceholder()); } }); if (opt.getContainer() == null) { final HandlerRegistration registration = Window.addWindowScrollHandler(new Window.ScrollHandler() { @Override public void onWindowScroll(Window.ScrollEvent event) { updater.update(); } }); updater.setHandler(registration); } else { final Function handler; opt.getContainer().on("scroll", handler = new Function() { @Override public boolean f(final Event e) { updater.update(); return true; } }); updater.setContainerHandler(handler); } updater.update(); return this; }
From source file:org.bonitasoft.web.toolkit.client.ui.component.table.Table.java
License:Open Source License
public Table setShowSearch(final boolean show) { showSearch = show;/*from ww w.j a v a 2 s.co m*/ if (isGenerated()) { final GQuery filter = $(".tablefilters > div:has(input[name=search])", rootElement); if (!show) { filter.hide(); } else { filter.show(); } } return this; }
From source file:org.kaaproject.avro.ui.gwt.client.widget.choosen.AvroChoosenListBox.java
License:Apache License
public static int getChoosenListBoxWidth(ChosenListBox box) { int width = 0; ChosenImpl impl = $(box.getElement()).data(CHOSEN_DATA_KEY, ChosenImpl.class); if (impl != null) { GQuery searchchoice = impl.getContainer().find("li." + avroChoosenResources.css().searchChoice()); searchchoice.hide();/*ww w. j a v a2 s . co m*/ width = impl.getContainer().width(); searchchoice.show(); } return width; }
From source file:org.kaaproject.avro.ui.gwt.client.widget.choosen.AvroChoosenListBox.java
License:Apache License
public static void setChoosenSearchFieldVisible(ChosenListBox box, boolean visible) { ChosenImpl impl = $(box.getElement()).data(CHOSEN_DATA_KEY, ChosenImpl.class); if (impl != null) { GQuery searchfield = impl.getContainer().find("li." + avroChoosenResources.css().searchField()).first(); if (visible) { searchfield.show(); } else {/*from ww w.j a va 2s . c o m*/ searchfield.hide(); } } }