com.google.gwt.dom.client.LIElement Java Examples
The following examples show how to use
com.google.gwt.dom.client.LIElement.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DisplayerHtmlEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addSourceCodeItem(String name) { AnchorElement anchor = Document.get().createAnchorElement(); String displayName = DisplayerHtmlConstants.INSTANCE.getString("displayer_source_code_" + name); anchor.setInnerText(displayName); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); tabList.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { presenter.onSourceCodeItemSelected(name); if (selectedItem != null) { selectedItem.setClassName(""); selectedItem.getStyle().setCursor(Style.Cursor.POINTER); } selectedItem = li; selectedItem.setClassName("active"); selectedItem.getStyle().setCursor(Style.Cursor.DEFAULT); previewItem.setClassName(""); } }); }
Example #2
Source File: PerspectiveDragConfigModalView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addItem(String name, Command onSelect) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); selectorItems.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { onSelect.execute(); } }); }
Example #3
Source File: BaseNavWidgetView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addItem(String id, String name, String description, Command onItemSelected) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); if (description != null && !description.equals(name)) { anchor.setTitle(description); } LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); navWidget.appendChild((Node) li); itemMap.put(id, li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if (Event.ONCLICK == event.getTypeInt()) { onItemSelected.execute(); } }); }
Example #4
Source File: NavItemDefaultEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addCommand(String name, Command command) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); commandMenu.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { command.execute(); } }); }
Example #5
Source File: TargetPerspectiveEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
private void addItem(UnorderedList unorderedList, String name, boolean selected, Command onSelect) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); li.setClassName(selected ? "selected" : ""); unorderedList.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { onSelect.execute(); } }); }
Example #6
Source File: NavComponentConfigModalView.java From dashbuilder with Apache License 2.0 | 6 votes |
private void addItem(UnorderedList unorderedList, String name, boolean selected, Command onSelect) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); li.setClassName(selected ? "selected" : ""); unorderedList.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { onSelect.execute(); } }); }
Example #7
Source File: NavTilesWidgetView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addBreadcrumbItem(String navItemName, Command onClicked) { LIElement li = Document.get().createLIElement(); breadcrumb.appendChild((Node) li); if (onClicked != null) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(navItemName); li.appendChild(anchor); li.getStyle().setCursor(Style.Cursor.POINTER); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if (Event.ONCLICK == event.getTypeInt()) { onClicked.execute(); } }); } else { ((Node) li).setTextContent(navItemName); li.setClassName("active"); } }
Example #8
Source File: SourceCodeEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void declareVariable(String var, String description) { SpanElement span = Document.get().createSpanElement(); span.setInnerText(var); AnchorElement anchor = Document.get().createAnchorElement(); anchor.setTitle(description); anchor.appendChild(span); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); variablesMenu.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { presenter.onVariableSelected(var); } }); }
Example #9
Source File: TopMenuBar.java From dashbuilder with Apache License 2.0 | 6 votes |
private void addEntry(String entry, boolean logout) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(entry); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if (Event.ONCLICK == event.getTypeInt()) { if (!logout) { onRoleClicked(entry); } else { onLogoutClicked(); } } }); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); roleList.appendChild((Node) li); }
Example #10
Source File: NavRootNodeEditorView.java From dashbuilder with Apache License 2.0 | 6 votes |
@Override public void addCommand(String name, Command command) { AnchorElement anchor = Document.get().createAnchorElement(); anchor.setInnerText(name); LIElement li = Document.get().createLIElement(); li.getStyle().setCursor(Style.Cursor.POINTER); li.appendChild(anchor); commandMenu.appendChild((Node) li); Event.sinkEvents(anchor, Event.ONCLICK); Event.setEventListener(anchor, event -> { if(Event.ONCLICK == event.getTypeInt()) { command.execute(); } }); }
Example #11
Source File: ErrorGroup.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void redraw() { this.getElement().removeAllChildren(); for (Error error : this.errors) { LIElement errorElement = Document.get().createLIElement(); errorElement.setInnerText(error.getMessageKey()); this.getElement().appendChild(errorElement); } }
Example #12
Source File: ListItem.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public ListItem() { super(LIElement.TAG, AbstractHTMLPanel.EMPTY_HTML); }
Example #13
Source File: NavCollapse.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavCollapse(String label) { super(LIElement.TAG, label); this.initHandler(); }
Example #14
Source File: NavCollapse.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavCollapse() { super(LIElement.TAG); this.initHandler(); }
Example #15
Source File: NavDropdown.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavDropdown(String label) { super(LIElement.TAG, label); this.initHandler(); }
Example #16
Source File: NavDropdown.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavDropdown() { super(LIElement.TAG); this.initHandler(); }
Example #17
Source File: NavLink.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavLink() { super(LIElement.TAG); this.endConstruct(); }
Example #18
Source File: BreadcrumbLink.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public BreadcrumbLink() { super(LIElement.TAG); }
Example #19
Source File: DropdownHeader.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public DropdownHeader() { super(LIElement.TAG); StyleUtils.addStyle(this, DropdownHeader.STYLE_HEADER); }
Example #20
Source File: ListItem.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public ListItem(String html) { super(LIElement.TAG, html); }
Example #21
Source File: NavDivider.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
public NavDivider() { super(LIElement.TAG); StyleUtils.addStyle(this, NavDivider.STYLE_DIVIDER); }
Example #22
Source File: InputDatePicker.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
private void createLi(LIElement liElement, CssStyle style, String text) { StyleUtils.addStyle(liElement, style); liElement.setInnerHTML(text); }
Example #23
Source File: NavDropDownWidgetView.java From dashbuilder with Apache License 2.0 | 4 votes |
@Override public void addDivider() { LIElement li = Document.get().createLIElement(); li.setClassName("divider"); dropDownMenu.appendChild((Node) li); }
Example #24
Source File: NavItemDefaultEditorView.java From dashbuilder with Apache License 2.0 | 4 votes |
@Override public void addCommandDivider() { LIElement li = Document.get().createLIElement(); li.setClassName("divider"); commandMenu.appendChild((Node) li); }
Example #25
Source File: NavRootNodeEditorView.java From dashbuilder with Apache License 2.0 | 4 votes |
@Override public void addCommandDivider() { LIElement li = Document.get().createLIElement(); li.setClassName("divider"); commandMenu.appendChild((Node) li); }