/** * 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; }
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); }
public void toggleRounded() { if (!m_actives.hasActivePoint()) return; EContourPoint contourPoint = m_actives.getActivePoint(); contourPoint.toggleRounded(); m_history.record("toggleGridfit"); }
public void endMove() { if (!m_isMoving) { return; } // if m_isMoving = false; m_history.record("move"); }
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"); }
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; }
public void convertControlPoint() { if (!m_actives.hasActiveControlPoint()) { return; } // if EControlPoint controlPoint = m_actives.getActiveControlPoint(); controlPoint.convert(); m_history.record("convertControlPoint"); }
public void convertContour() { if (!m_actives.hasActiveContour()) { return; } // if EContour contour = m_actives.getActiveContour(); contour.convert(); m_history.record("convertContour"); }
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"); }
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(); }
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"); }
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"); }
public void setLicense(String a_value) { m_glyph.getHead().setLicense(a_value); m_history.record("setLicense"); }
protected void setUnicode(String a_unicode) { m_glyph.getHead().setUnicode(a_unicode); m_history.record("setUnicode"); }
public void setGlyphTitle(String a_title) { m_glyph.getHead().setTitle(a_title); m_history.record("setGlyphTitle"); }
public void setIncludeName(String a_name) { if (!m_actives.hasActiveInclude()) return; m_actives.getActiveInclude().setHref(a_name); m_history.record("setIncludeName"); }
public void removeFileVar(int a_index) { m_history.record("removeFileVar"); m_glyph.getHead().getHeadGlobal().removeParamListParam(a_index); }
public void setCopyrightYear(String a_value) { m_glyph.getHead().setCopyright(a_value); m_history.record("setCopyrightYear"); }
public void setAuthor(String a_value) { m_glyph.getHead().setAuthor(a_value); m_history.record("setAuthor"); }
/** * 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"); }
public void setAdvanceWidth(int a_width) { m_glyph.getHead().setAdvanceWidth(a_width); m_history.record("setAdvanceWidth"); }