|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
com.rapidminer.gui.new_plotter.templates.style.PlotterStyleProvider
com.rapidminer.gui.new_plotter.templates.style.DefaultPlotterStyleProvider
public class DefaultPlotterStyleProvider
The default PlotterStyleProvider. Lets the user choose a font
for the axes, title and legend, and lets him choose a color scheme for the plot.
| Field Summary | |
|---|---|
static int |
FONT_SIZE_DEFAULT
the font size for the font buttons |
| Fields inherited from class com.rapidminer.gui.new_plotter.templates.style.PlotterStyleProvider |
|---|
STYLE_ELEMENT |
| Constructor Summary | |
|---|---|
DefaultPlotterStyleProvider()
Creates a new DefaultPlotterStyleProvider. |
|
| Method Summary | |
|---|---|
void |
addColorScheme(ColorScheme colorScheme)
Appends the given ColorScheme to the list of available ColorSchemes. |
void |
addColorScheme(ColorScheme colorScheme,
int index)
Adds the given ColorScheme to the list of available ColorSchemes at the specified index. |
void |
copySettingsFromPlotterStyleProvider(PlotterStyleProvider provider)
Uses all settings from the given PlotterStyleProvider to overwrite his own settings. |
org.w3c.dom.Element |
createXML(org.w3c.dom.Document document)
Creates an Element which contains all PlotterStyleProvider settings. |
java.awt.Font |
getAxesFont()
Returns the Font which the user chose for the axes. |
ColorScheme |
getColorScheme()
Returns a ColorScheme instance which will be used to color the plot(s). |
java.util.List<ColorScheme> |
getColorSchemes()
Returns the list of available ColorSchemes. |
ColorScheme.ColorRGB |
getFrameBackgroundColor()
Returns the ColorScheme.ColorRGB of the background frame of the chart. |
java.awt.Font |
getLegendFont()
Returns the Font which the user chose for the legend. |
ColorScheme.ColorRGB |
getPlotBackgroundColor()
Returns the ColorScheme.ColorRGB of the plot background. |
int |
getSelectedColorSchemeIndex()
Returns the index of the currently selected ColorScheme. |
javax.swing.JPanel |
getStyleProviderPanel()
Return the JPanel where the user can change the color/font settings. |
java.awt.Font |
getTitleFont()
Returns the Font which the user chose for the title. |
java.lang.String |
getTitleText()
Returns the String which the user chose as the chart title. |
boolean |
isShowLegend()
Returns true when the legend should be shown; false otherwise. |
void |
loadFromXML(org.w3c.dom.Element styleElement)
Loads all PlotterStyleProvider settings from the given Element. |
void |
removeColorScheme(ColorScheme colorScheme)
Removes the given ColorScheme. |
void |
removeColorScheme(int index)
Removes the given ColorScheme with the given index. |
void |
setAxesFont(java.awt.Font axesFont)
Sets the axes Font. |
void |
setFrameBackgroundColor(ColorScheme.ColorRGB frameBackgroundColor)
Sets the ColorScheme.ColorRGB for the frame background around the chart. |
void |
setLegendFont(java.awt.Font legendFont)
Sets the legend Font. |
void |
setPlotBackgroundColor(ColorScheme.ColorRGB plotBackgroundColor)
Sets the ColorScheme.ColorRGB for the chart background. |
void |
setSelectedColorScheme(ColorScheme colorScheme)
Sets the selected ColorScheme. |
void |
setSelectedColorSchemeIndex(int index)
Set the index of the currently selected ColorScheme. |
void |
setShowLegend(boolean showLegend)
Set whether the legend should be shown or not. |
void |
setTitleFont(java.awt.Font titleFont)
Sets the title Font. |
void |
setTitleText(java.lang.String title)
Set the chart title. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FONT_SIZE_DEFAULT
| Constructor Detail |
|---|
public DefaultPlotterStyleProvider()
DefaultPlotterStyleProvider.
| Method Detail |
|---|
public javax.swing.JPanel getStyleProviderPanel()
PlotterStyleProviderJPanel where the user can change the color/font settings.
getStyleProviderPanel in class PlotterStyleProviderpublic java.lang.String getTitleText()
PlotterStyleProviderString which the user chose as the chart title.
getTitleText in class PlotterStyleProviderpublic boolean isShowLegend()
PlotterStyleProvidertrue when the legend should be shown; false otherwise.
isShowLegend in class PlotterStyleProviderpublic void setTitleText(java.lang.String title)
title - public void setShowLegend(boolean showLegend)
showLegend - if true, shows the legend; otherwise hides itpublic java.awt.Font getAxesFont()
PlotterStyleProviderFont which the user chose for the axes.
getAxesFont in class PlotterStyleProviderpublic void setAxesFont(java.awt.Font axesFont)
Font.
axesFont - public java.awt.Font getLegendFont()
PlotterStyleProviderFont which the user chose for the legend.
getLegendFont in class PlotterStyleProviderpublic void setLegendFont(java.awt.Font legendFont)
Font.
legendFont - public java.awt.Font getTitleFont()
PlotterStyleProviderFont which the user chose for the title.
getTitleFont in class PlotterStyleProviderpublic void setTitleFont(java.awt.Font titleFont)
Font.
titleFont - public void setFrameBackgroundColor(ColorScheme.ColorRGB frameBackgroundColor)
ColorScheme.ColorRGB for the frame background around the chart.
frameBackgroundColor - public void setPlotBackgroundColor(ColorScheme.ColorRGB plotBackgroundColor)
ColorScheme.ColorRGB for the chart background.
plotBackgroundColor - public ColorScheme.ColorRGB getFrameBackgroundColor()
PlotterStyleProviderColorScheme.ColorRGB of the background frame of the chart.
getFrameBackgroundColor in class PlotterStyleProviderpublic ColorScheme.ColorRGB getPlotBackgroundColor()
PlotterStyleProviderColorScheme.ColorRGB of the plot background.
getPlotBackgroundColor in class PlotterStyleProviderpublic void setSelectedColorSchemeIndex(int index)
ColorScheme.
index - public void setSelectedColorScheme(ColorScheme colorScheme)
ColorScheme. If the given ColorScheme is not in the current list of schemes,
it will be appended at the end.
colorScheme - the newly selected ColorSchemepublic int getSelectedColorSchemeIndex()
ColorScheme.
public java.util.List<ColorScheme> getColorSchemes()
ColorSchemes. Notice that this list is a copy
so direct modification of the DefaultPlotterStyleProvider is not possible.
public void addColorScheme(ColorScheme colorScheme)
ColorScheme to the list of available ColorSchemes.
Duplicates are not allowed and will result in an IllegalArgumentException.
colorScheme -
public void addColorScheme(ColorScheme colorScheme,
int index)
ColorScheme to the list of available ColorSchemes at the specified index.
Note that inserting before the default ColorSchemes is not supported and will result in an IllegalArgumentException.
Duplicates are not allowed and will result in an IllegalArgumentException.
colorScheme - public void removeColorScheme(int index)
ColorScheme with the given index.
Will throw an IllegalArgumentException if trying to remove a default ColorScheme.
index - public void removeColorScheme(ColorScheme colorScheme)
ColorScheme.
Will throw an IllegalArgumentException if trying to remove a default ColorScheme.
colorScheme - public ColorScheme getColorScheme()
PlotterStyleProviderColorScheme instance which will be used to color the plot(s).
Each plot will use one of the colors in the order provided, if more plots than
colors exist, it will start from the beginning.
getColorScheme in class PlotterStyleProviderpublic org.w3c.dom.Element createXML(org.w3c.dom.Document document)
PlotterStyleProviderElement which contains all PlotterStyleProvider settings.
createXML in class PlotterStyleProviderdocument - the Document where the Element will be written to
Elementpublic void loadFromXML(org.w3c.dom.Element styleElement)
PlotterStyleProviderPlotterStyleProvider settings from the given Element.
loadFromXML in class PlotterStyleProviderstyleElement - the Element where all settings are loaded frompublic void copySettingsFromPlotterStyleProvider(PlotterStyleProvider provider)
PlotterStyleProviderPlotterStyleProvider to overwrite his own settings.
Does not overwrite the title text.
copySettingsFromPlotterStyleProvider in class PlotterStyleProvider
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||