Initialize the scroll pane UI
@param d
553035
private void defineScrollPane(UIDefaults d) {
        // Define ScrollPane border painters.
        String c = PAINTER_PREFIX + "ScrollPanePainter";
        String p = "ScrollPane";
        d.put(p + ".opaque", Boolean.FALSE);
        d.put(p + ".contentMargins", new InsetsUIResource(3, 3, 3, 3));
        // d.put(p + ".useChildTextComponentFocus", Boolean.TRUE);
        d.put(p + ".backgroundPainter", new LazyPainter(c, ScrollPanePainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Enabled+Focused].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED_FOCUSED));
        d.put(p + "[Enabled].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED));

        // Store ScrollPane Corner Component
        d.put(p + ".cornerPainter", new LazyPainter(c, ScrollPanePainter.Which.CORNER_ENABLED));
        
        //Initialize Viewport
        p = "Viewport";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".opaque", Boolean.TRUE);
    }
111913
private void init() {
        this.setLayout(new BorderLayout());

        // MAIN PANEL
        JPanel mainPanel = new JPanel();
        Border margin = new EmptyBorder(10, 10, 5, 10);

        mainPanel.setBorder(margin);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));

        mainPanel.add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(),
                WIKIPAGE));

        // SortFilterModel mySortedModel =
        // new SortFilterModel(myStatTableModel);
        JTable myJTable = new JTable(model);
        myJTable.getTableHeader().setDefaultRenderer(new JMeterHeaderAsPropertyRenderer(COLUMNS_MSG_PARAMETERS));
        myJTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
        RendererUtils.applyRenderers(myJTable, RENDERERS);
        JScrollPane myScrollPane = new JScrollPane(myJTable);
        this.add(mainPanel, BorderLayout.NORTH);
        this.add(myScrollPane, BorderLayout.CENTER);
        saveTable.addActionListener(this);
        JPanel opts = new JPanel();
        opts.add(useGroupName, BorderLayout.WEST);
        opts.add(saveTable, BorderLayout.CENTER);
        opts.add(saveHeaders, BorderLayout.EAST);
        this.add(opts, BorderLayout.SOUTH);
    }
831313
@PostConstruct
    public void init() {
        JFXDepthManager.setDepth(content, 1);
        JFXNodeUtils.addDelayedEventHandler(searchField, Duration.millis(400),
            KeyEvent.KEY_PRESSED, event -> highlighter.highlight(content, searchField.getText()));
    }
51497
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();
        _bar = new javax.swing.JToolBar();
        _update = new javax.swing.JButton();
        _del = new javax.swing.JButton();
        _save = new javax.swing.JButton();

        jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        jScrollPane1.setViewportView(jTextPane1);

        _bar.setFloatable(false);
        _bar.setOrientation(1);
        _bar.setRollover(true);

        _update.setText("Update");
        _update.setToolTipText("Remove R object");
        _update.setFocusable(false);
        _update.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _update.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _update.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _updateActionPerformed(evt);
            }
        });
        _bar.add(_update);

        _del.setText("Clear");
        _del.setToolTipText("Remove R object");
        _del.setFocusable(false);
        _del.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _del.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _del.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _delActionPerformed(evt);
            }
        });
        _bar.add(_del);

        _save.setText("Save");
        _save.setToolTipText("Remove R object");
        _save.setFocusable(false);
        _save.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _save.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _saveActionPerformed(evt);
            }
        });
        _bar.add(_save);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(_bar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
            .addComponent(_bar, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
        );
    }
496269
private void initialize() {
        width = getContext().getResources().getDimensionPixelSize(R.dimen.default_width);
        maximize = false;
        adapter = new DividableGridAdapter(getContext(), Style.LIST, width);
        super.setOnShowListener(createOnShowListener());
    }
173023
private void initialize() {
        this.setDefaultCloseOperation(javax.swing.JFrame.DO_NOTHING_ON_CLOSE);
        this.setContentPane(getJPanel());
       	this.setPreferredSize(new Dimension(550, 375));
        this.addWindowListener(new java.awt.event.WindowAdapter() {

        	@Override
			public void windowClosing(java.awt.event.WindowEvent e) {

        	    btnDecline.doClick();
        	}
        });

        showLicense();
	}
1236901
private void onScrollingDown() {
        if (!hidden) {
            hidden = true;

            if (animatedView.getAnimation() == null) {
                ObjectAnimator animator = createAnimator(true);
                animator.start();
            }
        }
    }
126645
private void initialize() {
        this.setTitle(Constant.messages.getString("history.managetags.title"));
        this.setContentPane(getJPanel());
        if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
        	this.setSize(panelWidth, panelHeight);
        }
        this.addWindowListener(new java.awt.event.WindowAdapter() {   
        	@Override
        	public void windowOpened(java.awt.event.WindowEvent e) {    
        	} 

        	@Override
        	public void windowClosing(java.awt.event.WindowEvent e) {
        	}
        });

		pack();
	}
