igeo

## Class IServer

- java.lang.Object
- - igeo.IServer

- All Implemented Interfaces:
    IServerI

      public class IServer
      extends java.lang.Object
      implements IServerI

  A class of server to contain and manage instances of IObject. Drawing function is separated to IGraphicServer.
  Author:
    Satoru Sugihara
  See Also:
    `IGraphicServer`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IDynamicServer` | `dynamicServer`
    `IGraphicServer` | `graphicServer`
    `IG` | `ig`
    `java.util.ArrayList<ILayer>` | `layers`
    `java.util.ArrayList<IObject>` | `objects`
    `int` | `stateCount`
    `IUnit` | `unit`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IServer(IG ig)`
    `IServer(IG ig, IPanelI panel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(IObject e)`
    `java.util.ArrayList<IObject>` | `allObjects()`
    `void` | `background(IColor c1, IColor c2, IColor c3, IColor c4)`
    `void` | `background(java.lang.String imageFilename)`
    `void` | `bg(IColor c1, IColor c2, IColor c3, IColor c4)`
    `void` | `bg(java.lang.String imageFilename)`
    `IBrep` | `brep(int i)` Returns i-th IBrep object contained in objects or null if not found.
    `int` | `brepNum()` number of IBrep in objects
    `IBrep[]` | `breps()` Returns all brep objects contained in objects.
    `void` | `clear()`
    `ICurve` | `curve(int i)` Returns i-th ICurve object contained in objects or null if not found.
    `int` | `curveNum()` number of ICurve in objects
    `ICurve[]` | `curves()` Returns all curve objects contained in objects.
    `void` | `deleteLayer(ILayer l)`
    `void` | `deleteLayer(int i)`
    `void` | `deleteLayer(java.lang.String layerName)`
    `int` | `duration()`
    `void` | `duration(int dur)`
    `IDynamicServer` | `dynamicServer()`
    `IGeometry[]` | `geometries()` Returns all geometry objects contained in objects.
    `IGeometry` | `geometry(int i)` Returns i-th IGeometry object contained in objects or null if not found.
    `int` | `geometryNum()` number of the IGeometry in objects
    `ILayer[]` | `getAllLayers()`
    `java.util.ArrayList<IObject>` | `getAllObjects()`
    `IBrep` | `getBrep(int i)` alias of brep(int)
    `int` | `getBrepNum()` alias of brepNum()
    `IBrep[]` | `getBreps()` alias of breps
    `ICurve` | `getCurve(int i)` alias of curve(int)
    `int` | `getCurveNum()` alias of curveNum()
    `ICurve[]` | `getCurves()` alias of curves()
    `IGeometry[]` | `getGeometries()` alias of breps
    `IGeometry` | `getGeometry(int i)` alias of geometry(int)
    `int` | `getGeometryNum()` alias of geometryNum()
    `ILayer` | `getLayer(int i)`
    `ILayer` | `getLayer(java.lang.String layerName)`
    `IMesh` | `getMesh(int i)` alias of mesh(int)
    `IMesh[]` | `getMeshes()` alias of meshes()
    `int` | `getMeshNum()` alias of meshNum()
    `IObject` | `getObject(java.lang.Class cls, int i)` alias of object(Class,int)
    `IObject` | `getObject(int i)`
    `int` | `getObjectNum()` alias of objectNum()
    `int` | `getObjectNum(java.lang.Class cls)` alias of objectNum(Class)
    `IObject[]` | `getObjects()`
    `IObject[]` | `getObjects(java.lang.Class cls)` alias of objects(Class)
    `IPoint` | `getPoint(int i)` alias of point(int)
    `int` | `getPointNum()` alias of pointsNum()
    `IPoint[]` | `getPoints()` alias of points()
    `IPolycurve` | `getPolycurve(int i)` alias of polycurve(int)
    `int` | `getPolycurveNum()` alias of polycurveNum()
    `IPolycurve[]` | `getPolycurves()` alias of curves()
    `ISurface` | `getSurface(int i)` alias of surface(int)
    `int` | `getSurfaceNum()` alias of surfaceNum()
    `ISurface[]` | `getSurfaces()` alias of surfaces()
    `IText` | `getText(int i)` alias of text(int)
    `int` | `getTextNum()` alias of textNum()
    `IText[]` | `getTexts()` alias of texts
    `IGraphicServer` | `graphicServer()`
    `boolean` | `isGraphicMode()`
    `boolean` | `isRunning()`
    `ILayer` | `layer(int i)`
    `ILayer` | `layer(java.lang.String layerName)`
    `int` | `layerNum()`
    `ILayer[]` | `layers()`
    `IMesh` | `mesh(int i)` Returns i-th IMesh object contained in objects or null if not found.
    `IMesh[]` | `meshes()` Returns all meshe objects contained in objects.
    `int` | `meshNum()` number of IMesh in objects
    `IObject` | `object(java.lang.Class cls, int i)` Returns i-th object contained in objects or null if not found.
    `IObject` | `object(int i)`
    `int` | `objectNum()`
    `int` | `objectNum(java.lang.Class cls)` number of the specified class in objects
    `IObject[]` | `objects()` Returns all objects contained in objects.
    `IObject[]` | `objects(java.lang.Class cls)` Returns all objects of specified class contained in objects.
    `void` | `pause()`
    `IPoint` | `point(int i)` Returns i-th IPoint object contained in objects or null if not found.
    `int` | `pointNum()` number of IPoint in objects
    `IPoint[]` | `points()` Returns all point objects contained in objects.
    `IPolycurve` | `polycurve(int i)` Returns i-th IPolycurve object contained in objects or null if not found.
    `int` | `polycurveNum()` number of IPolycurve in objects Note that IPolycurve contains multiple ICurve and they show up in curves() as well.
    `IPolycurve[]` | `polycurves()` Returns all polycurve objects contained in objects.
    `void` | `remove(int i)`
    `void` | `remove(IObject e)`
    `void` | `resume()`
    `IServer` | `server()`
    `void` | `setGraphicMode(IGraphicMode mode)`
    `void` | `start()`
    `int` | `stateCount()`
    `void` | `stop()`
    `ISurface` | `surface(int i)` Returns i-th ISurface object contained in objects or null if not found.
    `int` | `surfaceNum()` number of ISurface in objects
    `ISurface[]` | `surfaces()` Returns all surface objects contained in objects.
    `IText` | `text(int i)` Returns i-th IText object contained in objects or null if not found.
    `int` | `textNum()` number of IText in objects
    `IText[]` | `texts()` Returns all text objects contained in objects.
    `int` | `time()`
    `void` | `time(int tm)`
    `IUnit` | `unit()`
    `void` | `unit(IUnit.Type u)`
    `void` | `unit(IUnit u)`
    `void` | `unit(java.lang.String unitName)`
    `void` | `updateState()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### objects

          public java.util.ArrayList<IObject> objects

    - #### layers

          public java.util.ArrayList<ILayer> layers

    - #### graphicServer

          public IGraphicServer graphicServer

    - #### dynamicServer

          public IDynamicServer dynamicServer

    - #### ig

          public IG ig

    - #### stateCount

          public int stateCount

    - #### unit

          public IUnit unit

  - ### Constructor Detail

    - #### IServer

          public IServer(IG ig)

    - #### IServer

          public IServer(IG ig,
                         IPanelI panel)

  - ### Method Detail

    - #### server

          public IServer server()

      Specified by:
        `server` in interface `IServerI`

    - #### dynamicServer

          public IDynamicServer dynamicServer()

    - #### graphicServer

          public IGraphicServer graphicServer()

    - #### unit

          public IUnit unit()

    - #### unit

          public void unit(IUnit u)

    - #### unit

          public void unit(IUnit.Type u)

    - #### unit

          public void unit(java.lang.String unitName)

    - #### add

          public void add(IObject e)

    - #### isGraphicMode

          public boolean isGraphicMode()

    - #### setGraphicMode

          public void setGraphicMode(IGraphicMode mode)

    - #### bg

          public void bg(IColor c1,
                         IColor c2,
                         IColor c3,
                         IColor c4)

    - #### background

          public void background(IColor c1,
                                 IColor c2,
                                 IColor c3,
                                 IColor c4)

    - #### bg

          public void bg(java.lang.String imageFilename)

    - #### background

          public void background(java.lang.String imageFilename)

    - #### getAllObjects

          public java.util.ArrayList<IObject> getAllObjects()

    - #### allObjects

          public java.util.ArrayList<IObject> allObjects()

    - #### getObject

          public IObject getObject(int i)

    - #### object

          public IObject object(int i)

    - #### objectNum

          public int objectNum()

    - #### getObjectNum

          public int getObjectNum()

      alias of objectNum()

    - #### remove

          public void remove(int i)

    - #### remove

          public void remove(IObject e)

    - #### clear

          public void clear()

    - #### stateCount

          public int stateCount()

    - #### updateState

          public void updateState()

    - #### duration

          public void duration(int dur)

    - #### duration

          public int duration()

    - #### time

          public void time(int tm)

    - #### time

          public int time()

    - #### pause

          public void pause()

    - #### resume

          public void resume()

    - #### isRunning

          public boolean isRunning()

    - #### start

          public void start()

    - #### stop

          public void stop()

    - #### points

          public IPoint[] points()

      Returns all point objects contained in objects. IPointR objects are not included.

    - #### getPoints

          public IPoint[] getPoints()

      alias of points()

    - #### curves

          public ICurve[] curves()

      Returns all curve objects contained in objects. ICurveR objects are not included.

    - #### getCurves

          public ICurve[] getCurves()

      alias of curves()

    - #### polycurves

          public IPolycurve[] polycurves()

      Returns all polycurve objects contained in objects. Note that IPolycurve contains multiple ICurve and they show up in curves() as well. ICurve - IPolycurve relationship is still under work. This is temporary measure.

    - #### getPolycurves

          public IPolycurve[] getPolycurves()

      alias of curves()

    - #### surfaces

          public ISurface[] surfaces()

      Returns all surface objects contained in objects. ISurfaceR objects are not included.

    - #### getSurfaces

          public ISurface[] getSurfaces()

      alias of surfaces()

    - #### meshes

          public IMesh[] meshes()

      Returns all meshe objects contained in objects. IMeshR objects are not included.

    - #### getMeshes

          public IMesh[] getMeshes()

      alias of meshes()

    - #### breps

          public IBrep[] breps()

      Returns all brep objects contained in objects.

    - #### getBreps

          public IBrep[] getBreps()

      alias of breps

    - #### texts

          public IText[] texts()

      Returns all text objects contained in objects.

    - #### getTexts

          public IText[] getTexts()

      alias of texts

    - #### geometries

          public IGeometry[] geometries()

      Returns all geometry objects contained in objects.

    - #### getGeometries

          public IGeometry[] getGeometries()

      alias of breps

    - #### objects

          public IObject[] objects(java.lang.Class cls)

      Returns all objects of specified class contained in objects.

    - #### getObjects

          public IObject[] getObjects(java.lang.Class cls)

      alias of objects(Class)

    - #### objects

          public IObject[] objects()

      Returns all objects contained in objects.

    - #### getObjects

          public IObject[] getObjects()

    - #### point

          public IPoint point(int i)

      Returns i-th IPoint object contained in objects or null if not found. IPointR objects are not included.

    - #### getPoint

          public IPoint getPoint(int i)

      alias of point(int)

    - #### curve

          public ICurve curve(int i)

      Returns i-th ICurve object contained in objects or null if not found. ICurveR objects are not included.

    - #### getCurve

          public ICurve getCurve(int i)

      alias of curve(int)

    - #### polycurve

          public IPolycurve polycurve(int i)

      Returns i-th IPolycurve object contained in objects or null if not found. Note that IPolycurve contains multiple ICurve and they show up in curves() as well. ICurve - IPolycurve relationship is still under work. This is temporary measure.

    - #### getPolycurve

          public IPolycurve getPolycurve(int i)

      alias of polycurve(int)

    - #### surface

          public ISurface surface(int i)

      Returns i-th ISurface object contained in objects or null if not found. ISurfaceR objects are not included.

    - #### getSurface

          public ISurface getSurface(int i)

      alias of surface(int)

    - #### mesh

          public IMesh mesh(int i)

      Returns i-th IMesh object contained in objects or null if not found. IMeshR objects are not included.

    - #### getMesh

          public IMesh getMesh(int i)

      alias of mesh(int)

    - #### brep

          public IBrep brep(int i)

      Returns i-th IBrep object contained in objects or null if not found.

    - #### getBrep

          public IBrep getBrep(int i)

      alias of brep(int)

    - #### text

          public IText text(int i)

      Returns i-th IText object contained in objects or null if not found.

    - #### getText

          public IText getText(int i)

      alias of text(int)

    - #### geometry

          public IGeometry geometry(int i)

      Returns i-th IGeometry object contained in objects or null if not found.

    - #### getGeometry

          public IGeometry getGeometry(int i)

      alias of geometry(int)

    - #### object

          public IObject object(java.lang.Class cls,
                                int i)

      Returns i-th object contained in objects or null if not found.

    - #### getObject

          public IObject getObject(java.lang.Class cls,
                                   int i)

      alias of object(Class,int)

    - #### pointNum

          public int pointNum()

      number of IPoint in objects

    - #### getPointNum

          public int getPointNum()

      alias of pointsNum()

    - #### curveNum

          public int curveNum()

      number of ICurve in objects

    - #### getCurveNum

          public int getCurveNum()

      alias of curveNum()

    - #### polycurveNum

          public int polycurveNum()

      number of IPolycurve in objects Note that IPolycurve contains multiple ICurve and they show up in curves() as well. ICurve - IPolycurve relationship is still under work. This is temporary measure.

    - #### getPolycurveNum

          public int getPolycurveNum()

      alias of polycurveNum()

    - #### surfaceNum

          public int surfaceNum()

      number of ISurface in objects

    - #### getSurfaceNum

          public int getSurfaceNum()

      alias of surfaceNum()

    - #### meshNum

          public int meshNum()

      number of IMesh in objects

    - #### getMeshNum

          public int getMeshNum()

      alias of meshNum()

    - #### brepNum

          public int brepNum()

      number of IBrep in objects

    - #### getBrepNum

          public int getBrepNum()

      alias of brepNum()

    - #### textNum

          public int textNum()

      number of IText in objects

    - #### getTextNum

          public int getTextNum()

      alias of textNum()

    - #### geometryNum

          public int geometryNum()

      number of the IGeometry in objects

    - #### getGeometryNum

          public int getGeometryNum()

      alias of geometryNum()

    - #### objectNum

          public int objectNum(java.lang.Class cls)

      number of the specified class in objects

    - #### getObjectNum

          public int getObjectNum(java.lang.Class cls)

      alias of objectNum(Class)

    - #### layerNum

          public int layerNum()

    - #### layer

          public ILayer layer(int i)

    - #### getLayer

          public ILayer getLayer(int i)

    - #### layers

          public ILayer[] layers()

    - #### getAllLayers

          public ILayer[] getAllLayers()

    - #### getLayer

          public ILayer getLayer(java.lang.String layerName)

    - #### layer

          public ILayer layer(java.lang.String layerName)

    - #### deleteLayer

          public void deleteLayer(java.lang.String layerName)

    - #### deleteLayer

          public void deleteLayer(int i)

    - #### deleteLayer

          public void deleteLayer(ILayer l)