init fxml when loaded.
177700
@PostConstruct
    public void init() throws Exception {
        final Stage stage = (Stage) context.getRegisteredObject("Stage");

        glyphDetailViewer = new GlyphDetailViewer();
        detailsContainer.getChildren().add(glyphDetailViewer);


        ScrollPane scrollableGlyphs = allGlyphs();
        scrollableGlyphs.setStyle(FX_BACKGROUND_INSETS_0);

        iconsContainer.getChildren().add(scrollableGlyphs);

        browseFont.setOnAction((action) -> {
            FileChooser fileChooser = new FileChooser();
            FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("SVG files (*.svg)", "*.svg");
            fileChooser.getExtensionFilters().add(extFilter);
            File file = fileChooser.showOpenDialog(stage);
            if (file != null) {
                SVGGlyphLoader.clear();
                try {
                    SVGGlyphLoader.loadGlyphsFont(new FileInputStream(file), file.getName());
                    ScrollPane newglyphs = allGlyphs();
                    newglyphs.setStyle(FX_BACKGROUND_INSETS_0);

                    iconsContainer.getChildren().clear();
                    iconsContainer.getChildren().add(newglyphs);

                } catch (IOException ioExc) {
                    ioExc.printStackTrace();
                }
            }
        }
886510
@PostConstruct
    public void init() throws Exception {
        // init the title hamburger icon
        final JFXTooltip burgerTooltip = new JFXTooltip("Open drawer");

        drawer.setOnDrawerOpening(e -> {
            final Transition animation = titleBurger.getAnimation();
            burgerTooltip.setText("Close drawer");
            animation.setRate(1);
            animation.play();
        });
        drawer.setOnDrawerClosing(e -> {
            final Transition animation = titleBurger.getAnimation();
            burgerTooltip.setText("Open drawer");
            animation.setRate(-1);
            animation.play();
        });
        titleBurgerContainer.setOnMouseClicked(e -> {
            if (drawer.isClosed() || drawer.isClosing()) {
                drawer.open();
            } else {
                drawer.close();
            }
        });

        FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/ui/popup/MainPopup.fxml"));
        loader.setController(new InputController());
        toolbarPopup = new JFXPopup(loader.load());

        optionsBurger.setOnMouseClicked(e ->
            toolbarPopup.show(optionsBurger,
                PopupVPosition.TOP,
                PopupHPosition.RIGHT,
                -12,
                15));
        JFXTooltip.setVisibleDuration(Duration.millis(3000));
        JFXTooltip.install(titleBurgerContainer, burgerTooltip, Pos.BOTTOM_CENTER);

        // create the inner flow and content
        context = new ViewFlowContext();
        // set the default controller
        Flow innerFlow = new Flow(ButtonController.class);

        final FlowHandler flowHandler = innerFlow.createHandler(context);
        context.register("ContentFlowHandler", flowHandler);
        context.register("ContentFlow", innerFlow);
        final Duration containerAnimationDuration = Duration.millis(320);
        drawer.setContent(flowHandler.start(new ExtendedAnimatedFlowContainer(containerAnimationDuration, SWIPE_LEFT)));
        context.register("ContentPane", drawer.getContent().get(0));

        // side controller will add links to the content flow
        Flow sideMenuFlow = new Flow(SideMenuController.class);
        final FlowHandler sideMenuFlowHandler = sideMenuFlow.createHandler(context);
        drawer.setSidePane(sideMenuFlowHandler.start(new ExtendedAnimatedFlowContainer(containerAnimationDuration,
            SWIPE_LEFT)));
    }
69417
protected void init(final String labelText) {
        setImmediate(true);
        addComponent(new LabelBuilder().name(i18n.getMessage(labelText)).buildLabel());
    }
867494
def _init(
            self, default_prefix='_',
            fext=TMPL_FN_EXT, req_tmpl_name=REQ_TMPL_NAME,
            text_prefix=REQUIREJS_TEXT_PREFIX,
            auto_reload=False,
            *a, **kw):
        

        self.default_prefix = default_prefix
        self.molds = {}
        self.tracked_entry_points = {}
        self.fext = fext
        self.req_tmpl_name = req_tmpl_name
        self.text_prefix = text_prefix
        self.auto_reload = auto_reload
943788
private void initComponents() {
        setTitle("Validation Framework Test");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        // Create content pane
        String notForNimbus;
        if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
            notForNimbus = "";
        } else {
            notForNimbus = "related[]";
        }
        JPanel contentPane = new JPanel(new MigLayout("fill, wrap 2", "[]related[grow]", "[]20[]related[]" +
                notForNimbus + "related[]related[]unrelated[]"));
        setContentPane(contentPane);

        JLabel infoLabel = new JLabel("Fill in the fields with less than 10 characters.");
        infoLabel.setForeground(Color.GRAY);
        contentPane.add(infoLabel, "span 2");

        // Input fields
        contentPane.add(new JLabel("Sticker:"));
        textField1 = new JTextField();
        contentPane.add(textField1, "growx");
        contentPane.add(new JLabel("Foreground color:"));
        textField2 = new JTextField();
        contentPane.add(textField2, "growx");
        textField3 = new JTextField();
        if (!notForNimbus.isEmpty()) {
            // Changing the background color of a textfield with the Nimbus is not easy...
            contentPane.add(new JLabel("Background color:"));
            contentPane.add(textField3, "growx");
        }
        contentPane.add(new JLabel("Icon:"));
        textField4 = new JTextField();
        contentPane.add(textField4, "growx");
        contentPane.add(new JLabel("Icon with tooltip:"));
        textField5 = new JTextField();
        contentPane.add(textField5, "growx");

        // Apply button
        applyButton = new JButton("Apply");
        contentPane.add(applyButton, "skip 1, right aligned");

        // Set size
        pack();
        Dimension size = getSize();
        size.width += 100;
        setMinimumSize(size);

        // Set location
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation((screenSize.width - size.width) / 2, (screenSize.height - size.height) / 3);
    }
134680
@Override protected void initGraphics() {
        super.initGraphics();

        poiLocations       = FXCollections.observableHashMap();
        chartDataLocations = FXCollections.observableHashMap();

        handlerMap       = new HashMap<>();
        circleHandlerMap = new HashMap<>();

        countryPaths = tile.getCountryPaths();

        String formatString = new StringBuilder("%.").append(tile.getDecimals()).append("f").toString();

        poiListener = new WeakListChangeListener<>(change -> {
            while (change.next()) {
                if (change.wasAdded()) {
                    change.getAddedSubList().forEach(addedPoi -> {
                        String tooltipText = new StringBuilder(addedPoi.getName()).append("\n")
                                                                                  .append(addedPoi.getInfo())
                                                                                  .toString();
                        EventHandler<MouseEvent> handler = e -> addedPoi.fireLocationEvent(new LocationEvent(addedPoi));
                        Circle circle = new Circle(3, addedPoi.getColor());
                        Tooltip.install(circle, new Tooltip(tooltipText));
                        circleHandlerMap.put(circle, handler);
                        poiLocations.put(addedPoi, circle);
                        circle.setOnMousePressed(handler);
                        getPane().getChildren().add(circle);
                    });
                } else if (change.wasRemoved()) {
                    change.getRemoved().forEach(removedPoi -> {
                        if (circleHandlerMap.get(removedPoi) != null) {
                            poiLocations.get(removedPoi).removeEventHandler(MouseEvent.MOUSE_PRESSED, circleHandlerMap.get(removedPoi));
                        }
                        getPane().getChildren().remove(removedPoi);
                    });
                }
            }
            resize();
        });
        chartDataListener = new WeakListChangeListener<>(change -> {
            while (change.next()) {
                if (change.wasAdded()) {
                    change.getAddedSubList().forEach(addedData -> {
                        String tooltipText = new StringBuilder(addedData.getName()).append("\n")
                                                                                   .append(String.format(Locale.US, formatString, addedData.getValue()))
                                                                                   .toString();
                        EventHandler<MouseEvent> handler = e -> tile.fireTileEvent(new TileEvent(EventType.SELECTED_CHART_DATA, addedData));
                        Circle circle = new Circle(3, addedData.getLocation().getColor());
                        Tooltip.install(circle, new Tooltip(tooltipText));
                        circleHandlerMap.put(circle, handler);
                        chartDataLocations.put(addedData.getLocation(), circle);
                        circle.setOnMousePressed(handler);
                        getPane().getChildren().add(circle);
                    });
                } else if (change.wasRemoved()) {
                    change.getRemoved().forEach(removedData -> {
                        if (circleHandlerMap.get(removedData) != null) {
                            chartDataLocations.get(removedData).removeEventHandler(MouseEvent.MOUSE_PRESSED, circleHandlerMap.get(removedData));
                        }
                        getPane().getChildren().remove(removedData);
                    });
                }
            }
            resize();
        });

        tile.getPoiList()
            .forEach(poi -> {
                String tooltipText = new StringBuilder(poi.getName()).append("\n")
                                                                     .append(poi.getInfo())
                                                                     .toString();
                Circle circle = new Circle(3, poi.getColor());
                circle.setOnMousePressed(e -> poi.fireLocationEvent(new LocationEvent(poi)));
                Tooltip.install(circle, new Tooltip(tooltipText));
                poiLocations.put(poi, circle);
            });

        tile.getChartData()
            .stream()
            .filter(chartData -> chartData.getLocation() != null)
            .forEach(chartData -> {
                String tooltipText = new StringBuilder(chartData.getName()).append("\n")
                                                                           .append(String.format(Locale.US, formatString, chartData.getValue()))
                                                                           .toString();
                Circle circle = new Circle(3, chartData.getLocation().getColor());
                circle.setOnMousePressed(e -> tile.fireTileEvent(new TileEvent(EventType.SELECTED_CHART_DATA, chartData)));
                Tooltip.install(circle, new Tooltip(tooltipText));
                chartDataLocations.put(chartData.getLocation(), circle);
            });

        titleText = new Text();
        titleText.setFill(tile.getTitleColor());
        Helper.enableNode(titleText, !tile.getTitle().isEmpty());

        text = new Text(tile.getUnit());
        text.setFill(tile.getUnitColor());
        Helper.enableNode(text, tile.isTextVisible());

        Color fill   = tile.getForegroundColor();
        Color stroke = tile.getBackgroundColor();

        worldPane = new Pane();
        countryPaths.forEach((name, pathList) -> {
            Country country = Country.valueOf(name);
            pathList.forEach(path -> {
                path.setFill(null == country.getColor() ? fill : country.getColor());
                path.setStroke(stroke);
                path.setStrokeWidth(0.2);
            });
            worldPane.getChildren().addAll(pathList);
        });
        group = new Group(worldPane);

        getPane().getChildren().addAll(group, titleText, text);
        getPane().getChildren().addAll(chartDataLocations.values());
        getPane().getChildren().addAll(poiLocations.values());
    }
524489
private void initializeScene() {

        final Stage currentStage = this.stage;

        final KeyCode fullKeyCode = fullScreenKeyCode();
        final KeyCode iconKeyCode = iconifiedKeyCode();

        // Attach the handler only if necessary, these 2 method can be overridden to return null
        if (fullKeyCode != null && iconKeyCode != null) {

            this.scene.addEventFilter(KeyEvent.KEY_PRESSED, keyEvent -> {

                // Manage F11 button to switch full screen
                if (fullKeyCode != null && fullKeyCode == keyEvent.getCode()) {
                    currentStage.setFullScreen(!currentStage.isFullScreen());
                    keyEvent.consume();
                    // Manage F10 button to iconify
                } else if (iconKeyCode != null && iconKeyCode == keyEvent.getCode()) {
                    currentStage.setIconified(!currentStage.isIconified());
                    keyEvent.consume();
                }

            });
        }

        // The call customize method to allow extension by sub class
        customizeScene(this.scene);

        // Add the default Style Sheet if none have been added
        manageDefaultStyleSheet(this.scene);

    }
1260569
function init() {
        // Load our stylesheet
        ExtensionUtils.loadStyleSheet(module, "main.less");
        ExtensionUtils.addEmbeddedStyleSheet(Mustache.render(Localized, Strings));

        EditorManager.registerInlineEditProvider(inlineTimingFunctionEditorProvider);
    }
76919
private void init() {
    mCallerContext = null;
    mImageRequest = null;
    mLowResImageRequest = null;
    mMultiImageRequests = null;
    mTryCacheOnlyFirst = true;
    mControllerListener = null;
    mControllerViewportVisibilityListener = null;
    mTapToRetryEnabled = false;
    mAutoPlayAnimations = false;
    mOldController = null;
    mContentDescription = null;
  }
820005
private void initialize() {
		this.setOrder(EXTENSION_ORDER);
		this.customParsers = new LinkedList<>();
		this.customFetchFilters = new LinkedList<>();
		this.customParseFilters = new LinkedList<>();
		this.scanController = new SpiderScanController(this);
	}
831313
@PostConstruct
    public void init() {
        JFXDepthManager.setDepth(content, 1);
        JFXNodeUtils.addDelayedEventHandler(searchField, Duration.millis(400),
            KeyEvent.KEY_PRESSED, event -> highlighter.highlight(content, searchField.getText()));
    }
822713
private void init(){

        // Create the Empty Layout
        LinearLayout container = new LinearLayout(getContext());
        mIcon = new ImageView(getContext());
        mMessage = new TextView(getContext());
        mAction = new TextView(getContext());
        mProgress = new ProgressBar(getContext());

        // Setup the layout
        LayoutParams containerParams = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        container.setGravity(Gravity.CENTER);
        container.setOrientation(LinearLayout.VERTICAL);
        containerParams.addRule(RelativeLayout.CENTER_IN_PARENT);

        // Setup the Icon
        if(mEmptyIcon > 0) {
            mIcon.setImageResource(mEmptyIcon);
        }else{
            mIcon.setVisibility(View.GONE);
        }

        mIcon.setPadding(0, 0, 0, mEmptyIconPadding);
        if (mEmptyIconColor != -1) {
            mIcon.setColorFilter(mEmptyIconColor, PorterDuff.Mode.SRC_IN);
        }
        int width = mEmptyIconSize == -1 ? WRAP_CONTENT : mEmptyIconSize;
        int height = mEmptyIconSize == -1 ? WRAP_CONTENT : mEmptyIconSize;
        LinearLayout.LayoutParams iconParams = new LinearLayout.LayoutParams(width, height);
        container.addView(mIcon, iconParams);

        // Setup the message
        LinearLayout.LayoutParams msgParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        mMessage.setGravity(Gravity.CENTER);
        mMessage.setTextSize(TypedValue.COMPLEX_UNIT_PX, mEmptyMessageTextSize);
        mMessage.setTextColor(mEmptyMessageColor);
        mMessage.setText(mEmptyMessage);

        // Add to the layout
        container.addView(mMessage, msgParams);

        // Setup the Action Label
        LinearLayout.LayoutParams actionParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        actionParams.topMargin = getResources().getDimensionPixelSize(R.dimen.activity_padding);
        int padding = (int) SizeUtils.dpToPx(getContext(), 8);
        mAction.setText(mEmptyActionText);
        mAction.setTextColor(mEmptyActionColor);
        mAction.setTextSize(TypedValue.COMPLEX_UNIT_PX, mEmptyActionTextSize);
        mAction.setAllCaps(true);
        mAction.setPadding(padding, padding, padding, padding);
        mAction.setVisibility(TextUtils.isEmpty(mEmptyActionText) ? View.GONE : View.VISIBLE);
        UIUtils.setBackground(mAction, UIUtils.getSelectableItemBackground(getContext()));
        mAction.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mActionClickListener != null) mActionClickListener.onClick(v);
            }
        });

        if(!isInEditMode()){
            FontLoader.apply(mMessage, mEmptyMessageTypeface);
            FontLoader.apply(mAction, Face.ROBOTO_MEDIUM);
        }

        container.addView(mAction, actionParams);

        LinearLayout.LayoutParams progressParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        mProgress.setVisibility(View.GONE);

        container.addView(mProgress, progressParams);

        // Add to view
        addView(container, containerParams);

        // Switch the states
        if(mState == STATE_LOADING){
            setLoading();
        }
    }