397096
private void defineRootPanes(UIDefaults d) {
        String c = PAINTER_PREFIX + "FrameAndRootPainter";
        String p = "RootPane";

        d.put(p + ".States", "Enabled,WindowFocused,NoFrame");
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".opaque", Boolean.FALSE);
        d.put(p + ".NoFrame", new RootPaneNoFrameState());
        d.put(p + ".WindowFocused", new RootPaneWindowFocusedState());

        d.put(p + "[Enabled+NoFrame].backgroundPainter", new LazyPainter(c, FrameAndRootPainter.Which.BACKGROUND_ENABLED_NOFRAME));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, FrameAndRootPainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Enabled+WindowFocused].backgroundPainter", new LazyPainter(c, FrameAndRootPainter.Which.BACKGROUND_ENABLED_WINDOWFOCUSED));
    }
78621
private void definePanels(UIDefaults d) {
        String p = "Panel";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".background", new ColorUIResource((Color) d.get("control")));
        d.put(p + ".opaque", Boolean.TRUE);
    }
47293
private void initButtonPanel() {

        if ((m_buttonPanel == null) && m_isFrame) {
            m_buttonPanel = new FlowPanel();
            m_buttonPanel.addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupButtonPanel());
            m_main.add(m_buttonPanel);
        }
    }
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);
	}
422591
private void initGUI() {

        Font fFont = new Font("Dialog", Font.PLAIN, 12);

        setLayout(new BorderLayout());

        Panel p = new Panel();

        p.setBackground(SystemColor.control);
        p.setLayout(new GridLayout(16, 1));

        tSourceTable = new TextField();

        tSourceTable.setEnabled(false);

        tDestTable = new TextField();

        tDestTable.addActionListener(this);

        tDestDrop = new TextField();

        tDestDrop.addActionListener(this);

        tDestCreate = new TextField();

        tDestCreate.addActionListener(this);

        tDestDelete = new TextField();

        tDestDelete.addActionListener(this);

        tDestCreateIndex = new TextField();

        tDestCreateIndex.addActionListener(this);

        tDestDropIndex = new TextField();

        tDestDropIndex.addActionListener(this);

        tSourceSelect = new TextField();

        tSourceSelect.addActionListener(this);

        tDestInsert = new TextField();

        tDestInsert.addActionListener(this);

        tDestAlter = new TextField();

        tDestAlter.addActionListener(this);

        cTransfer = new Checkbox("Transfer to destination table", true);

        cTransfer.addItemListener(this);

        cDrop = new Checkbox("Drop destination table (ignore error)", true);

        cDrop.addItemListener(this);

        cCreate = new Checkbox("Create destination table", true);

        cCreate.addItemListener(this);

        cDropIndex = new Checkbox("Drop destination index (ignore error)",
                                  true);

        cDropIndex.addItemListener(this);

        cIdxForced = new Checkbox("force Idx_ prefix for indexes names",
                                  false);

        cIdxForced.addItemListener(this);

        cCreateIndex = new Checkbox("Create destination index", true);

        cCreateIndex.addItemListener(this);

        cDelete = new Checkbox("Delete rows in destination table", true);

        cDelete.addItemListener(this);

        cInsert = new Checkbox("Insert into destination", true);

        cInsert.addItemListener(this);

        cFKForced = new Checkbox("force FK_ prefix for foreign key names",
                                 false);

        cFKForced.addItemListener(this);

        cAlter = new Checkbox("Alter destination table", true);

        cAlter.addItemListener(this);
        p.add(createLabel("Source table"));
        p.add(tSourceTable);
        p.add(cTransfer);
        p.add(tDestTable);
        p.add(cDrop);
        p.add(tDestDrop);
        p.add(cCreate);
        p.add(tDestCreate);
        p.add(cDropIndex);
        p.add(tDestDropIndex);
        p.add(cCreateIndex);
        p.add(tDestCreateIndex);
        p.add(cDelete);
        p.add(tDestDelete);
        p.add(cAlter);
        p.add(tDestAlter);
        p.add(createLabel("Select source records"));
        p.add(tSourceSelect);
        p.add(cInsert);
        p.add(tDestInsert);
        p.add(createLabel(""));
        p.add(createLabel(""));
        p.add(cIdxForced);
        p.add(cFKForced);
        p.add(createLabel(""));
        p.add(createLabel(""));

        if (iTransferMode == TRFM_TRANSFER) {
            bStart    = new Button("Start Transfer");
            bContinue = new Button("Continue Transfer");

            bContinue.setEnabled(false);
        } else if (iTransferMode == Transfer.TRFM_DUMP) {
            bStart = new Button("Start Dump");
        } else if (iTransferMode == Transfer.TRFM_RESTORE) {
            bStart = new Button("Start Restore");
        }

        bStart.addActionListener(this);
        p.add(bStart);

        if (iTransferMode == TRFM_TRANSFER) {
            bContinue.addActionListener(this);
            p.add(bContinue);
        }

        bStart.setEnabled(false);
        fMain.add("Center", createBorderPanel(p));

        lTable = new java.awt.List(10);

        lTable.addItemListener(this);
        fMain.add("West", createBorderPanel(lTable));

        tMessage = new TextField();

        Panel pMessage = createBorderPanel(tMessage);

        fMain.add("South", pMessage);
    }
