|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.util.ComponentDrawable
public class ComponentDrawable
Creation-Date: 11.10.2005, 14:03:15
Constructor Summary | |
---|---|
ComponentDrawable()
Default Constructor. |
|
ComponentDrawable(javax.swing.JFrame peerSupply)
Creates a new ComponentDrawable with the given Frame as peer-supply. |
Method Summary | |
---|---|
protected void |
cleanUp()
A helper method that performs some cleanup and disconnects the component from the AWT and the Swing-Framework to avoid memory-leaks. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the component. |
java.awt.Component |
getComponent()
Returns the component that should be drawn. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of the drawable. |
java.awt.Dimension |
getSize()
Returns the declared size of the drawable. |
protected static java.awt.Window |
getWindowAncestor(java.awt.Component component)
A private helper method that locates the Window to which the component is currently added. |
boolean |
isAllowOwnPeer()
Returns, whether components are allowed to provide their own AWT-Window. |
protected boolean |
isOwnPeerConnected()
A private helper method that checks, whether the component provides an own peer. |
boolean |
isPaintSynchronized()
Returns, whether component operations will happen on the Event-Dispatcher threads. |
boolean |
isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing. |
void |
setAllowOwnPeer(boolean allowOwnPeer)
Defines, whether components are allowed to provide their own AWT-Window. |
void |
setComponent(java.awt.Component component)
Defines the component that should be drawn. |
void |
setPaintSynchronized(boolean paintSynchronized)
Defines, whether component operations will happen on the Event-Dispatcher threads. |
void |
setPreserveAspectRatio(boolean preserveAspectRatio)
Defines whether the layouter should preserve the aspect ratio of the component's preferred size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentDrawable()
public ComponentDrawable(javax.swing.JFrame peerSupply)
peerSupply
- the frame that should be used as peer-source.Method Detail |
---|
public boolean isAllowOwnPeer()
public void setAllowOwnPeer(boolean allowOwnPeer)
allowOwnPeer
- true, if components can provide their own peers, false otherwise.public boolean isPaintSynchronized()
public void setPaintSynchronized(boolean paintSynchronized)
paintSynchronized
- true, if all operations will be done on the AWT-EventDispatcher thread, false if they
should be done in the local thread.protected final void cleanUp()
public java.awt.Component getComponent()
public void setComponent(java.awt.Component component)
component
- the component.public java.awt.Dimension getPreferredSize()
Component.getPreferredSize()
on the given component.
public java.awt.Dimension getSize()
Component.getSize()
on the given component.
protected final boolean isOwnPeerConnected()
protected static java.awt.Window getWindowAncestor(java.awt.Component component)
component
- the component for which the Window should be returned.
public void setPreserveAspectRatio(boolean preserveAspectRatio)
preserveAspectRatio
- true, if the aspect ratio should be preserved, false otherwise.public boolean isPreserveAspectRatio()
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
g2
- the graphics device.area
- the area inside which the object should be drawn.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |