public class ContentCellRender
extends java.lang.Object
implements javax.swing.ListCellRenderer<java.lang.Object>
构造器和说明 |
---|
ContentCellRender(java.lang.String searchText,
java.lang.String[] segmentationResult) |
限定符和类型 | 方法和说明 |
---|---|
java.awt.Component |
getListCellRendererComponent(javax.swing.JList<?> list,
java.lang.Object value,
int index,
boolean isSelected,
boolean cellHasFocus) |
java.lang.String |
highLightModelName(java.lang.String modelName,
java.lang.String[] strings)
处理model的显示颜色,将搜索词高亮
|
public ContentCellRender(java.lang.String searchText, java.lang.String[] segmentationResult)
public java.awt.Component getListCellRendererComponent(javax.swing.JList<?> list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent
在接口中 javax.swing.ListCellRenderer<java.lang.Object>
public java.lang.String highLightModelName(java.lang.String modelName, java.lang.String[] strings)
modelName
- strings
-