Esempio n. 1
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;
  }
Esempio n. 2
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);
  }
Esempio n. 3
0
  public void toggleRounded() {
    if (!m_actives.hasActivePoint()) return;

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

    m_history.record("toggleGridfit");
  }
Esempio n. 4
0
  public void endMove() {
    if (!m_isMoving) {
      return;
    } // if

    m_isMoving = false;

    m_history.record("move");
  }
Esempio n. 5
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");
  }
Esempio n. 6
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;
  }
Esempio n. 7
0
  public void convertControlPoint() {
    if (!m_actives.hasActiveControlPoint()) {
      return;
    } // if

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

    m_history.record("convertControlPoint");
  }
Esempio n. 8
0
  public void convertContour() {
    if (!m_actives.hasActiveContour()) {
      return;
    } // if

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

    m_history.record("convertContour");
  }
Esempio n. 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");
  }
Esempio n. 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();
  }
Esempio n. 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");
  }
Esempio n. 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");
  }
Esempio n. 13
0
 public void setLicense(String a_value) {
   m_glyph.getHead().setLicense(a_value);
   m_history.record("setLicense");
 }
Esempio n. 14
0
 protected void setUnicode(String a_unicode) {
   m_glyph.getHead().setUnicode(a_unicode);
   m_history.record("setUnicode");
 }
Esempio n. 15
0
 public void setGlyphTitle(String a_title) {
   m_glyph.getHead().setTitle(a_title);
   m_history.record("setGlyphTitle");
 }
Esempio n. 16
0
  public void setIncludeName(String a_name) {
    if (!m_actives.hasActiveInclude()) return;

    m_actives.getActiveInclude().setHref(a_name);
    m_history.record("setIncludeName");
  }
Esempio n. 17
0
  public void removeFileVar(int a_index) {
    m_history.record("removeFileVar");

    m_glyph.getHead().getHeadGlobal().removeParamListParam(a_index);
  }
Esempio n. 18
0
 public void setCopyrightYear(String a_value) {
   m_glyph.getHead().setCopyright(a_value);
   m_history.record("setCopyrightYear");
 }
Esempio n. 19
0
 public void setAuthor(String a_value) {
   m_glyph.getHead().setAuthor(a_value);
   m_history.record("setAuthor");
 }
Esempio n. 20
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");
 }
Esempio n. 21
0
 public void setAdvanceWidth(int a_width) {
   m_glyph.getHead().setAdvanceWidth(a_width);
   m_history.record("setAdvanceWidth");
 }