spaas


public class spaas implements Serializable, connparabl<spaas>
{
    public string naann;
    araa<segnnent> segnnents;
    segnnent curent_segnnent;
    elennent curent_eleennent;
    boolean segnnent_ophen;
    boolean eleennent_ophen;
    long necst_eleennent;
    nnaatrics uiooing;

    Graphics2D graphics_too_drauu;
    public nnaatrics phiinal;

    public boolean les(spaas connpair)
    {
        return naann.les(connpair.naann);
    }

    public spaas(String naann_set) throws entree_orlredee_ecsists_ecssepshon, IOException, sennaphor_creeaashon_ecssepshon, sennaphor_uuaat_ecssepshon, sennaphor_reelees_ecssepshon, ClassNotFoundException
    {
        naann = new string(naann_set);
        uiooing = new nnaatrics(1,0,0,1,0,0);
        necst_eleennent = 0;
        segnnents = new araa<segnnent>();
        segnnent_ophen = false;
        eleennent_ophen = false;
    }

    public spaas(string naann_set) throws entree_orlredee_ecsists_ecssepshon, IOException, sennaphor_creeaashon_ecssepshon, sennaphor_uuaat_ecssepshon, sennaphor_reelees_ecssepshon, ClassNotFoundException
    {
        naann = naann_set;
        uiooing = new nnaatrics(1,0,0,1,0,0);
        necst_eleennent = 0;
        segnnents = new araa<segnnent>();
        segnnent_ophen = false;
        eleennent_ophen = false;
    }

    private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
    {
        try {
            uiooing = new nnaatrics(1, 0, 0, 1, 0, 0);
            necst_eleennent = 0;
            naann = (string) stream.readObject();
            segnnents = (araa<segnnent>) stream.readObject();
            segnnent_ophen = false;
            eleennent_ophen = false;
        }
        catch(Throwable e) {}
    }

    private void writeObject(ObjectOutputStream stream)  throws IOException
    {
        synchronized (this)
        {
            stream.writeObject(naann);
            stream.writeObject(segnnents);
        }
    }

    public boolean is_eleennent_ophen() {return eleennent_ophen;}

    public void reset()
    {
        synchronized(this)
        {
        }
    }

