java.lang.Object
org.jfree.chart3d.renderer.AbstractRenderer3D
- All Implemented Interfaces:
Serializable
,ChartElement
,Renderer3D
- Direct Known Subclasses:
AbstractCategoryRenderer3D
,AbstractXYZRenderer
A base class for 3D renderers.
- See Also:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.renderer.Renderer3D
TRANSPARENT_COLOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(Renderer3DChangeListener listener) Registers an object for notification of changes to the renderer.boolean
Tests this renderer for equality with an arbitrary object.protected void
fireChangeEvent
(boolean requiresWorldUpdate) Sends aRenderer3DChangeEvent
to all registered listeners.Returns the background color for item labels.Returns the foreground color used to display item labels.Returns the font used to display item labels, if there are any.Returns the item label positioning.boolean
isNotify()
Returns a flag that controls whether or not change events are sent to registered listeners.void
Notifies all registered listeners that the plot has been modified.void
receive
(ChartElementVisitor visitor) Receives aChartElementVisitor
.void
removeChangeListener
(Renderer3DChangeListener listener) Unregisters an object for notification of changes to the renderer.void
setItemLabelBackgroundColor
(Color color) Sets the background color and sends a change event to all registered listeners.void
setItemLabelColor
(Color itemLabelColor) Sets the foreground color used to display item labels and sends a change event to all registered listeners.void
setItemLabelFont
(Font itemLabelFont) Sets the font used to display item labels and sends a change event to all registered listeners.void
setItemLabelPositioning
(ItemLabelPositioning positioning) Sets the item label positioning and sends a change event to all registered listeners.void
setNotify
(boolean notify) Sets a flag that controls whether or not listeners receiveRenderer3DChangeEvent
notifications.
-
Constructor Details
-
AbstractRenderer3D
protected AbstractRenderer3D()Default constructor.
-
-
Method Details
-
getItemLabelFont
Returns the font used to display item labels, if there are any. The default value isFont(Font.SERIF, Font.PLAIN, 8)
.- Returns:
- The font (never
null
). - Since:
- 1.3
-
setItemLabelFont
Sets the font used to display item labels and sends a change event to all registered listeners.- Parameters:
itemLabelFont
- the font (null
not permitted).- Since:
- 1.3
-
getItemLabelColor
Returns the foreground color used to display item labels. The default value isColor.BLACK
.- Returns:
- The foreground color (never
null
). - Since:
- 1.3
-
setItemLabelColor
Sets the foreground color used to display item labels and sends a change event to all registered listeners.- Parameters:
itemLabelColor
- the new color (null
not permitted).- Since:
- 1.3
-
getItemLabelBackgroundColor
Returns the background color for item labels.- Returns:
- The background color (never
null
). - Since:
- 1.3
-
setItemLabelBackgroundColor
Sets the background color and sends a change event to all registered listeners.- Parameters:
color
- the new color (null
not permitted).- Since:
- 1.3
-
getItemLabelPositioning
Returns the item label positioning. The default value isItemLabelPositioning.CENTRAL
.- Returns:
- The item label positioning (never
null
). - Since:
- 1.3
-
setItemLabelPositioning
Sets the item label positioning and sends a change event to all registered listeners.- Parameters:
positioning
- the new positioning (null
not permitted).- Since:
- 1.3
-
isNotify
Returns a flag that controls whether or not change events are sent to registered listeners.- Returns:
- A boolean.
- See Also:
-
setNotify
Sets a flag that controls whether or not listeners receiveRenderer3DChangeEvent
notifications.- Parameters:
notify
- a boolean.- See Also:
-
receive
Receives aChartElementVisitor
. This is part of a general purpose mechanism for traversing the chart structure and performing operations on the elements in the structure. You won't normally call this method directly.- Specified by:
receive
in interfaceChartElement
- Parameters:
visitor
- the visitor (null
not permitted).- Since:
- 1.2
-
addChangeListener
Registers an object for notification of changes to the renderer.- Specified by:
addChangeListener
in interfaceRenderer3D
- Parameters:
listener
- the object to be registered.- See Also:
-
removeChangeListener
Unregisters an object for notification of changes to the renderer.- Specified by:
removeChangeListener
in interfaceRenderer3D
- Parameters:
listener
- the object to be unregistered.- See Also:
-
notifyListeners
Notifies all registered listeners that the plot has been modified.- Parameters:
event
- information about the change event.
-
fireChangeEvent
Sends aRenderer3DChangeEvent
to all registered listeners.- Parameters:
requiresWorldUpdate
- a flag indicating whether or not the change requires the 3D world to be updated.
-
equals
Tests this renderer for equality with an arbitrary object. The change listeners are NOT considered in the test, but thenotify
flag is taken into account.
-