public void hookUpGraphicLoaderWithLayer(GraphicLoader gl){
  if (gl != null) {
    GraphicLoaderPlugIn glpi=new GraphicLoaderPlugIn();
    gl.setReceiver(glpi);
    glpi.setGraphicLoader(gl);
    LayerHandler lh=getLayerHandler();
    PlugInLayer pl=new PlugInLayer();
    pl.setPlugIn(glpi);
    pl.setName(gl.getName());
    pl.setVisible(newLayerVisible);
    if (lh != null) {
      lh.addLayer(pl,newLayerIndex);
    }
 else {
      if (orphanGraphicLoaderPlugIns == null) {
        orphanGraphicLoaderPlugIns=new LinkedList();
      }
      orphanGraphicLoaderPlugIns.add(pl);
    }
  }
}

public void hookUpGraphicLoaderWithLayer ( GraphicLoader gl ) { if ( gl != null ) { GraphicLoaderPlugIn glpi = new GraphicLoaderPlugIn ( ) ; gl . setReceiver ( glpi ) ; glpi . setGraphicLoader ( gl ) ; LayerHandler lh = getLayerHandler ( ) ; PlugInLayer pl = new PlugInLayer ( ) ; pl . setPlugIn ( glpi ) ; pl . setName ( gl . getName ( ) ) ; pl . setVisible ( newLayerVisible ) ; if ( lh != null ) { lh . addLayer ( pl , newLayerIndex ) ; } else { if ( orphanGraphicLoaderPlugIns == null ) { orphanGraphicLoaderPlugIns = new LinkedList ( ) ; } orphanGraphicLoaderPlugIns . add ( pl ) ; } } }
assumes that the graphicloader doesn ' t already have a receiver . creates a graphicloaderplugin , and a pluginlayer , and hooks everything up . then hands the pluginlayer to the layerhandler to get set on the map .
