Example #1
0
 /** {@inheritDoc} */
 @Override
 protected void installListeners(JScrollPane c) {
   super.installListeners(c);
   c.addPropertyChangeListener(this);
   if (UIManager.getBoolean("ScrollPane.useChildTextComponentFocus")) {
     viewportViewFocusHandler = new ViewportViewFocusHandler();
     c.getViewport().addContainerListener(viewportViewFocusHandler);
     Component view = c.getViewport().getView();
     if (view instanceof JTextComponent) {
       view.addFocusListener(viewportViewFocusHandler);
     }
   }
 }
Example #2
0
 /**
  * Installs listeners on scrollPane
  *
  * @param scrollPane - the component to install the listeners on
  */
 public void installListeners(JScrollPane scrollPane) {
   super.installListeners(scrollPane);
 }