|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Presenter
Presenter interface defines the API for rendering an object into a graphical presentation. The two main function of a presenter is to calculate the size requirement of an object, and draw a graphical representation of the object. A Presenter can be registered for a class of objects, by calling the ReportSheet.addPresenter() function. Or a Presenter can be register with a column in a table, by calling the setPresenter() method on a table lens (table lens derived from AttributeTableLens).
If a presenter is found for an object, the presenter is used in rendering the object during printing.
| Method Summary | |
|---|---|
String |
getDisplayName()
Get the display name of this presenter. |
Dimension |
getPreferredSize(Object v)
Calculate the preferred size of the object representation. |
boolean |
isFill()
Check if this presenter should always fill the entire area of a cell. |
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. |
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 to use for this presenter. |
void |
setFont(Font font)
Set the font to use for this presenter. |
| Method Detail |
|---|
void paint(Graphics g,
Object v,
int x,
int y,
int w,
int h)
g - 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.Dimension getPreferredSize(Object v)
v - object value.
boolean isPresenterOf(Class type)
type - object type.
boolean isPresenterOf(Object obj)
if(type == null) {
return false;
}
return isPresenterOf(obj.getClass());
obj - object type.
boolean isFill()
void setFont(Font font)
void setBackground(Color bg)
String getDisplayName()
boolean isRawDataRequired()
true if the presenter requires raw data.
|
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 | ||||||||