/** * Called when a bean is added to the bean context * * @param obj the bean being added */ @Override public void findAndInit(Object obj) { super.findAndInit(obj); if (obj instanceof MapBean) { mapBean = (MapBean) obj; } else if (obj instanceof MainFrameCommon) { mainFrame = (MainFrameCommon) obj; } else if (obj instanceof MapMenuCommon) { mapMenu = (MapMenuCommon) obj; } // For EPDShip the IMapFrame is the MainFrame // For EPDShore the IMapFrame is the JMapFrame if (obj instanceof IMapFrame) { mapFrame = (IMapFrame) obj; addInfoPanelsToGlassPane(); } }