Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6875169

Generifycation of ComponentUI class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 7
    • 7
    • client-libs
    • None

      ComponentUI class contains lots of methods that takes JComponent as a parameter,
      for example:

      public void paint(Graphics g, JComponent c);

      The ui delegates cast the passed component to the actuall component,
      following example is taken from BasicButtonUI:

          public void paint(Graphics g, JComponent c)
          {
              AbstractButton b = (AbstractButton) c;
           ... }

      It makes sense to generify the component type to take advantage
      of the generic type feature

            alexp Alexander Potochkin (Inactive)
            alexp Alexander Potochkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: