javax.swing.plaf.ScrollPaneUI Java Examples
The following examples show how to use
javax.swing.plaf.ScrollPaneUI.
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: DocumentViewOp.java From netbeans with Apache License 2.0 | 5 votes |
private void updateListeners() { ScrollPaneUI ui = scrollPane.getUI(); if (ui != lastUI) { // Update "ui" property listener if (ui != null) { // Check mouse wheel listeners on scroll pane. // Pair first non-MWDelegator listener with // Remove any other delegators than this one. MouseWheelListener[] mwls = scrollPane.getListeners(MouseWheelListener.class); if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "MouseWheelDelegator.updateListeners(): scrollPane change scrollPane={0}, MouseWheelListeners:{1}\n", new Object[]{obj2String(scrollPane), Arrays.asList(mwls)}); } delegateListener = null; for (MouseWheelListener listener : mwls) { if (listener instanceof MouseWheelDelegator) { scrollPane.removeMouseWheelListener(listener); if (delegateListener == null) { delegateListener = ((MouseWheelDelegator) listener).delegateListener; scrollPane.addMouseWheelListener(this); } } else { // Regular listener // Current patch only assumes one MW listener attached by the UI impl. if (delegateListener == null) { delegateListener = listener; scrollPane.removeMouseWheelListener(listener); scrollPane.addMouseWheelListener(this); } } } } lastUI = ui; } }
Example #2
Source File: JScrollPaneOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code JScrollPane.getUI()} through queue */ public ScrollPaneUI getUI() { return (runMapping(new MapAction<ScrollPaneUI>("getUI") { @Override public ScrollPaneUI map() { return ((JScrollPane) getSource()).getUI(); } })); }
Example #3
Source File: JScrollPaneOperator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Maps {@code JScrollPane.setUI(ScrollPaneUI)} through queue */ public void setUI(final ScrollPaneUI scrollPaneUI) { runMapping(new MapVoidAction("setUI") { @Override public void map() { ((JScrollPane) getSource()).setUI(scrollPaneUI); } }); }
Example #4
Source File: JBScrollPane.java From consulo with Apache License 2.0 | 4 votes |
@Override public void setUI(ScrollPaneUI ui) { super.setUI(ui); updateViewportBorder(); }
Example #5
Source File: DesktopEditorImpl.java From consulo with Apache License 2.0 | 4 votes |
@Override public void setUI(ScrollPaneUI ui) { super.setUI(ui); // disable standard Swing keybindings setInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null); }