C# 클래스 Lucene.Net.Search.Highlight.GradientFormatter

Copyright 2002-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Formats text with different color intensity depending on the score of the term.
상속: Formatter
파일 보기 프로젝트 열기: synhershko/lucene.net

보호된 프로퍼티들

프로퍼티 타입 설명
bgRMax int
bgRMin int
fgRMax int
fgRMin int
highlightBackground bool
highlightForeground bool

공개 메소드들

메소드 설명
GradientFormatter ( float maxScore, string minForegroundColor, string maxForegroundColor, string minBackgroundColor, string maxBackgroundColor ) : System

Sets the color range for the IDF scores

HexToInt ( string hex ) : int

Converts a hex string into an int. Integer.parseInt(hex, 16) assumes the input is nonnegative unless there is a preceding minus sign. This method reads the input as twos complement instead, so if the input is 8 bytes long, it will correctly restore a negative int produced by Integer.toHexString() but not neccesarily one produced by Integer.toString(x,16) since that method will produce a string like '-FF' for negative integer values.

HighlightTerm ( string originalText, Lucene.Net.Search.Highlight.TokenGroup tokenGroup ) : string

보호된 메소드들

메소드 설명
GetBackgroundColorString ( float score ) : string
GetForegroundColorString ( float score ) : string

비공개 메소드들

메소드 설명
GetColorVal ( int colorMin, int colorMax, float score ) : int
IntToHex ( int i ) : string

메소드 상세

GetBackgroundColorString() 보호된 메소드

protected GetBackgroundColorString ( float score ) : string
score float
리턴 string

GetForegroundColorString() 보호된 메소드

protected GetForegroundColorString ( float score ) : string
score float
리턴 string

GradientFormatter() 공개 메소드

Sets the color range for the IDF scores
public GradientFormatter ( float maxScore, string minForegroundColor, string maxForegroundColor, string minBackgroundColor, string maxBackgroundColor ) : System
maxScore float /// The score (and above) displayed as maxColor (See QueryScorer.getMaxWeight /// which can be used to callibrate scoring scale) ///
minForegroundColor string /// The hex color used for representing IDF scores of zero eg /// #FFFFFF (white) or null if no foreground color required ///
maxForegroundColor string /// The largest hex color used for representing IDF scores eg /// #000000 (black) or null if no foreground color required ///
minBackgroundColor string /// The hex color used for representing IDF scores of zero eg /// #FFFFFF (white) or null if no background color required ///
maxBackgroundColor string /// The largest hex color used for representing IDF scores eg /// #000000 (black) or null if no background color required ///
리턴 System

HexToInt() 공개 정적인 메소드

Converts a hex string into an int. Integer.parseInt(hex, 16) assumes the input is nonnegative unless there is a preceding minus sign. This method reads the input as twos complement instead, so if the input is 8 bytes long, it will correctly restore a negative int produced by Integer.toHexString() but not neccesarily one produced by Integer.toString(x,16) since that method will produce a string like '-FF' for negative integer values.
if the string is more than 16 characters long, or if any /// character is not in the set [0-9a-fA-f]
public static HexToInt ( string hex ) : int
hex string /// A string in capital or lower case hex, of no more then 16 /// characters. ///
리턴 int

HighlightTerm() 공개 메소드

public HighlightTerm ( string originalText, Lucene.Net.Search.Highlight.TokenGroup tokenGroup ) : string
originalText string
tokenGroup Lucene.Net.Search.Highlight.TokenGroup
리턴 string

프로퍼티 상세

bgRMax 보호되어 있는 프로퍼티

protected int bgRMax
리턴 int

bgRMin 보호되어 있는 프로퍼티

protected int bgRMin
리턴 int

fgRMax 보호되어 있는 프로퍼티

protected int fgRMax
리턴 int

fgRMin 보호되어 있는 프로퍼티

protected int fgRMin
리턴 int

highlightBackground 보호되어 있는 프로퍼티

protected bool highlightBackground
리턴 bool

highlightForeground 보호되어 있는 프로퍼티

protected bool highlightForeground
리턴 bool