示例#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();
 }