setHasLedger(icon.hasLedger());
setWithLedger(icon.hasLedger());
    public IconGlyph (SymbolIcon icon,                      Shape      shape)    {        try {            final int displayFactor = constants.displayFactor.getValue();            // Build a picture            Picture  picture = new Picture(icon.getImage(), 2f * displayFactor);            // Build related vertical lag            GlyphLag vLag = new GlyphLag(new VerticalOrientation());            vLag.setName("iconLag");            vLag.setVertexClass(GlyphSection.class);            SectionsBuilder<GlyphLag, GlyphSection> lagBuilder;            lagBuilder = new SectionsBuilder<GlyphLag, GlyphSection>(                vLag,                new JunctionAllPolicy()); // catch all            lagBuilder.createSections(picture, 0); // minRunLength            // Retrieve the whole glyph made of all sections            setLag(vLag);            for (GlyphSection section : vLag.getSections()) {                addSection(section, /* link => */                           true);            }            //vLag.dump("Icon Lag");            //glyph.drawAscii();            // Glyph features            setShape(shape);            // Ordinate (approximate value)            Rectangle box = getContourBox();            int       y = box.y;            // Staff interline value            int interline = displayFactor * ScoreConstants.INTER_LINE;            setInterline(interline);            // Mass center            PixelPoint centroid = getCentroid();            Scale      scale = new Scale(interline, 1);            PagePoint  pgCentroid = scale.toPagePoint(centroid);            // Number of connected stems            if (icon.getStemNumber() != null) {                setStemNumber(icon.getStemNumber());            }            // Has a related ledger ?            if (icon.hasLedger() != null) {                setHasLedger(icon.hasLedger());            }            // Vertical position wrt staff            if (icon.getPitchPosition() != null) {                setPitchPosition(icon.getPitchPosition());            }            if (logger.isFineEnabled()) {                dump();            }        } catch (Exception ex) {            ex.printStackTrace();        }    }