/*
(non-Javadoc)

@see sim.display.GUIState#init(sim.display.Controller)
164008
@Override
    public void init(Controller c) {
        super.init(c);
        ShanksSimulation sim = (ShanksSimulation) state;

        Display3D mainDisplay = new Display3D(800, 800, this);
        mainDisplay.setBackdrop(Color.white);
        try {
            Scenario3DPortrayal scenarioPortrayal = (Scenario3DPortrayal) this
                    .getSimulation().getScenarioPortrayal();

            HashMap<String, Display3D> displays = scenarioPortrayal
                    .getDisplays();
            ContinuousPortrayal3D devicesPortrayal;
            devicesPortrayal = (ContinuousPortrayal3D) sim
                    .getScenarioPortrayal().getPortrayals()
                    .get(Scenario3DPortrayal.MAIN_DISPLAY_ID)
                    .get(ScenarioPortrayal.DEVICES_PORTRAYAL);
            Continuous3D devicesGrid = (Continuous3D) devicesPortrayal
                    .getField();
            mainDisplay.scale(0.08 / devicesGrid.getHeight());
            mainDisplay.setShowsAxes(true);
            scenarioPortrayal.addDisplay(Scenario3DPortrayal.MAIN_DISPLAY_ID,
                    mainDisplay);

            this.addDisplays(scenarioPortrayal);
            this.addCharts(scenarioPortrayal);

            HashMap<String, TimeSeriesChartGenerator> timeCharts = scenarioPortrayal
                    .getTimeCharts();

            for (Entry<String, Display3D> displayEntry : displays.entrySet()) {
                JFrame frame = displayEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(displayEntry.getKey(), frame);
                frame.setTitle(displayEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
                displayEntry.getValue().getSelectionBehavior()
                        .setTolerance(10.0f);
            }

            for (Entry<String, TimeSeriesChartGenerator> chartEntry : timeCharts
                    .entrySet()) {
                JFrame frame = chartEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(chartEntry.getKey(), frame);
                frame.setTitle(chartEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            this.locateFrames(scenarioPortrayal);

            // } catch (DuplictaedDisplayIDException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (DuplicatedPortrayalIDException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (ScenarioNotFoundException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (DuplictedFrameIDException e) {
            // e.printStackTrace();
            // } catch (DuplicatedChartIDException e) {
            // e.printStackTrace();
        } catch (ShanksException e) {
            logger.severe(e.getMessage());
            e.printStackTrace();
        }
    }
567885
protected void init() {
		addPropertyChangeListener(ENABLED_PROPERTY, new PropertyChangeListener() {

			public void propertyChange(PropertyChangeEvent evt) {
				validatingUpdated();
			}

		});
		validationResultsModel.addPropertyChangeListener(ValidationResultsModel.HAS_ERRORS_PROPERTY,
				childStateChangeHandler);
	}
227481
@Override
    public void init(final Scope scope, final ParticipantConfig participantConfig) throws InitializationException, InterruptedException {
        internalInit(scope, participantConfig);
    }
1023710
public function init() {

		parent::init();

		if( isset( $this->viewPath ) ) {

			$this->controller->setViewPath( $this->viewPath );
		}
	}
977852
@Override
    public void init(final Class<? extends State> stateClass) throws InitializationException {
        try {
            currentState = getState(stateClass);
            change.firePropertyChange(STATE_CHANGE, null, currentState.getClass());
        } catch (NotAvailableException ex) {
            throw new InitializationException(this, ex);
        }
    }
709163
public void init() {
        if (initialized) { return; }
        Widget parent = inputWidget.getParent();
        while (parent != null && !parent.getClass().getName().equals("com.google.gwt.user.client.ui.Widget")) {
            if (parent instanceof HasValidationState) {
                validationStateParent = (HasValidationState) parent;
                validationStateHelpBlock = findHelpBlock(inputWidget);
                break;
            }
            parent = parent.getParent();
        }
        if (inputWidget.isAttached() || validationStateParent != null) {
            initialized = true;
        }
    }
492751
@Override
    public void init() throws InitializationException {
        engine = Engine.createCachingEngine();
        JMTEDateRendrer dateRendrer = new JMTEDateRendrer();
        dateRendrer.setDateFormat(dateFormat);
        engine.registerRenderer(Date.class, dateRendrer);
    }
169771
public void initBeans(Object[] beans) {
        this.controllers = Arrays.stream(beans).filter(bean -> this.getController(bean) != null).map(bean -> this.getController(bean)).collect(Collectors.toList());
    }
284021
private void initControlAndPostViewInit() throws Exception {
        Control.initSingletonWithView(getControlOverrides());

        final Control control = Control.getSingleton();
        final View view = View.getSingleton();

        EventQueue.invokeAndWait(new Runnable() {

            @Override
            public void run() {
                view.postInit();
                view.getMainFrame().setVisible(true);

                boolean createNewSession = true;
                if (getArgs().isEnabled(CommandLine.SESSION) && getArgs().isEnabled(CommandLine.NEW_SESSION)) {
                    view.showWarningDialog(
                            Constant.messages.getString(
                                    "start.gui.cmdline.invalid.session.options",
                                    CommandLine.SESSION,
                                    CommandLine.NEW_SESSION,
                                    Constant.getZapHome()));

                } else if (getArgs().isEnabled(CommandLine.SESSION)) {
                    Path sessionPath = SessionUtils.getSessionPath(getArgs().getArgument(CommandLine.SESSION));
                    if (!Files.exists(sessionPath)) {
                        view.showWarningDialog(
                                Constant.messages.getString("start.gui.cmdline.session.does.not.exist", Constant.getZapHome()));

                    } else {
                        createNewSession = !control.getMenuFileControl().openSession(sessionPath.toAbsolutePath().toString());
                    }

                } else if (getArgs().isEnabled(CommandLine.NEW_SESSION)) {
                    Path sessionPath = SessionUtils.getSessionPath(getArgs().getArgument(CommandLine.NEW_SESSION));
                    if (Files.exists(sessionPath)) {
                        view.showWarningDialog(
                                Constant.messages
                                        .getString("start.gui.cmdline.newsession.already.exist", Constant.getZapHome()));

                    } else {
                        createNewSession = !control.getMenuFileControl().newSession(sessionPath.toAbsolutePath().toString());
                    }
                }
                view.hideSplashScreen();

                if (createNewSession) {
                    try {
                        control.getMenuFileControl().newSession(false);
                    } catch (Exception e) {
                        logger.error(e.getMessage(), e);
                        View.getSingleton().showWarningDialog(Constant.messages.getString("menu.file.newSession.error"));
                    }
                }

            }
        });

        try {
            // Allow extensions to pick up command line args in GUI mode
            control.getExtensionLoader().hookCommandLineListener(getArgs());
            control.runCommandLine();

        } catch (final Exception e) {
            logger.error(e.getMessage(), e);
            EventQueue.invokeLater(new Runnable() {

                @Override
                public void run() {
                    view.showWarningDialog(e.getMessage());
                }
            });
        }
    }
637144
private function initialize(AbstractController $controller)
    {
        foreach ($this->initializers as $initializer) {
            if ($initializer instanceof InitializerInterface) {
                $initializer->initialize($controller, $this);
            } else {
                call_user_func($initializer, $controller, $this);
            }
        }
    }
944488
@Override
    public void visit(ClassOrInterfaceDeclaration declaration, ControllerModel controller) {
        controller.setName(declaration.getName());

        LOGGER.info("[controller]Visit " + controller.getName());
        //Go on with the methods and annotations
        super.visit(declaration,controller);
    }
404093
public void init ()
    {
        if (_initers == null) {
            log.warning("Refusing repeat init() request.");
            return;
        }

        ObserverList<InitComponent> list = _initers.toObserverList();
        _initers = null;
        list.apply(new ObserverList.ObserverOp<InitComponent>() {
            public boolean apply (InitComponent comp) {
                log.debug("Initializing component", "comp", comp);
                comp.init();
                return true;
            }
        });
    }
98766
@Override
	public void init(ResourceBundlesHandler bundler, Boolean useRandomParam, String media, boolean alternate,
			boolean displayAlternateStyles, String title) {
		init(bundler, useRandomParam);

		this.media = null == media ? "screen" : media;
		this.displayAlternateStyles = displayAlternateStyles;
		this.alternate = alternate;
		this.title = title;
		if (displayAlternateStyles && alternate) {
			throw new IllegalArgumentException(
					"You can't use the displayAlternateStyle and alternate properties together.");
		}
		if (displayAlternateStyles && StringUtils.isNotEmpty(title)) {
			this.title = null;
			LOGGER.warn("As you are using the displayAlternateStyle property, the title value will be overrided.");
		}
	}
643531
private void initialize() {
        this.setLayout(new CardLayout());
        this.setName(PANEL_NAME);
        regexesPanel = new MultipleRegexesOptionsPanel(View.getSingleton().getSessionDialog());
        this.add(getPanelSession(), getPanelSession().getName());
	}
757875
private void initialize() {
		this.setLayout(new CardLayout());
		this.setName(getContextIndex() + ": " + PANEL_NAME);
		this.setLayout(new GridBagLayout());
		this.setBorder(new EmptyBorder(2, 2, 2, 2));

		this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.description")),
				LayoutHelper.getGBC(0, 0, 1, 1.0D));

		// Session management combo box
		this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.typeSelect")),
				LayoutHelper.getGBC(0, 1, 1, 1.0D, new Insets(20, 0, 5, 5)));
		this.add(getSessionManagementMethodsComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D));

		// Method config panel container
		this.add(getConfigContainerPanel(), LayoutHelper.getGBC(0, 3, 1, 1.0d, new Insets(10, 0, 10, 0)));

		// Padding
		this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D));
	}
532938
private void _initializeInbox() {
        synchronized (inboxControllerLock) {
            if (this.ctInboxController != null) {
                _notifyInboxInitialized();
                return;
            }
            this.ctInboxController = new CTInboxController(getCleverTapID(), loadDBAdapter(context), haveVideoPlayerSupport);
            _notifyInboxInitialized();
        }
    }
681370
protected void init() {
        Log.d(TAG, "init");

        if (isInEditMode())
            return;

        this.mediaPlayer = null;
        this.shouldAutoplay = false;
        this.fullscreen = false;
        this.initialConfigOrientation = -1;
        this.videoIsReady = false;
        this.surfaceIsReady = false;
        this.initialMovieHeight = -1;
        this.initialMovieWidth = -1;
        this.setBackgroundColor(Color.BLACK);

        initObjects();
    }