org.scalatest.tools.EventHolderListCellRenderer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatest_2.11.0-RC2 Show documentation
Show all versions of scalatest_2.11.0-RC2 Show documentation
ScalaTest is a free, open-source testing toolkit for Scala and Java
programmers.
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