コード例 #1
0
 private void resizeHeightSuggestor() {
   if (suggestor != null) {
     RootPanel rp = RootPanel.get();
     int h = rp.getOffsetHeight() - 200;
     suggestor.setHeightTo(h);
   }
 }
コード例 #2
0
  public void createSuggestor(int x, int y, String query) {

    /*
     * Register coordinates
     */
    this.x = x;
    this.y = y;

    /*
     * Remove suggestor from root panel
     */
    RootPanel rp = RootPanel.get();

    if (suggestor != null) {
      rp.remove(suggestor);

      suggestor.destroy();
      suggestor = null;
    }

    /*
     * Build requestor
     */
    // buildSuggestorAsync(query);
    buildSuggestorSync(query);
  }
コード例 #3
0
  public void moveSuggestorTo(int x, int y) {
    if (suggestor != null) {
      suggestor.moveTo(x, y);

      // dynamic adjust height
      resizeHeightSuggestor();
    }
  }
コード例 #4
0
  public void removeSuggestor() {

    RootPanel rp = RootPanel.get();

    if (suggestor != null) {
      rp.remove(suggestor);

      suggestor.destroy();
      suggestor = null;
    }
  }
コード例 #5
0
  public void focusToSuggestGrid() {

    if (suggestor != null) suggestor.focusToSuggestGrid();
  }