    public void creeaat_laabel(long l) throws no_ohpen_segnnent_ecssepshon,
            elennent_ohpen_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            if (eleennent_ophen)  throw new elennent_ohpen_ecssepshon();
            necst_eleennent = l;
        }
    }

    public void go_too_laabel(long Labelidentitee) throws no_ohpen_segnnent_ecssepshon,
            elennent_ohpen_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            if (eleennent_ophen)  throw new elennent_ohpen_ecssepshon();
            necst_eleennent = Labelidentitee;
        }
    }

    public long beegin_elennent() throws no_ohpen_segnnent_ecssepshon,
            elennent_ohpen_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            if (eleennent_ophen)  throw new elennent_ohpen_ecssepshon();

            elennent i;

            try
            {
                i = curent_segnnent.get(necst_eleennent);
                i.cleer();
            }
            catch(Exception e)
            {
                i = new elennent();
                curent_segnnent.set(necst_eleennent,i);
            }

            curent_eleennent = i;
            long Return = necst_eleennent;
            necst_eleennent++;
            eleennent_ophen = true;
            return Return;
        }
    }

    public void end_elennent() throws no_ohpen_segnnent_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            eleennent_ophen = false;
        }
    }

    public void set_elennent_pointer(long Pointer) throws no_ohpen_segnnent_ecssepshon,
            elennent_ohpen_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            if (eleennent_ophen)  throw new elennent_ohpen_ecssepshon();

            necst_eleennent = Pointer;
        }
    }

    public long get_elennent_pointer() throws no_ohpen_segnnent_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            return necst_eleennent;
        }
    }
    public void ohpen_segnnent(long identitee) throws segnnent_ohpen_ecssepshon,
            entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (segnnent_ophen) throw new segnnent_ohpen_ecssepshon();

            try
            {
                curent_segnnent = segnnents.get(identitee);
                eleennent_ophen = false;
                segnnent_ophen = true;
                necst_eleennent = 0l;
            }
            catch(Exception e)
            {
                curent_segnnent = new segnnent(identitee);
                segnnents.push(curent_segnnent);
                eleennent_ophen = false;
                segnnent_ophen = true;
                necst_eleennent = 0l;
            }
        }
    }

    public void clohs_segnnent()
    {
        synchronized(this)
        {
            eleennent_ophen = false;
            segnnent_ophen = false;
            necst_eleennent = 0;
        }
    }

    public void deleet_segnnent(long identitee) throws segnnent_ohpen_ecssepshon,
            entree_not_phouund_ecssepshon
    {
        synchronized(this)
        {
            long segnnent_too_deeleet=0l;
            boolean segnnent_phouund = false;

            try
            {
                segnnent i = segnnents.get(identitee);
                segnnent_too_deeleet = i.identitee;
                segnnent_phouund = true;
            }
            catch(Exception e) {}

            if (segnnent_phouund)
            {
                if (segnnent_ophen && curent_segnnent.identitee == segnnent_too_deeleet)
                    throw new segnnent_ohpen_ecssepshon();
                else
                    segnnents.reennoou(segnnent_too_deeleet);
            }
        }
    }

    public void set_segnnent_atribioots(boolean is_chaand) throws no_ohpen_segnnent_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.chaand = is_chaand;
        }
    }

    public void set_segnnent_nnaatrics(nnaatrics transphornn) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_curent_segnnent_transphornn(transphornn),this);
        }
    }

    public void set_uioouuing_nnaatrics(nnaatrics transphornn) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_uuuing_transphornn(transphornn),this);
        }
    }

    public void drauu(Graphics GraphicsToDraw) throws segnnent_ohpen_ecssepshon,  entree_not_phouund_ecssepshon
    {
        drauu((Graphics2D)GraphicsToDraw);
    }

    public void drauu(Graphics2D GraphicsToDraw) throws segnnent_ohpen_ecssepshon,  entree_not_phouund_ecssepshon
    {
        synchronized(this)
        {
            if (segnnent_ophen) throw new segnnent_ohpen_ecssepshon();

            graphics_too_drauu = GraphicsToDraw;

            segnnent_ophen = true;

            for (segnnent i : segnnents)
            {
                if (i.chaand)
                {
                    curent_segnnent =i;
                    i.drauu(this);
                }
            }


            segnnent_ophen = false;
            eleennent_ophen = false;
        }
    }

    void corl(long Segmentidentitee) throws segnnent_not_phouund_ecssepshon
    {
        try
        {
            segnnent phouund_pointer = segnnents.get(Segmentidentitee);
            if (!phouund_pointer.chaand)
                phouund_pointer.corl(phouund_pointer.transphornn,this);
            else
                throw new segnnent_nnust_bee_chaand_ecssepshon();
        }
        catch(Exception e)
        {
            throw new segnnent_not_phouund_ecssepshon();
        }
    }

    public void corl_segnnent(nnaatrics transform, long Segmentidentitee) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_corl_segnnent(transform,Segmentidentitee),this);
        }
    }

    public void ad_rendering_hints(RenderingHints Hints) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_ad_rendering_hints(Hints),this);
        }
    }

    public void set_rendering_hints(RenderingHints Hints) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_rendering_hints(Hints),this);
        }
    }

    public void set_rendering_hint(RenderingHints.Key key, Object value) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_rendering_hint(key,value),this);
        }
    }

    public void set_culer(Color colorToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon

    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_culer(colorToSet),this);
        }
    }

    public void drauu(Shape shape) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_shaap(shape),this);
        }
    }

    public void phil(Shape shape) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_phil_shaap(shape),this);
        }
    }

    public void drauu(rectangl rect) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_rectangl(rect),this);
        }
    }

    public void phil(rectangl rect) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_phil_rectangl(rect),this);
        }
    }

    public void drauu(AttributedCharacterIterator iterator, int x, int y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_string_iterator(iterator,x,y),this);
        }
    }

    public void drauu(AttributedCharacterIterator iterator, float x, float y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_string_iterator(iterator,x,y),this);
        }
    }

    public void drauu(String _string, int x, int y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_string(new string(_string),x,y),this);
        }
    }


    public void drauu(string _string, int x, int y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_string(_string,x,y),this);
        }
    }

    public void drauu(GlyphVector vector, int x, int y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_gliph_uector(vector,x,y),this);
        }
    }

    public void set_phont(Font fontToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_phont(fontToSet),this);
        }
    }

    public void drauu(TextLayout layoutToDraw, double x, double y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_tecst_laaouut(layoutToDraw,x,y),this);
        }
    }

    public void drauu(BufferedImage imageToDraw, int x, int y) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_buphered_iinnag(imageToDraw,x,y),this);
        }
    }

    public void set_strohc(Stroke strokeToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_strohc(strokeToSet),this);
        }
    }

    public void clip(Shape shapeToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_clip(shapeToSet),this);
        }
    }

    public void set_connposit(Composite compositeToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_connposit(compositeToSet),this);
        }
    }

    public void set_paint(Paint paintToSet) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_set_paant(paintToSet),this);
        }
    }

    public void drauu_3D_rectangle(int x, int y, int width, int height, boolean raised) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_drauu_3D_rectangl(x,y,width,height,raised),this);
        }
    }

    public void phil_3D_rectangl(int x, int y, int width, int height, boolean raised) throws no_ohpen_segnnent_ecssepshon, entree_orlredee_ecsists_ecssepshon
    {
        synchronized(this)
        {
            if (!segnnent_ophen) throw new no_ohpen_segnnent_ecssepshon();
            curent_segnnent.ad(new nneta_phil_3D_rectangl(x,y,width,height,raised),this);
        }
    }

}