1022930
public function init()
    {
        $event = new ContextPaneEvent($this);

        $this->dispatcher->dispatch(ContextPaneEvent::EVENT_INIT, $event);
    }
836049
private void initialize() {
		this.setJMenuBar(getMainMenuBar());
		this.setContentPane(getPaneContent());
    	this.setPreferredSize(new Dimension(1000, 800));
		this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
		this.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				getMainMenuBar().getMenuFileControl().exit();
			}
		});

		this.setVisible(false);
	}
180072
@Override
    public final void init() throws Exception {
        FxToolkit.init();

        applicationInit();

        PlatformClient.getClientConfiguration().setUncaughtExceptionHandler((Thread thread, Throwable exception) -> {
            PlatformClient.getClientConfiguration().getUiExecutor().execute(() -> {
                Assert.requireNonNull(thread, "thread");
                Assert.requireNonNull(exception, "exception");

                if (connectInProgress.get()) {
                    runtimeExceptionsAtInitialization.add(new DolphinRuntimeException(thread, "Unhandled error in Dolphin Platform background thread", exception));
                } else {
                    onRuntimeError(primaryStage, new DolphinRuntimeException(thread, "Unhandled error in Dolphin Platform background thread", exception));
                }
            });
        });

        try {
            clientContext = createClientContext();
            Assert.requireNonNull(clientContext, "clientContext");

            connectInProgress.set(true);
            clientContext.connect().get(30_000, TimeUnit.MILLISECONDS);
        } catch (ClientInitializationException e) {
            initializationException = e;
        } catch (Exception e) {
            initializationException = new ClientInitializationException("Can not initialize Dolphin Platform Context", e);
        } finally {
            connectInProgress.set(false);
        }
    }
