/** Expands the extras panel */
  private void toggleExtras() {

    // 重覆點選,可以造成打開,關閉效果
    detailPanel.setVisible(!detailPanel.isVisible());
    if (detailPanel.isVisible()) {
      // 可以看到內容
      // 顯示完整HTML,到server取得POI詳細內容
      Waggle_ui.coordService.getNode(
          n.fullname,
          new AsyncCallback() {

            public void onFailure(final Throwable caught) {
              GWT.log("Error in CoordinateService!", caught);
              caught.printStackTrace();
              //        doThisBeforeReturn(true);
            }

            public void onSuccess(final Object result) {

              Poi poidata = (Poi) result;
              if (poidata == null) {
                GWT.log("CoordinateRTreeCallback got a null coordinate!", null);
                // MainFrame.message( "找不到符合地點" );
                // doThisBeforeReturn(false);
                return;
              }
              poidetail.setHTML(poidata.toString());
            }
          });
    } else {
      // 清除HTML內容
    }
  }
Exemple #2
0
 private void handleShowHideControlsClick() {
   boolean areControlsVisible = showHideControlsLink.getText().equals(SHOW_CONTROLS);
   allControlsPanel.setVisible(areControlsVisible);
   showHideControlsLink.setText(areControlsVisible ? HIDE_CONTROLS : SHOW_CONTROLS);
   for (CommonPanelListener listener : listeners) {
     listener.onSetControlsVisible(areControlsVisible);
   }
 }
Exemple #3
0
 @Override
 public void setTables(JsArray<TableDto> tables, TableDto selectedTable) {
   clear();
   valuesPanel.setVisible(tables.length() > 0);
   if (tables.length() > 0) {
     tableChooser.addTableSelections(tables);
     tableChooser.selectTable(selectedTable);
   }
 }
  /** Show the calendar container, and positione it in the provided coordinates. */
  public void show(int left, int top) {
    if (needsRedraw) refresh();

    if (calendarDlg == null) {
      assert outer.isAttached()
          : "Calendar has not been attached, even though it is not configured as a popup.";
      outer.setVisible(true);
    } else {
      if (top >= 0 && left >= 0) {
        calendarDlg.setPopupPosition(left, top);
        calendarDlg.show();
        moveIntoVisibleArea();
        DOM.scrollIntoView(calendarGrid.getElement());
      } else {
        calendarDlg.center();
      }
    }
    todayBtn.setFocus(true);
  }
  public LocationEntry(
      final String inName, String infullname, double inx, double iny, int type, String ingeocell) {
    // 設定基本資料
    n.name = inName;
    n.fullname = infullname;
    n.x = inx;
    n.y = iny;
    n.geocell = ingeocell;
    myType = type;

    VerticalPanel contents = new VerticalPanel();
    loctext = new Label(n.name);
    contents.add(loctext);
    contents.add(buildExtras());
    detailPanel.setVisible(false);
    initWidget(contents);

    this.setStyleName("locationEntry");
  }
  private void selectScheduleTypeEditor(ScheduleType scheduleType) {
    // if we are switching to cron type, then hide the start time panel
    if ((isBlockoutDialog == false) && (startTimePanel != null)) {
      if (scheduleType == ScheduleType.CRON) {
        startTimePanel.setVisible(false);
      } else {
        startTimePanel.setVisible(true);
      }
    }

    // hide all panels
    for (Map.Entry<ScheduleType, Panel> me : scheduleTypeMap.entrySet()) {
      me.getValue().setVisible(false);
    }
    // show the selected panel
    Panel p = scheduleTypeMap.get(scheduleType);
    p.setVisible(true);

    TemporalValue tv = scheduleTypeToTemporalValue(scheduleType);
    if (null != tv) {
      // force the recurrence editor to display the appropriate ui
      recurrenceEditor.setTemporalState(tv);
    }
  }
 /** Hide the calendar container. */
 public void hide() {
   if (calendarDlg != null) {
     calendarDlg.hide();
   } else outer.setVisible(false);
 }
 private void addMessage(Widget curMessage) {
   errorPanel.add(curMessage);
   errorPanel.setVisible(true);
 }
 @Override
 public void clearErrors() {
   errorPanel.clear();
   errorPanel.setVisible(false);
 }
 @Override
 public void setFirstDayVisibility(boolean visible) {
   firstDayPanel.setVisible(visible);
 }
 @Override
 public void setMaxIntervalsVisibility(boolean visible) {
   maxIntervalsGroup.setVisible(visible);
 }
 @Override
 public void setHeaderVisible(boolean visible) {
   headerPanel.setVisible(visible);
   separatorPanel.setVisible(visible);
 }