/** * Sets the position of the icon. If you desire an icon only button then * set the position to IconPos.NOTEXT */ public void setIconPos(IconPos pos) { if (pos == null) { JQMCommon.setIconPos(this, pos); } else { IconPos oldPos = getIconPos(); JQMCommon.setIconPos(this, pos); for (int i = 0; i < buttons.size(); i++) { JQMButton btn = buttons.get(i); IconPos p = btn.getIconPos(); if (p == null || oldPos == null || p.equals(oldPos)) btn.setIconPos(pos); } } }
/** * Sets the position of the icon. If you desire an icon only button then * set the position to IconPos.NOTEXT */ public void setIconPos(IconPos pos) { if (pos == null) { JQMCommon.setIconPos(this, pos); } else { IconPos oldPos = getIconPos(); JQMCommon.setIconPos(this, pos); for (int i = 0; i < buttons.size(); i++) { JQMButton btn = buttons.get(i); IconPos p = btn.getIconPos(); if (p == null || oldPos == null || p.equals(oldPos)) btn.setIconPos(pos); } } }
/** * Sets the position of the icon. If you desire an icon only button then * set the position to IconPos.NOTEXT */ public void setIconPos(IconPos pos) { if (pos == null) { JQMCommon.setIconPos(this, pos); } else { IconPos oldPos = getIconPos(); JQMCommon.setIconPos(this, pos); for (int i = 0; i < buttons.size(); i++) { JQMButton btn = buttons.get(i); IconPos p = btn.getIconPos(); if (p == null || oldPos == null || p.equals(oldPos)) btn.setIconPos(pos); } } }
@UiChild(tagname = "button") public void add(final JQMButton button) { if (button == null) return; if (buttons == null) buttons = new ArrayList<JQMButton>(); buttons.add(button); IconPos btnP = button.getIconPos(); IconPos p = getIconPos(); if (btnP == null && p != null) button.setIconPos(p); LIElement li = Document.get().createLIElement(); CustomFlowPanel liPanel = new CustomFlowPanel(li); liPanel.add(button); ulPanel.add(liPanel); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { checkHighlightLastClicked(button); } }); }
@UiChild(tagname = "button") public void add(final JQMButton button) { if (button == null) return; if (buttons == null) buttons = new ArrayList<JQMButton>(); buttons.add(button); IconPos btnP = button.getIconPos(); IconPos p = getIconPos(); if (btnP == null && p != null) button.setIconPos(p); LIElement li = Document.get().createLIElement(); CustomFlowPanel liPanel = new CustomFlowPanel(li); liPanel.add(button); ulPanel.add(liPanel); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { checkHighlightLastClicked(button); } }); }
@UiChild(tagname = "button") public void add(final JQMButton button) { if (button == null) return; if (buttons == null) buttons = new ArrayList<JQMButton>(); buttons.add(button); IconPos btnP = button.getIconPos(); IconPos p = getIconPos(); if (btnP == null && p != null) button.setIconPos(p); LIElement li = Document.get().createLIElement(); CustomFlowPanel liPanel = new CustomFlowPanel(li); liPanel.add(button); ulPanel.add(liPanel); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { checkHighlightLastClicked(button); } }); }