Пример #1
0
  public void addFileVar() {
    XParamListParam param = new XParamListParam();
    param.setName("New parameter");
    param.setContent(0.0);
    m_history.record("addFileVar");

    m_glyph.getHead().getHeadGlobal().addParamListParam(param);
  }
Пример #2
0
  /**
   * pasted module from clipboard or ModuleInvokeAction
   *
   * @param a_module
   */
  public XModule addModule(EModuleInvoke a_module) {
    m_actives.unselectAll();
    m_actives.addActive(a_module);
    m_glyph.getBody().addModule(a_module);
    m_history.record("addModule");

    return a_module;
  }
Пример #3
0
  public void toggleRounded() {
    if (!m_actives.hasActivePoint()) return;

    EContourPoint contourPoint = m_actives.getActivePoint();
    contourPoint.toggleRounded();

    m_history.record("toggleGridfit");
  }
Пример #4
0
  public void endMove() {
    if (!m_isMoving) {
      return;
    } // if

    m_isMoving = false;

    m_history.record("move");
  }
Пример #5
0
  public void convertControlPoint() {
    if (!m_actives.hasActiveControlPoint()) {
      return;
    } // if

    EControlPoint controlPoint = m_actives.getActiveControlPoint();
    controlPoint.convert();

    m_history.record("convertControlPoint");
  }
Пример #6
0
  public void addInclude(XInclude a_include) throws CircularIncludeException {
    if (isCircularInclude(a_include.getHref())) {
      throw new CircularIncludeException();
    } // if

    m_actives.unselectAll();
    m_actives.addActive((GlyphObject) a_include);
    m_glyph.getBody().addInclude(a_include);
    m_history.record("addInclude");
  }
Пример #7
0
  public void convertContour() {
    if (!m_actives.hasActiveContour()) {
      return;
    } // if

    EContour contour = m_actives.getActiveContour();
    contour.convert();

    m_history.record("convertContour");
  }
Пример #8
0
  private void init(URL a_url) {
    m_glyph = loadGlyphElement(a_url);
    ModuleManager.getSingletonInstance().clear();

    // m_display = Engine.getSingletonInstance().getDisplay();
    m_history = new HistoryList(this);

    m_history.record("loadFile");
    m_savedTime = m_modifiedTime;
  }
Пример #9
0
  public void addPoint() {
    if (!m_actives.hasActivePoint()) {
      return;
    } // if

    EContourPoint contourPoint = m_actives.getActivePoint();
    m_actives.unselectAll();
    m_actives.addActive(contourPoint.add());

    m_history.record("addPoint");
  }
Пример #10
0
  public void remove() {
    if (!m_actives.hasSelected()) return;

    int i;
    for (i = 0; i < m_actives.size(); i++) {
      GlyphObject active = m_actives.get(i);
      active.remove();
    } // for i

    m_history.record("remove");

    m_actives.unselectAll();
  }
Пример #11
0
  public void toggleOnOff() {
    if (!m_actives.hasSelected()) return;

    int i;
    for (i = 0; i < m_actives.size(); i++) {
      GlyphObject active = m_actives.get(i);
      if (!(active instanceof EContourPoint)) {
        continue;
      } // if

      EContourPoint point = (EContourPoint) active;
      point.toggleOnCurve();
    } // for i

    m_history.record("toggleOnOff");
  }
Пример #12
0
  public void addHint(int a_ppem) {
    if (!m_actives.hasActivePoint()) return;

    EContourPoint contourPoint = m_actives.getActivePoint();
    m_actives.unselectAll();
    m_actives.addActive(contourPoint.addHint(a_ppem));

    if (contourPoint.hasControlPoint1()) {
      EContourPoint p = (EContourPoint) contourPoint.getControlPoint1().getContourPoint();
      m_actives.addActive(p.addHint(a_ppem));
    } // if

    if (contourPoint.hasControlPoint2()) {
      EContourPoint p = (EContourPoint) contourPoint.getControlPoint2().getContourPoint();
      m_actives.addActive(p.addHint(a_ppem));
    } // if

    m_history.record("addHint");
  }
Пример #13
0
 protected void setUnicode(String a_unicode) {
   m_glyph.getHead().setUnicode(a_unicode);
   m_history.record("setUnicode");
 }
Пример #14
0
 public void setLicense(String a_value) {
   m_glyph.getHead().setLicense(a_value);
   m_history.record("setLicense");
 }
Пример #15
0
  public void setIncludeName(String a_name) {
    if (!m_actives.hasActiveInclude()) return;

    m_actives.getActiveInclude().setHref(a_name);
    m_history.record("setIncludeName");
  }
Пример #16
0
 public void setGlyphTitle(String a_title) {
   m_glyph.getHead().setTitle(a_title);
   m_history.record("setGlyphTitle");
 }
Пример #17
0
 public void redo() {
   m_history.redo();
 }
Пример #18
0
  public void removeFileVar(int a_index) {
    m_history.record("removeFileVar");

    m_glyph.getHead().getHeadGlobal().removeParamListParam(a_index);
  }
Пример #19
0
 public void setAuthor(String a_value) {
   m_glyph.getHead().setAuthor(a_value);
   m_history.record("setAuthor");
 }
Пример #20
0
 public void setCopyrightYear(String a_value) {
   m_glyph.getHead().setCopyright(a_value);
   m_history.record("setCopyrightYear");
 }
Пример #21
0
 public void setAdvanceWidth(int a_width) {
   m_glyph.getHead().setAdvanceWidth(a_width);
   m_history.record("setAdvanceWidth");
 }
Пример #22
0
 /**
  * add contour from clipboard or ContourAction
  *
  * @param a_contour
  */
 public void addContour(EContour a_contour) {
   m_actives.unselectAll();
   m_actives.addActive(a_contour);
   m_glyph.getBody().addContour(a_contour);
   m_history.record("addContour");
 }
Пример #23
0
 public void undo() {
   m_history.undo();
 }