igeo

## Class IGraphicServer

- java.lang.Object
- - igeo.IGraphicServer

-     public class IGraphicServer
      extends java.lang.Object

  A server to contain graphic objects to manage drawing process.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `bgImageFilename`
    `static IGraphicMode` | `defaultMode`
    `java.util.HashMap<IView,java.util.ArrayList<IGraphicI>>` | `graphics2D` graphic elements already flattened in 2D; need to be sorted and vary depending on view
    `java.util.ArrayList<IGraphicI>` | `graphics3D` graphic elements keeping 3D info; no need to be sorted due to depth buffer
    `IGraphicMode[]` | `modes`
    `IPanelI` | `panel`
    `IServer` | `server`
    `boolean` | `useGL`
    `java.util.ArrayList<IView>` | `views`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IGraphicServer(IServer s, IPanelI p)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(IGraphicI e, IView view)`
    `void` | `add(IObject e)`
    `void` | `addView(IView v)`
    `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)`
    `void` | `clearObjects()` remove all the graphic objects
    `void` | `clearViews()` remove all views.
    `void` | `disableGL()`
    `void` | `enableGL()`
    `java.util.ArrayList<IGraphicI>` | `getObjects(IView view)`
    `boolean` | `isGL()`
    `void` | `remove(IGraphicI g)`
    `void` | `setMode(IGraphicMode m)`
    `IView` | `view(int i)`
    `int` | `viewNum()`

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

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

- - ### Field Detail

    - #### defaultMode

          public static IGraphicMode defaultMode

    - #### graphics3D

          public java.util.ArrayList<IGraphicI> graphics3D

      graphic elements keeping 3D info; no need to be sorted due to depth buffer

    - #### graphics2D

          public java.util.HashMap<IView,java.util.ArrayList<IGraphicI>> graphics2D

      graphic elements already flattened in 2D; need to be sorted and vary depending on view

    - #### views

          public java.util.ArrayList<IView> views

    - #### server

          public IServer server

    - #### panel

          public IPanelI panel

    - #### modes

          public IGraphicMode[] modes

    - #### useGL

          public boolean useGL

    - #### bgImageFilename

          public java.lang.String bgImageFilename

  - ### Constructor Detail

    - #### IGraphicServer

          public IGraphicServer(IServer s,
                                IPanelI p)

  - ### Method Detail

    - #### addView

          public void addView(IView v)

    - #### view

          public IView view(int i)

    - #### viewNum

          public int viewNum()

    - #### setMode

          public void setMode(IGraphicMode m)

    - #### enableGL

          public void enableGL()

    - #### disableGL

          public void disableGL()

    - #### isGL

          public boolean isGL()

    - #### 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)

    - #### add

          public void add(IObject e)

    - #### add

          public void add(IGraphicI e,
                          IView view)

    - #### getObjects

          public java.util.ArrayList<IGraphicI> getObjects(IView view)

    - #### remove

          public void remove(IGraphicI g)

    - #### clearObjects

          public void clearObjects()

      remove all the graphic objects

    - #### clearViews

          public void clearViews()

      remove all views. don't clearViews before clearObjects