jdk/src/macosx/classes/com/apple/laf/AquaListUI.java
changeset 25762 c4a3548120c6
parent 23649 f4f882f0056b
equal deleted inserted replaced
25761:c408b10ef757 25762:c4a3548120c6
    77 
    77 
    78         /**
    78         /**
    79          * For a Home action, scrolls to the top. Otherwise, scroll to the end.
    79          * For a Home action, scrolls to the top. Otherwise, scroll to the end.
    80          */
    80          */
    81         public void actionPerformed(final ActionEvent e) {
    81         public void actionPerformed(final ActionEvent e) {
    82             final JList list = (JList)e.getSource();
    82             final JList<?> list = (JList<?>)e.getSource();
    83 
    83 
    84             if (fHomeAction) {
    84             if (fHomeAction) {
    85                 list.ensureIndexIsVisible(0);
    85                 list.ensureIndexIsVisible(0);
    86             } else {
    86             } else {
    87                 final int size = list.getModel().getSize();
    87                 final int size = list.getModel().getSize();
   133         public void mouseDragged(final MouseEvent e) {
   133         public void mouseDragged(final MouseEvent e) {
   134             super.mouseDragged(new SelectionMouseEvent(e));
   134             super.mouseDragged(new SelectionMouseEvent(e));
   135         }*/
   135         }*/
   136     }
   136     }
   137 
   137 
   138     JList getComponent() {
   138     JList<Object> getComponent() {
   139         return list;
   139         return list;
   140     }
   140     }
   141 
   141 
   142     // this is used for blinking combobox popup selections when they are selected
   142     // this is used for blinking combobox popup selections when they are selected
   143     protected void repaintCell(final Object value, final int selectedIndex, final boolean selected) {
   143     protected void repaintCell(final Object value, final int selectedIndex, final boolean selected) {
   144         final Rectangle rowBounds = getCellBounds(list, selectedIndex, selectedIndex);
   144         final Rectangle rowBounds = getCellBounds(list, selectedIndex, selectedIndex);
   145         if (rowBounds == null) return;
   145         if (rowBounds == null) return;
   146 
   146 
   147         final ListCellRenderer renderer = list.getCellRenderer();
   147         final ListCellRenderer<Object> renderer = list.getCellRenderer();
   148         if (renderer == null) return;
   148         if (renderer == null) return;
   149 
   149 
   150         final Component rendererComponent = renderer.getListCellRendererComponent(list, value, selectedIndex, selected, true);
   150         final Component rendererComponent = renderer.getListCellRendererComponent(list, value, selectedIndex, selected, true);
   151         if (rendererComponent == null) return;
   151         if (rendererComponent == null) return;
   152 
   152