org.jfree.report.util
public class ComponentDrawable extends Object
Constructor Summary | |
---|---|
ComponentDrawable()
Default Constructor. | |
ComponentDrawable(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(Graphics2D g2, Rectangle2D area)
Draws the component.
|
Component | getComponent()
Returns the component that should be drawn.
|
Dimension | getPreferredSize()
Returns the preferred size of the drawable. |
Dimension | getSize()
Returns the declared size of the drawable. |
protected static Window | getWindowAncestor(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(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.
|
Parameters: peerSupply the frame that should be used as peer-source.
Parameters: g2 the graphics device. area the area inside which the object should be drawn.
Returns: the component.
Returns: the preferred size.
Returns: the preferred size.
Parameters: component the component for which the Window should be returned.
Returns: the AWT-Window that is the (possibly indirect) parent of this component.
Returns: true, if foreign peers are allowed, false otherwise.
Returns: true, if the component has an own peer, false otherwise.
Returns: true, if all operations will be done on the AWT-EventDispatcher thread, false if they should be done in the local thread.
Returns: true, if an aspect ratio is preserved, false otherwise.
Parameters: allowOwnPeer true, if components can provide their own peers, false otherwise.
Parameters: component the component.
Parameters: paintSynchronized true, if all operations will be done on the AWT-EventDispatcher thread, false if they should be done in the local thread.
Parameters: preserveAspectRatio true, if the aspect ratio should be preserved, false otherwise.