Exemple #1
0
  protected void showEditor() {
    if (myTextEditor == null) {
      myTextEditor = new TextBox();
      myTextEditor.setStylePrimaryName("field_edit");
      myTextEditor.addValueChangeHandler(
          new ValueChangeHandler<String>() {
            public void onValueChange(ValueChangeEvent<String> aEvent) {
              hideEditor(true);
            }
          });
      myTextEditor.addBlurHandler(
          new BlurHandler() {

            public void onBlur(BlurEvent aEvent) {
              hideEditor(false);
            }
          });
    }
    if (allowHtml) {
      myTextEditor.setText(myHtmlView.getHTML());
      myOuterPanel.remove(myHtmlView);
    } else {
      myTextEditor.setText(myTextView.getText());
      myOuterPanel.remove(myTextView);
    }
    myOuterPanel.add(myTextEditor);
    myTextEditor.setFocus(true);
  }
 @Override
 public void clearErrorMessage() {
   if (holder.getWidgetCount() == 1) {
     return;
   }
   holder.remove(1);
 }
  private void plot() {
    if (dygraphs != null) {
      if (panel.remove(dygraphs)) ;
    }

    String eq = textArea.getValue();

    double x1 = Double.parseDouble(fromTb.getValue());
    double x2 = Double.parseDouble(toTb.getValue());
    double xs = 1.0 * (x2 - x1) / width;

    JsArray<JsArrayMixed> data = JsArray.createArray().cast();
    for (int i = 0; i < width; i++) {
      double x = x1 + i * xs;
      JsArrayNumber y = evalFn(eq, x);
      JsArrayMixed row = JsArrayMixed.createArray().cast();
      row.push(x);
      for (int j = 0; j < y.length(); j++) {
        row.push(y.get(j));
      }
      data.push(row);
    }
    dygraphs = new Dygraphs(data, null);
    dygraphs.setPixelSize(width, height);
    panel.add(dygraphs);
  }
  /**
   * Removes a widget from the button panel.
   *
   * <p>
   *
   * @param w the widget to remove
   */
  public void removeButton(Widget w) {

    m_buttonPanel.remove(w);
    if (CmsCoreProvider.get().isIe7()) {
      m_buttonPanel.getElement().getStyle().setWidth(m_buttonPanel.getWidgetCount() * 22, Unit.PX);
    }
  }
Exemple #5
0
 protected void hideEditor(boolean updateValue) {
   myOuterPanel.remove(myTextEditor);
   if (allowHtml) {
     myOuterPanel.add(myHtmlView);
   } else {
     myOuterPanel.add(myTextView);
   }
   if (updateValue) {
     setValue(myTextEditor.getValue(), true);
   }
 }
 private void removeWidget(V widget) {
   contentPanel.remove(getEntry(widget));
 }
 /**
  * Removes a new non-visible component from this panel. Note that this method will not remove the
  * component from the form component! This needs to be done separately.
  *
  * @param component Simple mock component to be removed
  */
 public void removeComponent(MockComponent component) {
   componentsPanel.remove(component);
   if (componentsPanel.getWidgetCount() == 0) {
     heading.setText("");
   }
 }
 public void removeFrequencyTable() {
   App.debug("removeFrequencyTable");
   plotPanelSouth.remove(spFrequencyTable);
   plotPanel.updateSize();
   resize(false);
 }
 /** {@inheritDoc} */
 @Override
 protected void onClose() {
   uploadPanel.remove(file);
 }
Exemple #10
0
 public void removeProjectIcon(String name) {
   projectIconsFlowPanel.remove(iconMap.remove(name));
 }
Exemple #11
0
 @Override
 public boolean remove(Widget w) {
   return _panel.remove(w);
 }
Exemple #12
0
 @Override
 public void onTransitionEnd() {
   super.onTransitionEnd();
   _panel.remove(0);
 }
 /**
  * Removes a widget from the content part of this {@link JQMCollapsible} instance.
  *
  * @return true if the widget was removed
  */
 public boolean remove(Widget widget) {
   return flow.remove(widget);
 }