1119919
@Override
    public void init(Controller c) {
        super.init(c);
        Display2D mainDisplay = new Display2D(600, 600, this);
        mainDisplay.setBackdrop(Color.white);
        try {
            Scenario2DPortrayal scenarioPortrayal = (Scenario2DPortrayal) this
                    .getSimulation().getScenarioPortrayal();
            scenarioPortrayal.addDisplay(Scenario2DPortrayal.MAIN_DISPLAY_ID,
                    mainDisplay);

            HashMap<String, Display2D> displays = scenarioPortrayal
                    .getDisplays();

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

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

            for (Entry<String, Display2D> displayEntry : displays.entrySet()) {
                displayEntry.getValue().setClipping(false);
                JFrame frame = displayEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(displayEntry.getKey(), frame);
                frame.setTitle(displayEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            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);
            }

            HashMap<String, ScatterPlotGenerator> scatterPlots = scenarioPortrayal
                    .getScatterPlots();

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

            HashMap<String, HistogramGenerator> histograms = scenarioPortrayal
                    .getHistograms();

            for (Entry<String, HistogramGenerator> histogramrEntry : histograms
                    .entrySet()) {
                JFrame frame = histogramrEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(histogramrEntry.getKey(), frame);
                frame.setTitle(histogramrEntry.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();
        }
    }
165101
private void initializeForDesktop() {
		logger.log(Level.FINE, "ZoomControl ->initializeForDesktop()");
		StopPropagationHandler preventWeirdBehaviourHandler = new StopPropagationHandler();
		addDomHandler(preventWeirdBehaviourHandler, MouseDownEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, MouseUpEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, ClickEvent.getType());
		addDomHandler(preventWeirdBehaviourHandler, DoubleClickEvent.getType());

		final ViewPort viewPort = mapPresenter.getViewPort();

		// Zoom in button:
		zoomInElement.addDomHandler(new ClickHandler() {

			public void onClick(ClickEvent event) {
				logger.log(Level.FINE, "ZoomControl -> zoomInElement onClick()");
				int index = viewPort.getResolutionIndex(viewPort.getResolution());
				if (index < viewPort.getResolutionCount() - 1) {
					viewPort.registerAnimation(NavigationAnimationFactory.createZoomIn(mapPresenter));
				}
				event.stopPropagation();
			}
		}, ClickEvent.getType());

		// Zoom out button:
		zoomOutElement.addDomHandler(new ClickHandler() {

			public void onClick(ClickEvent event) {
				logger.log(Level.FINE, "ZoomControl -> zoomOutElement onClick()");
				int index = viewPort.getResolutionIndex(viewPort.getResolution());
				if (index > 0) {
					viewPort.registerAnimation(NavigationAnimationFactory.createZoomOut(mapPresenter));
				}
				event.stopPropagation();
			}
		}, ClickEvent.getType());
	}
190120
public void setupPanel()
    {
        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        this.addGridHeading();

        JPanel panel = new JPanel();
        panel.setOpaque(false);
        panel.setMinimumSize(new Dimension(20, 20));
        panel.setLayout(new BorderLayout());
        JScrollPane scrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        panel.add(scrollPane);
        this.add(panel);
        m_panelGrid = new JPanel();
        JPanel panelAligner = new JPanel(); // This panel keeps the panelgrid in the upper left hand of the scrollpane.
        panelAligner.add(m_panelGrid);
        panelAligner.setLayout(new FlowLayout(FlowLayout.LEADING));
        scrollPane.getViewport().add(panelAligner);
        panelAligner.setOpaque(false);
        m_panelGrid.setOpaque(false);
        scrollPane.getViewport().setOpaque(false);
        scrollPane.setOpaque(false);

        this.addGridDetail();
    }
477828
protected void viewDidScroll (List<? extends ChatGlyph> glyphs, int dx, int dy)
    {
        for (ChatGlyph glyph : glyphs) {
            glyph.viewDidScroll(dx, dy);
        }
    }