|
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.ComponentPainter
public class ComponentPainter
The ComponentPainter wraps around an AWT Component and provides a Painter object that is suitable to be used in the ReportSheet. By default, the painter calls Component.paintAll() for lightweight component to print itself, and calls Component.printAll() for heavyweight component to print itself. However, whether these methods work is dependent on the implementation of the components. If the default method does not work for a component, applications can choose a different printing method by supplying a printing method option. The option specifies always using printAll(), paintAll(), print(), or paint() to paint a component.
| Field Summary | |
|---|---|
static int |
DEFAULT
Use default printing method. |
static int |
PAINT
Use Component.paint() to print component. |
static int |
PAINTALL
Use Component.paintAll() to print component. |
static int |
PRINT
Use Component.print() to print component. |
static int |
PRINTALL
Use Component.printAll() to print component. |
static int |
UPDATE
Use Component.paint() to print component. |
| Constructor Summary | |
|---|---|
ComponentPainter(Component comp)
Create a painter from a component. |
|
ComponentPainter(Component comp,
int opt)
Create a painter from a component. |
|
| Method Summary | |
|---|---|
Color |
getBackground()
Get the background. |
Component |
getComponent()
Get the component instance. |
Dimension |
getPreferredSize()
Return the preferred size of this painter. |
boolean |
isScalable()
The component can be scaled. |
void |
paint(Graphics g,
int x,
int y,
int w,
int h)
Paint contents at the specified location. |
void |
setBackground(Color bg)
Set the background. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT
public static final int PRINTALL
public static final int PAINTALL
public static final int PRINT
public static final int PAINT
public static final int UPDATE
| Constructor Detail |
|---|
public ComponentPainter(Component comp)
comp - component to paint.
public ComponentPainter(Component comp,
int opt)
comp - component to paint.opt - printing method.| Method Detail |
|---|
public Dimension getPreferredSize()
getPreferredSize in interface Painter
public void paint(Graphics g,
int x,
int y,
int w,
int h)
paint in interface Painterg - graphical context.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 boolean isScalable()
isScalable in interface Painterpublic Component getComponent()
public void setBackground(Color bg)
public Color getBackground()
|
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 | ||||||||