source: gs3-extensions/atlas-src/trunk/src/org/greenstone/client/MenuItem.java@ 22277

Last change on this file since 22277 was 22277, checked in by sjm84, 14 years ago

Added several improvements to the code such as the ability to remove places if they from the text and map if they should not be places

File size: 690 bytes
Line 
1package org.greenstone.client;
2
3import com.google.gwt.event.dom.client.ClickHandler;
4import com.google.gwt.user.client.DOM;
5import com.google.gwt.user.client.Element;
6import com.google.gwt.user.client.ui.Label;
7
8public class MenuItem
9{
10 protected Element _menuElement = DOM.createDiv();
11 protected ClickHandler _onClick = null;
12
13 public MenuItem(String text, ClickHandler onClick)
14 {
15 _menuElement.getStyle().setProperty("cursor", "pointer");
16 _menuElement.setInnerText(text);
17
18 _onClick = onClick;
19 }
20
21 public boolean condition()
22 {
23 return true;
24 }
25
26 public ClickHandler getClickHandler()
27 {
28 return _onClick;
29 }
30
31 public Element getMenuElement()
32 {
33 return _menuElement;
34 }
35}
Note: See TracBrowser for help on using the repository browser.