863260
public function init()
    {
        $this->assets = array(
            'js' => YII_DEBUG ? 'foundation/foundation.reveal.js' : 'foundation.min.js'
        );

        Html::addCssClass($this->htmlOptions, Enum::DIALOG);
        $this->setId(ArrayHelper::removeValue($this->htmlOptions, 'id', $this->getId()));
        $this->registerClientScript();
        parent::init();

        $this->htmlOptions['id'] = $this->getId();

        echo $this->renderToggleButton() . "\n";
        echo \CHtml::openTag('div', $this->htmlOptions) . "\n";
        echo $this->renderHeader() . "\n";
    }
514434
public void init() {
        OptionsParam options = Model.getSingleton().getOptionsParam();
        mainFrame = new MainFrame(options, getRequestPanel(), getResponsePanel());
        mainFrame.getWorkbench().addPanel(View.getSingleton().getSiteTreePanel(), WorkbenchPanel.PanelType.SELECT);

        // Install default editor and renderer for TextMessageLocationHighlight
        MessageLocationHighlightRenderersEditors.getInstance().addEditor(
                TextMessageLocationHighlight.class,
                new TextMessageLocationHighlightEditor());
        MessageLocationHighlightRenderersEditors.getInstance().addRenderer(
                TextMessageLocationHighlight.class,
                new TextMessageLocationHighlightRenderer());
        
        String statusString;
        for(Status status : AddOn.Status.values()) {     	
        	// Handle the case AddOn.Status gets out of sync with cfu.status i18n entries
        	String i18nKey = "cfu.status." + status.toString();
        	if (Constant.messages.containsKey(i18nKey)) {
        		statusString = Constant.messages.getString(i18nKey);
        	} else {
        		statusString = status.toString();
        	}
        	statusMap.put(status, new StatusUI(status, statusString));
        }
    }