Beispiel #1
0
  /**
   * Displays the redefine dialog for geo
   *
   * @param allowTextDialog whether text dialog should be used for texts
   */
  @Override
  public void showRedefineDialog(GeoElement geo, boolean allowTextDialog) {
    if (allowTextDialog && geo.isGeoText() && !geo.isTextCommand()) {
      showTextDialog((GeoText) geo);
      return;
    }

    String str = geo.getRedefineString(false, true);

    InputHandler handler = new RedefineInputHandler(app, geo, str);

    InputDialogD id =
        new InputDialogD(
            ((AppD) app),
            geo.getNameDescription(),
            app.getPlain("Redefine"),
            str,
            true,
            handler,
            geo);
    id.showSymbolTablePopup(true);
    id.setVisible(true);
  }
Beispiel #2
0
  /** Displays the rename dialog for geo */
  @Override
  public void showRenameDialog(
      GeoElement geo, boolean storeUndo, String initText, boolean selectInitText) {
    if (!app.isRightClickEnabled()) return;

    geo.setLabelVisible(true);
    geo.updateVisualStyleRepaint();

    InputHandler handler = new RenameInputHandler(app, geo, storeUndo);

    // Michael Borcherds 2008-03-25
    // a Chinese friendly version
    InputDialogD id =
        new InputDialogD(
            ((AppD) app),
            "<html>"
                + app.getLocalization()
                    .getPlain("NewNameForA", "<b>" + geo.getNameDescription() + "</b>")
                + // eg New name for <b>Segment a</b>
                "</html>",
            app.getPlain("Rename"),
            initText,
            false,
            handler,
            false,
            selectInitText,
            null);

    /*
     * InputDialog id = new InputDialog( this, "<html>" +
     * app.getPlain("NewName") + " " + app.getPlain("for") + " <b>" +
     * geo.getNameDescription() + "</b></html>", app.getPlain("Rename"),
     * initText, false, handler, true, selectInitText);
     */

    id.setVisible(true);
  }