public class ChartAreaModel extends ChartElement
ChartElement.Predicate<T>
children
PROPERTY_CHANGED_MESSAGE, PROPERTY_CHANGING_MESSAGE, trackPropertyChanged, trackPropertyChanging
Constructor and Description |
---|
ChartAreaModel()
Creates an instance of the
ChartAreaModel class by initializing its plot area and messaging
infrastructure. |
Modifier and Type | Method and Description |
---|---|
void |
beginUpdate()
Locks the
ChartAreaModel for performing state update calls. |
ModifyChildrenResult |
canAddChild(ChartNode child)
Gets a
ModifyChildrenResult value that determines if a child can be added to this element. |
void |
endUpdate(boolean refresh)
Unlocks the
ChartAreaModel thus allowing the processing of ChartNode updates
and messages. |
MessageDispatcher |
getDispatcher()
Gets the
MessageDispatcher instance associated with this ChartAreaModel . |
Iterable<String> |
getNotLoadedReasons()
Generates a collection of reasons describing why the chart
could not be loaded.
|
ChartPlotAreaModel |
getPlotArea()
Gets an instance of the
ChartPlotAreaModel class
representing the part of the chart where the data is plotted. |
ElementCollection<ChartSeriesModel> |
getSeries()
Gets a
ElementCollection containing the
currently available series in this ChartAreaModel . |
ChartView |
getView()
Gets the current chart view.
|
void |
invalidate(int flags)
Invalidates the
ChartAreaModel by specifying what types of calculations
will be performed after validation. |
void |
invalidateNode(ChartNode node)
Invalidates the state of the specified
ChartNode and refreshes it. |
boolean |
isSuspended()
Gets a boolean value determining whether the messages and invalidation
mechanisms are suspended.
|
boolean |
isTreeLoaded()
Gets a value determining whether the node three of the parent chart is been loaded.
|
void |
loadElementTree(ChartView view)
Loads the element tree of the current
ChartAreaModel with the corresponding
ChartView . |
void |
onPanOffsetChanged()
Called when the Chart's pan offset changes.
|
void |
onZoomChanged()
Called when the Chart's zoom factor changes.
|
void |
previewMessage(ChartMessage message)
Used by the
MessageDispatcher to delegate messages to the
ChartAreaModel . |
enumDescendants, enumDescendants, enumDescendants, findAncestor, findDescendant, getPresenter, isAncestorOf, setPresenter
applyLayoutRounding, arrange, arrange, chartArea, clearValue, collectionIndex, getLayoutSlot, getNodeState, getParent, index, invalidate, isVisible, load, setIsVisible, setParent, setValue
getTypedValue, getValue, isLocalValue
public ChartAreaModel()
ChartAreaModel
class by initializing its plot area and messaging
infrastructure.public ChartView getView()
public ChartPlotAreaModel getPlotArea()
ChartPlotAreaModel
class
representing the part of the chart where the data is plotted.ChartPlotAreaModel
instance.public ElementCollection<ChartSeriesModel> getSeries()
ElementCollection
containing the
currently available series in this ChartAreaModel
.public boolean isTreeLoaded()
ChartNode
isTreeLoaded
in class ChartNode
true
if the tree is loaded, otherwise false
.public boolean isSuspended()
true
if the model is suspended, otherwise false
.public MessageDispatcher getDispatcher()
MessageDispatcher
instance associated with this ChartAreaModel
.MessageDispatcher
instance.public void onZoomChanged()
public void onPanOffsetChanged()
public void beginUpdate()
ChartAreaModel
for performing state update calls.
When the model is locked, no messages or ChartNode
updates are processed.public void endUpdate(boolean refresh)
ChartAreaModel
thus allowing the processing of ChartNode
updates
and messages.refresh
- if set to true
forces the invalidation and refreshing of the model.public void loadElementTree(ChartView view)
ChartAreaModel
with the corresponding
ChartView
.view
- the ChartView
to load the tree with.public void invalidateNode(ChartNode node)
ChartNode
and refreshes it.node
- the ChartNode
to invalidate and refresh.public ModifyChildrenResult canAddChild(ChartNode child)
ChartElement
ModifyChildrenResult
value that determines if a child can be added to this element.canAddChild
in class ChartElement
child
- The child to be considered.public void previewMessage(ChartMessage message)
MessageDispatcher
to delegate messages to the
ChartAreaModel
.message
- the ChartMessage
instance representing the message.public void invalidate(int flags)
ChartAreaModel
by specifying what types of calculations
will be performed after validation.flags
- a set of flas specifying the type of invalidation.