Package org.apache.pivot.charts.skin
Class ChartViewSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.charts.skin.ChartViewSkin
-
- All Implemented Interfaces:
ChartView.Skin
,ChartViewCategoryListener
,ChartViewListener
,ChartViewSeriesListener
,ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,Skin
,Visual
public abstract class ChartViewSkin extends ComponentSkin implements ChartView.Skin, ChartViewListener, ChartViewCategoryListener, ChartViewSeriesListener
Abstract base class for chart view skins.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.charts.ChartViewCategoryListener
ChartViewCategoryListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.charts.ChartViewListener
ChartViewListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.charts.ChartViewSeriesListener
ChartViewSeriesListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter, ComponentKeyListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter, ComponentListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter, ComponentMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListener
ComponentMouseWheelListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter, ComponentStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListener
ComponentTooltipListener.Listeners
-
-
Constructor Summary
Constructors Constructor Description ChartViewSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
categoriesRemoved(ChartView chartView, int index, Sequence<ChartView.Category> categories)
Fired when a category is removed from a chart view.void
categoryInserted(ChartView chartView, int index)
Fired when a category is inserted into a chart view.void
categoryKeyChanged(ChartView chartView, int index, java.lang.String previousKey)
Fired when a chart view's category key changes.void
categoryLabelChanged(ChartView chartView, int index, java.lang.String previousLabel)
Fired when a chart view's category label changes.void
chartDataChanged(ChartView chartView, List<?> previousChartData)
Fired when a chart view's data changes.java.awt.Color
getBackgroundColor()
void
horizontalAxisLabelChanged(ChartView chartView, java.lang.String previousHorizontalAxisLabel)
Fired when a chart view's horizontal axis label changes.void
install(Component component)
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.void
layout()
If the component on which the skin is installed is a container, lays out the container's children.void
seriesCleared(ChartView chartView)
Fired when a chart view's series data is cleared.void
seriesInserted(ChartView chartView, int index)
Fired when a series is inserted into a chart view's data set.void
seriesNameKeyChanged(ChartView chartView, java.lang.String previousSeriesNameKey)
Fired when a chart view's series name key changes.void
seriesRemoved(ChartView chartView, int index, int count)
Fired when a series is removed from a chart view's data set.void
seriesSorted(ChartView chartView)
Fired when a chart view's series data is sorted.void
seriesUpdated(ChartView chartView, int index)
Fired when a series is updated in a chart view's data set.void
setBackgroundColor(java.awt.Color backgroundColor)
void
showLegendChanged(ChartView chartView)
Fired when a chart view's "show legend" flag changes.void
titleChanged(ChartView chartView, java.lang.String previousTitle)
Fired when a chart view's title changes.void
verticalAxisLabelChanged(ChartView chartView, java.lang.String previousVerticalAxisLabel)
Fired when a chart view's vertical axis label changes.-
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
colorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, fontFromObject, getBaseline, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getPreferredSize, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, isFocusable, isOpaque, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.charts.ChartView.Skin
getElementAt
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getPreferredHeight, getPreferredWidth, setSize
-
-
-
-
Method Detail
-
install
public void install(Component component)
Description copied from class:ComponentSkin
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
install
in interfaceSkin
- Overrides:
install
in classComponentSkin
- Parameters:
component
- The component to which the skin is being attached.
-
layout
public void layout()
Description copied from interface:Skin
If the component on which the skin is installed is a container, lays out the container's children.
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color backgroundColor)
-
chartDataChanged
public void chartDataChanged(ChartView chartView, List<?> previousChartData)
Description copied from interface:ChartViewListener
Fired when a chart view's data changes.- Specified by:
chartDataChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that is changing.previousChartData
- Previous data for the chart.
-
seriesNameKeyChanged
public void seriesNameKeyChanged(ChartView chartView, java.lang.String previousSeriesNameKey)
Description copied from interface:ChartViewListener
Fired when a chart view's series name key changes.- Specified by:
seriesNameKeyChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that is changing.previousSeriesNameKey
- Previous value of the key for the series name.
-
titleChanged
public void titleChanged(ChartView chartView, java.lang.String previousTitle)
Description copied from interface:ChartViewListener
Fired when a chart view's title changes.- Specified by:
titleChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that changed.previousTitle
- Previous title for this chart.
-
horizontalAxisLabelChanged
public void horizontalAxisLabelChanged(ChartView chartView, java.lang.String previousHorizontalAxisLabel)
Description copied from interface:ChartViewListener
Fired when a chart view's horizontal axis label changes.- Specified by:
horizontalAxisLabelChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that has changed.previousHorizontalAxisLabel
- Previous value of the horizontal axis label.
-
verticalAxisLabelChanged
public void verticalAxisLabelChanged(ChartView chartView, java.lang.String previousVerticalAxisLabel)
Description copied from interface:ChartViewListener
Fired when a chart view's vertical axis label changes.- Specified by:
verticalAxisLabelChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that has changed.previousVerticalAxisLabel
- Previous value of the vertical axis label.
-
showLegendChanged
public void showLegendChanged(ChartView chartView)
Description copied from interface:ChartViewListener
Fired when a chart view's "show legend" flag changes.- Specified by:
showLegendChanged
in interfaceChartViewListener
- Parameters:
chartView
- The chart that has changed.
-
categoryInserted
public void categoryInserted(ChartView chartView, int index)
Description copied from interface:ChartViewCategoryListener
Fired when a category is inserted into a chart view.- Specified by:
categoryInserted
in interfaceChartViewCategoryListener
- Parameters:
chartView
- The chart that is changing.index
- The index of the new category that was inserted.
-
categoriesRemoved
public void categoriesRemoved(ChartView chartView, int index, Sequence<ChartView.Category> categories)
Description copied from interface:ChartViewCategoryListener
Fired when a category is removed from a chart view.- Specified by:
categoriesRemoved
in interfaceChartViewCategoryListener
- Parameters:
chartView
- The chart that is changing.index
- The index of the first category that was removed.categories
- The list of removed categories.
-
categoryKeyChanged
public void categoryKeyChanged(ChartView chartView, int index, java.lang.String previousKey)
Description copied from interface:ChartViewCategoryListener
Fired when a chart view's category key changes.- Specified by:
categoryKeyChanged
in interfaceChartViewCategoryListener
- Parameters:
chartView
- The chart that is changing.index
- The index of the category whose key changed.previousKey
- Previous value of the changed key.
-
categoryLabelChanged
public void categoryLabelChanged(ChartView chartView, int index, java.lang.String previousLabel)
Description copied from interface:ChartViewCategoryListener
Fired when a chart view's category label changes.- Specified by:
categoryLabelChanged
in interfaceChartViewCategoryListener
- Parameters:
chartView
- The chart that is changing.index
- The index of the category whose label changed.previousLabel
- Previous value of the changed label.
-
seriesInserted
public void seriesInserted(ChartView chartView, int index)
Description copied from interface:ChartViewSeriesListener
Fired when a series is inserted into a chart view's data set.- Specified by:
seriesInserted
in interfaceChartViewSeriesListener
- Parameters:
chartView
- The chart that has changed.index
- Index of the series that was inserted.
-
seriesRemoved
public void seriesRemoved(ChartView chartView, int index, int count)
Description copied from interface:ChartViewSeriesListener
Fired when a series is removed from a chart view's data set.- Specified by:
seriesRemoved
in interfaceChartViewSeriesListener
- Parameters:
chartView
- The chart that has changed.index
- Starting index of the removed series.count
- Number of series removed.
-
seriesUpdated
public void seriesUpdated(ChartView chartView, int index)
Description copied from interface:ChartViewSeriesListener
Fired when a series is updated in a chart view's data set.- Specified by:
seriesUpdated
in interfaceChartViewSeriesListener
- Parameters:
chartView
- The chart that has changed.index
- Index of the series that was updated.
-
seriesCleared
public void seriesCleared(ChartView chartView)
Description copied from interface:ChartViewSeriesListener
Fired when a chart view's series data is cleared.- Specified by:
seriesCleared
in interfaceChartViewSeriesListener
- Parameters:
chartView
- The chart that has changed.
-
seriesSorted
public void seriesSorted(ChartView chartView)
Description copied from interface:ChartViewSeriesListener
Fired when a chart view's series data is sorted.- Specified by:
seriesSorted
in interfaceChartViewSeriesListener
- Parameters:
chartView
- Chart that changed.
-
-