@Override public void setMaxHeight(int maxHeight) { dropDownMenu.getStyle().setProperty("max-height", maxHeight + "px"); }
@Override public void setMaxHeight(int maxHeight) { dropDownMenu.getStyle().setProperty("max-height", maxHeight + "px"); }
@Override public void searchFinished() { spinnerPanel.getStyle().setProperty("display", "none"); dropDownMenu.getStyle().removeProperty("display"); }
@Override public void showSelectHint(String column, boolean multiple) { String hint = "- " + SelectorConstants.INSTANCE.selectorDisplayer_select() + " " + column + " - "; dropDownText.setTextContent(hint); resetMenu.getStyle().setProperty("display", "none"); }
@Override public void searchFinished() { spinnerPanel.getStyle().setProperty("display", "none"); dropDownMenu.getStyle().removeProperty("display"); }
@Override public void showSelectHint(String column, boolean multiple) { String hint = "- " + SelectorConstants.INSTANCE.selectorDisplayer_select() + " " + column + " - "; dropDownText.setTextContent(hint); resetMenu.getStyle().setProperty("display", "none"); }
@Override public void setWidth(int width) { if (width > 0) { dropDownButton.getStyle().setProperty("width", width + "px"); dropDownMenu.getStyle().setProperty("width", width + "px"); resetMenu.getStyle().setProperty("width", width + "px"); dropDownText.getStyle().setProperty("max-width", (width - 30) + "px"); } else { dropDownButton.getStyle().removeProperty("width"); dropDownMenu.getStyle().removeProperty("width"); resetMenu.getStyle().removeProperty("width"); dropDownText.getStyle().removeProperty("max-width"); } }
@Override public void showResetHint(String column, boolean multiple) { String resetAction = multiple ? SelectorConstants.INSTANCE.selectorDisplayer_clearAll() : SelectorConstants.INSTANCE.selectorDisplayer_reset(); resetAnchor.setTextContent(resetAction); resetMenu.getStyle().removeProperty("display"); int n = dropDownMenu.getChildNodes().getLength() * 25; resetMenu.getStyle().setProperty("margin-top", (n > 250 ? 250 : n) + "px"); }
@Override public void setWidth(int width) { if (width > 0) { dropDownButton.getStyle().setProperty("width", width + "px"); dropDownMenu.getStyle().setProperty("width", width + "px"); resetMenu.getStyle().setProperty("width", width + "px"); dropDownText.getStyle().setProperty("max-width", (width - 30) + "px"); } else { dropDownButton.getStyle().removeProperty("width"); dropDownMenu.getStyle().removeProperty("width"); resetMenu.getStyle().removeProperty("width"); dropDownText.getStyle().removeProperty("max-width"); } }
@Override public void showResetHint(String column, boolean multiple) { String resetAction = multiple ? SelectorConstants.INSTANCE.selectorDisplayer_clearAll() : SelectorConstants.INSTANCE.selectorDisplayer_reset(); resetAnchor.setTextContent(resetAction); resetMenu.getStyle().removeProperty("display"); int n = dropDownMenu.getChildNodes().getLength() * 25; resetMenu.getStyle().setProperty("margin-top", (n > 250 ? 250 : n) + "px"); }
@Override public void searchInProgress(String msg) { spinnerText.setTextContent(msg); spinnerPanel.getStyle().removeProperty("display"); dropDownMenu.getStyle().setProperty("display", "none"); }
@Override public void searchInProgress(String msg) { spinnerText.setTextContent(msg); spinnerPanel.getStyle().removeProperty("display"); dropDownMenu.getStyle().setProperty("display", "none"); }