List of usage examples for com.google.gwt.user.client.ui HTMLPanel createUniqueId
public static String createUniqueId()
From source file:org.overlord.gadgets.web.client.widgets.ProgressBar.java
License:Open Source License
public ProgressBar() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.button.RefreshAnchor.java
License:Apache License
/** * Creates a new RefreshAnchor with a randomly generated ID * */ public RefreshAnchor() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.DatePickerTextBox.java
License:Apache License
/** * Create a DatePickerTextBox with a rendomly generated ID. The ID is required * because the JQuery data picker needs a specific ID to connect to. * /*from w w w. j a v a 2s. c om*/ */ public DatePickerTextBox() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.ExpandingTextArea.java
License:Apache License
/** * Constructor * A unique ID will be generated. */ public ExpandingTextArea() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.LongMessage.java
License:Apache License
/** * Create a new LongMessage Panel with a randomly generated ID */ public LongMessage() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.multivaluesuggest.MultivalueSuggestBoxBase.java
License:Apache License
/** * Constructor./*from w ww. j a va2s. c om*/ * @param helper - a MultivalueSuggestHelper object * @param isMultivalued - whether or not to allow multiple values * @param placeFormFeedback - if false, the FormFeedback will be placed by the calling class */ public MultivalueSuggestBoxBase(MultivalueSuggestHelper helper, boolean isMultivalued, boolean placeFormFeedback) { m_helper = helper; m_isMultivalued = isMultivalued; m_panel = createMainPanel(isMultivalued, m_selectedItemsContainerId, m_suggestBoxContainerId); m_panel.addStyleName("spiffy-mvsb"); m_panel.getElement().setId(HTMLPanel.createUniqueId()); final TextBoxBase textfield = new TextBox(); // if (isMultivalued) { // m_panel.addStyleName("textarearow"); //// textfield = new TextArea(); // } else { // m_panel.addStyleName("textfieldrow"); //// textfield = new TextBox(); // } //Create our own SuggestOracle that queries REST endpoint SuggestOracle oracle = new RestSuggestOracle(); //initialize the SuggestBox m_field = new SuggestBox(oracle, textfield); m_feedback = new FormFeedback(); if (isMultivalued) { m_panel.addStyleName("wideTextField"); m_panel.addStyleName("multivalue"); //have to do this here b/c gwt suggest box wipes //style name if added in previous if textfield.addStyleName("multivalue"); /* * We want to adjust the width of the text box so it will show all * of the text in the box. If the user is typing then we need to * get those events using key press events so we can grow and shrink * the text box while the user is typing. However, if the user pastes * or cuts text from the box using the mouse context menu or the paste * or cut keyboard shortcut then we need to use the change event since * the new value won't be present when the key press is fired. */ textfield.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { adjustTextWidth(); m_lastCurPos = textfield.getCursorPos(); } }); textfield.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { adjustTextWidth(); m_lastCurPos = textfield.getCursorPos(); } }); } else { m_field.addStyleName("wideTextField"); } m_field.addSelectionHandler(this); m_field.getTextBox().addKeyUpHandler(this); m_panel.add(m_field, m_suggestBoxContainerId); if (placeFormFeedback) { m_panel.add(m_feedback); } initWidget(m_panel); /* * Create a Map that holds the values that should be stored. * It will be keyed on "display value", so that any time a "display value" is added or removed * the valueMap can be updated. */ m_valueMap = new HashMap<String, String>(); resetPageIndices(); m_validText = STRINGS.valid(); m_loadingText = STRINGS.loading(); }
From source file:org.spiffyui.client.widgets.multivaluesuggest.MultivalueSuggestBoxBase.java
License:Apache License
/** * Create and return a SelectedItem populated with the option * @param option - an Option bean/*from w w w . ja va2s . co m*/ * @return the SelectedItem to be pushed */ protected SelectedItem createSelectedItem(Option option) { return new SelectedItem(HTMLPanel.createUniqueId(), option); }
From source file:org.spiffyui.client.widgets.ProgressBar.java
License:Apache License
/** * Create a progress bar with the specified ID. The ID is required * because the progress bar needs a specific ID to connect to. * /* w ww . j ava 2 s .c o m*/ */ public ProgressBar() { this(HTMLPanel.createUniqueId()); }
From source file:org.spiffyui.client.widgets.SlideDownPrefsPanel.java
License:Apache License
/** * Creates a new panel with a randomly generated ID * */ public SlideDownPrefsPanel() { this(HTMLPanel.createUniqueId(), null); }
From source file:org.spiffyui.client.widgets.TimePickerTextBox.java
License:Apache License
/** * Create a TimePickerTextBox with a random ID. The ID is required * because the JQuery data picker needs a specific ID to connect to. * /*ww w . j av a 2 s . c om*/ */ public TimePickerTextBox() { this(HTMLPanel.createUniqueId()); }