All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scalatest.tools.EventHolderListCellRenderer.scala Maven / Gradle / Ivy

The newest version!
package org.scalatest.tools
import java.awt.Component
import javax.swing._
private[tools] trait EventHolderListCellRenderer extends ListCellRenderer {
  private val defaultRenderer: DefaultListCellRenderer = new DefaultListCellRenderer()
  protected def decorate(renderer: JLabel, value: Object, isSelected: Boolean): Component
  def getListCellRendererComponent(list: JList, value: Object, index: Int, isSelected: Boolean, cellHasFocus: Boolean): Component = {
    val renderer: JLabel = defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus).asInstanceOf[JLabel]
    decorate(renderer, value, isSelected)
  }}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy