Ejemplo n.º 1
0
  /** Shows a modal dialog to enter a number or number variable name. */
  @Override
  public NumberValue showNumberInputDialog(String title, String message, String initText) {
    // avoid labeling of num
    Construction cons = app.getKernel().getConstruction();
    boolean oldVal = cons.isSuppressLabelsActive();
    cons.setSuppressLabelCreation(true);

    NumberInputHandler handler = new NumberInputHandler(app.getKernel().getAlgebraProcessor());
    InputDialogD id =
        new InputDialogD(((AppD) app), message, title, initText, false, handler, true, false, null);
    id.setVisible(true);

    cons.setSuppressLabelCreation(oldVal);
    return handler.getNum();
  }
Ejemplo n.º 2
0
  /**
   * Shows a modal dialog to enter an angle or angle variable name.
   *
   * @return: Object[] with { NumberValue, AngleInputDialog } pair
   */
  @Override
  public Object[] showAngleInputDialog(String title, String message, String initText) {
    // avoid labeling of num
    Construction cons = app.getKernel().getConstruction();
    boolean oldVal = cons.isSuppressLabelsActive();
    cons.setSuppressLabelCreation(true);

    NumberInputHandler handler = new NumberInputHandler(app.getKernel().getAlgebraProcessor());
    AngleInputDialog id =
        new AngleInputDialog(((AppD) app), message, title, initText, false, handler, true);
    id.setVisible(true);

    cons.setSuppressLabelCreation(oldVal);
    Object[] ret = {handler.getNum(), id};
    return ret;
  }