|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.painter.TrafficLightPresenter
public class TrafficLightPresenter
The TrafficLightPresenter display an integer number as one of the traffic light color: red, yellow, or green. A color is chosen according to the low-high range. By default the high range is shown as the red light.
| Constructor Summary | |
|---|---|
TrafficLightPresenter()
|
|
| Method Summary | |
|---|---|
Color |
getBackground()
Get the background. |
int |
getBorder()
Get the border size. |
Color |
getBorderColor()
Get the border color. |
Color |
getColor1()
Set the first (green) color. |
Color |
getColor2()
Set the second (yellow) color. |
Color |
getColor3()
Get the third (red) color. |
String |
getDisplayName()
Get the display name of this presenter. |
double |
getHigh()
Get the minimum value for the high value range. |
double |
getLow()
Get the maximum value for the low value range. |
Dimension |
getPreferredSize(Object v)
Calculate the preferred size of the object representation. |
int |
getSize()
Get the diameter of the circle. |
boolean |
isFill()
Check if this presenter should always fill the entire area of a cell. |
boolean |
isHighRed()
Check the color mapping to value ranges. |
boolean |
isHorizontal()
Check whether to show the lights horizontally. |
boolean |
isPresenterOf(Class type)
Check if the presenter can handle this type of objects. |
boolean |
isPresenterOf(Object obj)
Check if the presenter can handle this particular object. |
boolean |
isRawDataRequired()
Determine if this Presenter requires raw (unformatted) data. |
boolean |
isSingleLight()
Check whether to show only a single light. |
void |
paint(Graphics g,
Object v,
int x,
int y,
int w,
int h)
Paint an object at the specified location. |
void |
setBackground(Color bg)
Set the background. |
void |
setBorder(int w)
Set the border size. |
void |
setBorderColor(Color bgColor)
Set the border color. |
void |
setColor1(Color clr)
Get the first (green) color. |
void |
setColor2(Color clr)
Get the second (yellow) color. |
void |
setColor3(Color clr)
Set the third (red) color. |
void |
setFont(Font font)
Set the font to use for this presenter. |
void |
setHigh(double high)
Set the minimum value for the high value range. |
void |
setHighRed(boolean red)
Set how colors are matched to the low-mid-high ranges. |
void |
setHorizontal(boolean h)
Set whether to show the lights horizontally. |
void |
setLow(double low)
Set the mximum value for the low value range. |
void |
setSingleLight(boolean single)
Set whether to show only a single light. |
void |
setSize(int size)
Set the diameter of the circle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrafficLightPresenter()
| Method Detail |
|---|
public void setHigh(double high)
public double getHigh()
public void setLow(double low)
public double getLow()
public void setHorizontal(boolean h)
public boolean isHorizontal()
public void setHighRed(boolean red)
public boolean isHighRed()
public void setSingleLight(boolean single)
public boolean isSingleLight()
public void paint(Graphics g,
Object v,
int x,
int y,
int w,
int h)
paint in interface Presenterg - graphical context.v - object value.x - x coordinate of the left edge of the paint area.y - y coordinate of the upper edge of the paint area.w - area width.h - area height.public Dimension getPreferredSize(Object v)
getPreferredSize in interface Presenterv - object value.
public void setSize(int size)
public int getSize()
public boolean isFill()
isFill in interface Presenterpublic boolean isPresenterOf(Class type)
isPresenterOf in interface Presentertype - object type.
public boolean isPresenterOf(Object obj)
if(type == null) {
return false;
}
return isPresenterOf(obj.getClass());
isPresenterOf in interface Presenterobj - object type.
public void setFont(Font font)
setFont in interface Presenterpublic String getDisplayName()
getDisplayName in interface Presenterpublic boolean isRawDataRequired()
isRawDataRequired in interface Presentertrue.public void setBackground(Color bg)
setBackground in interface Presenterpublic Color getBackground()
public void setBorderColor(Color bgColor)
public Color getBorderColor()
public void setBorder(int w)
public int getBorder()
public Color getColor1()
public void setColor1(Color clr)
public Color getColor2()
public void setColor2(Color clr)
public Color getColor3()
public void setColor3(Color clr)
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||