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

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

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

    m_isMoving = false;

    m_history.record("move");
  }
Exemplo n.º 5
0
  public void convertControlPoint() {
    if (!m_actives.hasActiveControlPoint()) {
      return;
    } // if

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

    m_history.record("convertControlPoint");
  }
Exemplo n.º 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");
  }
Exemplo n.º 7
0
  public void convertContour() {
    if (!m_actives.hasActiveContour()) {
      return;
    } // if

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

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

    m_actives.getActiveInclude().setHref(a_name);
    m_history.record("setIncludeName");
  }
Exemplo n.º 16
0
 public void setGlyphTitle(String a_title) {
   m_glyph.getHead().setTitle(a_title);
   m_history.record("setGlyphTitle");
 }
Exemplo n.º 17
0
 public void redo() {
   m_history.redo();
 }
Exemplo n.º 18
0
  public void removeFileVar(int a_index) {
    m_history.record("removeFileVar");

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