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 voidcategoriesRemoved(ChartView chartView, int index, Sequence<ChartView.Category> categories)Fired when a category is removed from a chart view.voidcategoryInserted(ChartView chartView, int index)Fired when a category is inserted into a chart view.voidcategoryKeyChanged(ChartView chartView, int index, java.lang.String previousKey)Fired when a chart view's category key changes.voidcategoryLabelChanged(ChartView chartView, int index, java.lang.String previousLabel)Fired when a chart view's category label changes.voidchartDataChanged(ChartView chartView, List<?> previousChartData)Fired when a chart view's data changes.java.awt.ColorgetBackgroundColor()voidhorizontalAxisLabelChanged(ChartView chartView, java.lang.String previousHorizontalAxisLabel)Fired when a chart view's horizontal axis label changes.voidinstall(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.voidlayout()If the component on which the skin is installed is a container, lays out the container's children.voidseriesCleared(ChartView chartView)Fired when a chart view's series data is cleared.voidseriesInserted(ChartView chartView, int index)Fired when a series is inserted into a chart view's data set.voidseriesNameKeyChanged(ChartView chartView, java.lang.String previousSeriesNameKey)Fired when a chart view's series name key changes.voidseriesRemoved(ChartView chartView, int index, int count)Fired when a series is removed from a chart view's data set.voidseriesSorted(ChartView chartView)Fired when a chart view's series data is sorted.voidseriesUpdated(ChartView chartView, int index)Fired when a series is updated in a chart view's data set.voidsetBackgroundColor(java.awt.Color backgroundColor)voidshowLegendChanged(ChartView chartView)Fired when a chart view's "show legend" flag changes.voidtitleChanged(ChartView chartView, java.lang.String previousTitle)Fired when a chart view's title changes.voidverticalAxisLabelChanged(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:ComponentSkinMust 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:
installin interfaceSkin- Overrides:
installin classComponentSkin- Parameters:
component- The component to which the skin is being attached.
-
layout
public void layout()
Description copied from interface:SkinIf 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:ChartViewListenerFired when a chart view's data changes.- Specified by:
chartDataChangedin 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:ChartViewListenerFired when a chart view's series name key changes.- Specified by:
seriesNameKeyChangedin 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:ChartViewListenerFired when a chart view's title changes.- Specified by:
titleChangedin 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:ChartViewListenerFired when a chart view's horizontal axis label changes.- Specified by:
horizontalAxisLabelChangedin 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:ChartViewListenerFired when a chart view's vertical axis label changes.- Specified by:
verticalAxisLabelChangedin 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:ChartViewListenerFired when a chart view's "show legend" flag changes.- Specified by:
showLegendChangedin interfaceChartViewListener- Parameters:
chartView- The chart that has changed.
-
categoryInserted
public void categoryInserted(ChartView chartView, int index)
Description copied from interface:ChartViewCategoryListenerFired when a category is inserted into a chart view.- Specified by:
categoryInsertedin 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:ChartViewCategoryListenerFired when a category is removed from a chart view.- Specified by:
categoriesRemovedin 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:ChartViewCategoryListenerFired when a chart view's category key changes.- Specified by:
categoryKeyChangedin 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:ChartViewCategoryListenerFired when a chart view's category label changes.- Specified by:
categoryLabelChangedin 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:ChartViewSeriesListenerFired when a series is inserted into a chart view's data set.- Specified by:
seriesInsertedin 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:ChartViewSeriesListenerFired when a series is removed from a chart view's data set.- Specified by:
seriesRemovedin 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:ChartViewSeriesListenerFired when a series is updated in a chart view's data set.- Specified by:
seriesUpdatedin 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:ChartViewSeriesListenerFired when a chart view's series data is cleared.- Specified by:
seriesClearedin interfaceChartViewSeriesListener- Parameters:
chartView- The chart that has changed.
-
seriesSorted
public void seriesSorted(ChartView chartView)
Description copied from interface:ChartViewSeriesListenerFired when a chart view's series data is sorted.- Specified by:
seriesSortedin interfaceChartViewSeriesListener- Parameters:
chartView- Chart that changed.
-
-