java.awt.event.AdjustmentListener Java Examples
The following examples show how to use
java.awt.event.AdjustmentListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JTreeTablePanel.java From netbeans with Apache License 2.0 | 6 votes |
private void hookScrollBarValueChange() { scrollBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(final AdjustmentEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { treeTable.setTreeCellOffsetX(e.getValue()); if (!e.getValueIsAdjusting()) updateScrollBar(false); } }); } }); }
Example #2
Source File: JScrollBarOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code JScrollBar.removeAdjustmentListener(AdjustmentListener)} * through queue */ public void removeAdjustmentListener(final AdjustmentListener adjustmentListener) { runMapping(new MapVoidAction("removeAdjustmentListener") { @Override public void map() { ((JScrollBar) getSource()).removeAdjustmentListener(adjustmentListener); } }); }
Example #3
Source File: JScrollBarOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code JScrollBar.addAdjustmentListener(AdjustmentListener)} * through queue */ public void addAdjustmentListener(final AdjustmentListener adjustmentListener) { runMapping(new MapVoidAction("addAdjustmentListener") { @Override public void map() { ((JScrollBar) getSource()).addAdjustmentListener(adjustmentListener); } }); }
Example #4
Source File: ScrollbarOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code Scrollbar.removeAdjustmentListener(AdjustmentListener)} * through queue */ public void removeAdjustmentListener(final AdjustmentListener adjustmentListener) { runMapping(new MapVoidAction("removeAdjustmentListener") { @Override public void map() { ((Scrollbar) getSource()).removeAdjustmentListener(adjustmentListener); } }); }
Example #5
Source File: ScrollbarOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code Scrollbar.addAdjustmentListener(AdjustmentListener)} * through queue */ public void addAdjustmentListener(final AdjustmentListener adjustmentListener) { runMapping(new MapVoidAction("addAdjustmentListener") { @Override public void map() { ((Scrollbar) getSource()).addAdjustmentListener(adjustmentListener); } }); }
Example #6
Source File: SymbolControl.java From MeteoInfo with GNU Lesser General Public License v3.0 | 5 votes |
private void initComponents() { this.setPreferredSize(new Dimension(200, 100)); this.setLayout(new BorderLayout()); this.setBackground(Color.white); _vScrollBar = new JScrollBar(JScrollBar.VERTICAL); _vScrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { onScrollValueChanged(e); } }); this.add(_vScrollBar, BorderLayout.EAST); //this._vScrollBar.setSize(this._vScrollBar.getWidth(), this.getHeight()); this._vScrollBar.setSize(20, this.getHeight()); this._vScrollBar.setLocation(this.getWidth() - this._vScrollBar.getWidth(), 0); }
Example #7
Source File: JScrollBarInGlassPaneOverlapping.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override protected JComponent getSwingComponent() { JScrollBar ch = new JScrollBar(JScrollBar.VERTICAL); ch.setPreferredSize(new Dimension(50, 50)); ch.setValue(50); ch.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { wasLWClicked = true; } }); OverlappingTestBase.shift = new Point(20, 16); return ch; }
Example #8
Source File: Palette.java From nanoleaf-desktop with MIT License | 5 votes |
private void initUI() { setLayout(new MigLayout("", "[]", "[]")); add(Box.createRigidArea(new Dimension(width, height)), "cell 0 0,alignx left,aligny top"); setBackground(Color.DARK_GRAY); palette = new ArrayList<Color>(); palette.add(new Color(255, 0, 0)); palette.add(new Color(0, 255, 0)); palette.add(new Color(0, 0, 255)); scrollBar = new JScrollBar(JScrollBar.HORIZONTAL); scrollBar.setUI(new ModernScrollBarUI()); scrollBar.setPreferredSize(new Dimension(width, 20)); scrollBar.setMaximum(11); scrollBar.setMinimum(0); scrollBar.setValue(0); scrollBar.setVisible(false); scrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { repaint(); } }); add(scrollBar, "cell 0 1"); addMouseListener(new MouseHandler()); }
Example #9
Source File: JScrollBarOverlapping.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override protected JComponent getSwingComponent() { JScrollBar ch = new JScrollBar(JScrollBar.VERTICAL); ch.setPreferredSize(new Dimension(50, 50)); ch.setValue(50); ch.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { wasLWClicked = true; } }); OverlappingTestBase.shift = new Point(20, 16); return ch; }
Example #10
Source File: LegendView.java From MeteoInfo with GNU Lesser General Public License v3.0 | 4 votes |
private void initComponents() { this.setPreferredSize(new Dimension(100, 200)); this.setLayout(new BorderLayout()); this.setBackground(Color.white); _vScrollBar = new JScrollBar(JScrollBar.VERTICAL); _vScrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { onScrollValueChanged(e); } }); this.add(_vScrollBar, BorderLayout.EAST); this._vScrollBar.setSize(20, this.getHeight()); this._vScrollBar.setLocation(this.getWidth() - this._vScrollBar.getWidth(), 0); _textField = new JTextField(); _textField.setVisible(false); this.add(_textField); _frmPointSymbolSet = null; _frmPolylineSymbolSet = null; _frmPolygonSymbolSet = null; _frmColorSymbolSet = null; _legendScheme = null; _breakHeight = 20; _symbolWidth = 60; _valueWidth = (this.getWidth() - _symbolWidth) / 2; _labelWidth = _valueWidth; }
Example #11
Source File: DebuggingViewComponent.java From netbeans with Apache License 2.0 | 4 votes |
/** Creates new form DebuggingView */ public DebuggingViewComponent() { setIcon(ImageUtilities.loadImage ("org/netbeans/modules/debugger/resources/debuggingView/debugging_16.png")); // NOI18N // Remember the location of the component when closed. putClientProperty("KeepNonPersistentTCInModelWhenClosed", Boolean.TRUE); // NOI18N initComponents(); resumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/resume_button_16.png", false); focusedResumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/resume_button_focused_16.png", false); pressedResumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/resume_button_pressed_16.png", false); suspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/suspend_button_16.png", false); focusedSuspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/suspend_button_focused_16.png", false); pressedSuspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debuggingView/suspend_button_pressed_16.png", false); setBackground(treeBackgroundColor); leftPanel = new BarsPanel(); rightPanel = new IconsPanel(); mainPanel.setBackground(treeBackgroundColor); mainPanel.add(leftPanel, BorderLayout.WEST); mainPanel.add(rightPanel, BorderLayout.EAST); tapPanel = new TapPanel(); tapPanel.setOrientation(TapPanel.DOWN); tapPanel.setExpanded(true); infoPanel = new InfoPanel(tapPanel, this); tapPanel.add(infoPanel); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(tapPanel, gridBagConstraints); manager.addPropertyChangeListener(this); prefListener = new DebuggingPreferenceChangeListener(); preferences.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, prefListener, preferences)); sessionsComboListener = new SessionsComboBoxListener(); scrollBarPanel.setVisible(false); if( "Aqua".equals(UIManager.getLookAndFeel().getID()) ) { //NOI18N scrollBarPanel.setBackground(tapPanel.getBackground()); scrollBarPanel.setOpaque(true); } treeScrollBar.addAdjustmentListener(this); setSuspendTableVisible(preferences.getBoolean(FiltersDescriptor.SHOW_SUSPEND_TABLE, true)); mainScrollPane.getVerticalScrollBar().addAdjustmentListener( new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { if (!e.getValueIsAdjusting() && !ignoreScrollAdjustment) { storeScrollPosition(); } } }); }
Example #12
Source File: SideKickVerticalScrollbar.java From ghidra with Apache License 2.0 | 4 votes |
@Override public void removeAdjustmentListener(AdjustmentListener l) { delegate.removeAdjustmentListener(l); }
Example #13
Source File: SideKickVerticalScrollbar.java From ghidra with Apache License 2.0 | 4 votes |
@Override public AdjustmentListener[] getAdjustmentListeners() { return delegate.getAdjustmentListeners(); }
Example #14
Source File: SideKickVerticalScrollbar.java From ghidra with Apache License 2.0 | 4 votes |
@Override public void addAdjustmentListener(AdjustmentListener l) { delegate.addAdjustmentListener(l); }
Example #15
Source File: ScrollPaneAdjustable.java From dragonwell8_jdk with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #16
Source File: ScrollPaneAdjustable.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }
Example #17
Source File: ScrollPaneAdjustable.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #18
Source File: ScrollPaneAdjustable.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }
Example #19
Source File: ScrollPaneAdjustable.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #20
Source File: ScrollPaneAdjustable.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }
Example #21
Source File: ScrollPaneAdjustable.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #22
Source File: ScrollPaneAdjustable.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #23
Source File: ScrollPaneAdjustable.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #24
Source File: ScrollPaneAdjustable.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #25
Source File: ScrollPaneAdjustable.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since JDK1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #26
Source File: ScrollPaneAdjustable.java From Bytecoder with Apache License 2.0 | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this {@code ScrollPaneAdjustable}. * If {@code l} is {@code null}, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }
Example #27
Source File: ScrollPaneAdjustable.java From Bytecoder with Apache License 2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this {@code ScrollPaneAdjustable}. * If {@code l} is {@code null}, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since 1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #28
Source File: ScrollPaneAdjustable.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this {@code ScrollPaneAdjustable}. * If {@code l} is {@code null}, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }
Example #29
Source File: ScrollPaneAdjustable.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Removes the specified adjustment listener so that it no longer * receives adjustment events from this {@code ScrollPaneAdjustable}. * If {@code l} is {@code null}, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #addAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent * @since 1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { return; } adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l); }
Example #30
Source File: ScrollPaneAdjustable.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Adds the specified adjustment listener to receive adjustment * events from this <code>ScrollPaneAdjustable</code>. * If <code>l</code> is <code>null</code>, no exception is thrown * and no action is performed. * <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" * >AWT Threading Issues</a> for details on AWT's threading model. * * @param l the adjustment listener. * @see #removeAdjustmentListener * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { return; } adjustmentListener = AWTEventMulticaster.add(adjustmentListener, l); }