Klasse AbstractPlot

java.lang.Object
com.inet.report.chart.plot.AbstractPlot
Alle implementierten Schnittstellen:
ChartPlot, Serializable
Bekannte direkte Unterklassen:
GanttPlot, PiePlot, StandardPlot, StockPlot, XYPlot

public abstract class AbstractPlot extends Object implements ChartPlot
A general plotting class with common properties used by all chart plots.
Seit:
8.0
Siehe auch:
  • Felddetails

    • TOKEN_PLOT

      public static final String TOKEN_PLOT
      XML token for a plot element.
      Siehe auch:
    • DEFAULT_COLOR_SEQUENCE

      public static final Color[] DEFAULT_COLOR_SEQUENCE
      The default order of colors.
    • DEFAULT_FOREGROUND_ALPHA

      public static final float DEFAULT_FOREGROUND_ALPHA
      The default foreground alpha
      Siehe auch:
    • DEFAULT_ITEM_LABEL_FONT

      public static final Font DEFAULT_ITEM_LABEL_FONT
      Default font of the item labels.
    • DEFAULT_ITEM_LABEL_COLOR

      public static final int DEFAULT_ITEM_LABEL_COLOR
      Default color of the item labels.
      Siehe auch:
    • DEFAULT_OUTLINE_STYLE

      public static final int DEFAULT_OUTLINE_STYLE
      Default outline style.
      Siehe auch:
    • DEFAULT_OUTLINE_WIDTH

      public static final int DEFAULT_OUTLINE_WIDTH
      Default outline width.
      Siehe auch:
    • DEFAULT_OUTLINE_COLOR

      public static final int DEFAULT_OUTLINE_COLOR
      Default outline color.
  • Konstruktordetails

    • AbstractPlot

      public AbstractPlot()
      FOR INTERNAL USE ONLY
  • Methodendetails

    • getBackColor

      public int getBackColor()
      Returns the ABGR value representing the background color.
      Gibt zurück:
      the color.
      Seit:
      8.0
      Siehe auch:
    • setBackColor

      public void setBackColor(int backgroundColor)
      Sets the ABGR value representing the background color.
      Parameter:
      backgroundColor - the background color
      Seit:
      8.0
      Siehe auch:
    • getItemShape

      public ItemShape getItemShape()
      Returns the item shape settings for this plot.
      Gibt zurück:
      the ItemShape holding the item shape settings for this plot
      Seit:
      8.0
      Siehe auch:
    • setItemShape

      public void setItemShape(ItemShape itemShape)
      Sets the item shape properties for this plot.
      Parameter:
      itemShape - the properties object (null not permitted)
      Seit:
      8.0
      Siehe auch:
    • getOutlineColor

      public int getOutlineColor()
      Returns the ABGR value representing the chart items outline color.
      Gibt zurück:
      the chart items' outline color.
      Seit:
      8.0
      Siehe auch:
    • setOutlineColor

      public void setOutlineColor(int outlineColor)
      Sets the ABGR components of the chart items outline color.
      Parameter:
      outlineColor - the chart items' outline color
      Löst aus:
      IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.
      Seit:
      8.0
      Siehe auch:
    • getOutlineStyle

      public int getOutlineStyle()
      Returns the chart items' outline style.
      Gibt zurück:
      style of the outline
      Seit:
      8.0
      Siehe auch:
      • BorderPropertiesConstants.LINE_STYLE_DASHED
      • BorderPropertiesConstants.LINE_STYLE_DOTTED
      • BorderPropertiesConstants.LINE_STYLE_SINGLE
      • BorderPropertiesConstants.NO_LINE
    • setOutlineStyle

      public void setOutlineStyle(int outlineStyle)
      Sets the chart items' outline style. Chart items are the items used to visualize the data, e.g. bars.
      Parameter:
      outlineStyle - the style
      Löst aus:
      IllegalArgumentException - if the parameter is not one of the supported outline styles
      Seit:
      8.0
      Siehe auch:
      • getOutlineStyle()
      • BorderPropertiesConstants.LINE_STYLE_DASHED
      • BorderPropertiesConstants.LINE_STYLE_DOTTED
      • BorderPropertiesConstants.LINE_STYLE_SINGLE
      • BorderPropertiesConstants.NO_LINE
    • getOutlineWidth

      public int getOutlineWidth()
      Returns the chart outline's width.
      Gibt zurück:
      the width of the chart's outline.
      Seit:
      8.0
    • setOutlineWidth

      public void setOutlineWidth(int outlineWidth)
      Sets the chart items' outline width (in twips). Chart items are the items used to visualize the data, e.g. bars.
      Parameter:
      outlineWidth - the outline width of the chart items
      Löst aus:
      IllegalArgumentException - if width is less than 1.
      Seit:
      8.0
    • isDrawOutline

      public boolean isDrawOutline()
      Returns whether or not to draw the outline.
      Gibt zurück:
      true the outline is to be drawn.
      Seit:
      8.0
    • setDrawOutline

      public void setDrawOutline(boolean drawOutline)
      Sets whether or not to draw the outline.
      Parameter:
      drawOutline - true if outline is to be drawn.
      Seit:
      8.0
    • isShowLabel

      public boolean isShowLabel()
      Returns whether or not to show labels in the plot.
      Gibt zurück:
      true if labels are to be shown.
      Seit:
      8.0
    • setShowLabel

      public void setShowLabel(boolean showLabel)
      Sets whether or not to show labels in the plot.
      Parameter:
      showLabel - true if labels are to be shown.
      Seit:
      8.0
    • isShowValue

      public boolean isShowValue()
      Returns whether or not to show the values in the plot.
      Gibt zurück:
      true if values are to be shown.
      Seit:
      8.0
    • setShowValue

      public void setShowValue(boolean showValue)
      Sets whether or not to show the values in the plot.
      Parameter:
      showValue - set true if values are to be shown.
      Seit:
      8.0
    • getItemLabelFormat

      public ChartFormat getItemLabelFormat()
      Returns the format for the item value.
      Gibt zurück:
      the format for the item value
      Seit:
      8.0
      Siehe auch:
    • setItemLabelFormat

      public void setItemLabelFormat(ChartFormat valueFormat)
      Sets the format for the item value. The default value of this property is null, which means that the values are to be formatted automatically. Note: for chart with number values, only formats extended from NumberFormat are allowed, while for date charts, only formats extended from DateFormat are allowed.
      Parameter:
      valueFormat - the format (null permitted)
      Seit:
      8.0
      Siehe auch:
    • getItemLabelFormatFormula

      public FormulaField getItemLabelFormatFormula()
      Returns the format formula for the item values.
      Gibt zurück:
      the format formula for the item values.
      Seit:
      22.10
      Siehe auch:
    • setItemLabelFormatFormula

      public void setItemLabelFormatFormula(FormulaField itemLabelFormula)
      Set the format formula for the item values.
      Parameter:
      itemLabelFormula - the formula
      Seit:
      22.10
    • isSameColorsForSameGroups

      public boolean isSameColorsForSameGroups()
      Returns whether identical groups will have the same color.
      Gibt zurück:
      true if the same color is to be used for identical groups.
      Seit:
      8.0
    • setSameColorsForSameGroups

      public void setSameColorsForSameGroups(boolean sameColorsForSameGroups)
      Sets whether identical groups will have the same color.
      Parameter:
      sameColorsForSameGroups - true if the same color is to be used for identical groups.
      Seit:
      8.0
    • getColorFormula

      public FormulaField getColorFormula()
      Returns the color formula which determines the color at run-time.
      Gibt zurück:
      the colorFormula or null if there is none.
      Seit:
      8.0
      Siehe auch:
    • setColorFormula

      public void setColorFormula(FormulaField colorFormula)
      Sets the color formula which determines the color at run-time. Note: this formula should have the type FormulaField.FORMULA_PROPERTY.
      Parameter:
      colorFormula - the color formula (null permitted)
      Löst aus:
      IllegalArgumentException - if the formula has the wrong type.
      Seit:
      8.0
      Siehe auch:
    • getColorSequence

      public Color[] getColorSequence()
      Returns the user defined color sequence of this chart plot. If this sequence was not set, the chart will use the DEFAULT_COLOR_SEQUENCE.
      Gibt zurück:
      the color sequence or null which means the default color sequence will be used
      Seit:
      8.0
      Siehe auch:
    • setColorSequence

      public void setColorSequence(Color[] colorSequence)
      Sets the user defined color sequence for this chart plot. If this sequence was not set chart uses the DEFAULT_COLOR_SEQUENCE.
      Parameter:
      colorSequence - the array of colors (null permitted)
      Löst aus:
      IllegalArgumentException - if an empty color sequence is passed
      Seit:
      8.0
      Siehe auch:
    • getGradientSetting

      public AbstractPlot.GradientSetting getGradientSetting()
      Returns the gradient paint settings.
      Gibt zurück:
      the settings or null without gradient paint for chart items
      Seit:
      11.0
    • setGradientSetting

      public void setGradientSetting(AbstractPlot.GradientSetting gradientSetting)
      Sets the gradient paint settings.
      Parameter:
      gradientSetting - the gradient paint for the chart items (null permitted)
      Seit:
      11.0
    • isColorBySeries

      public boolean isColorBySeries()
      Returns whether the chart items are colored by series or by groups.
      Gibt zurück:
      true if the chart items are colored according to their series, and false if the chart items are colored according to their groups
      Seit:
      8.0
      Siehe auch:
    • setColorBySeries

      public void setColorBySeries(boolean colorBySeries)
      Sets whether the chart items are colored by series or by groups. This property works by Bar, Gantt and Chart3D only.
      Parameter:
      colorBySeries - true if the chart items are colored according to their series, and false if the chart items are colored according to their groups
      Seit:
      8.0
      Siehe auch:
    • getForegroundAlpha

      public float getForegroundAlpha()
      Returns the alpha value for the foreground color: 1.0 is fully opaque, while 0.0 is fully transparent.
      Gibt zurück:
      the alpha value for the foreground color, between 0.0 and 1.0
      Seit:
      8.0
    • setForegroundAlpha

      public void setForegroundAlpha(float foregroundAlpha)
      Sets the alpha (opaqueness) value for the foreground color: 1.0 is fully opaque, while 0.0 is fully transparent.
      Parameter:
      foregroundAlpha - the alpha value for the foreground color
      Löst aus:
      IllegalArgumentException - if foregroundAlpha is less than 0.0 or greater than 1.0.
      Seit:
      8.0
    • getItemLabelFont

      public Font getItemLabelFont()
      Returns font for the item labels.
      Gibt zurück:
      the font for the item labels
      Seit:
      8.0
      Siehe auch:
    • setItemLabelFont

      public void setItemLabelFont(Font itemLabelFont)
      Sets the font of the item labels.
      Parameter:
      itemLabelFont - the font (null not permitted)
      Seit:
      8.0
      Siehe auch:
    • getItemLabelColor

      public int getItemLabelColor()
      Returns the ABGR value representing the color of the item labels. Use ColorUtils.toJavaColor(int) to convert this value to a Java Color.
      Gibt zurück:
      the color of the item labels as an int
      Seit:
      8.0
      Siehe auch:
    • setItemLabelColor

      public void setItemLabelColor(int itemLabelColor)
      Sets the ABGR value representing the color of the item labels. Use ColorUtils.toCcColor(Color) to convert a Java color to an int value.
      Parameter:
      itemLabelColor - ABGR components of the item labels' color
      Löst aus:
      IllegalArgumentException - if RDC.COLOR_NO_COLOR is passed.
      Seit:
      8.0
      Siehe auch:
    • refreshAutoTitles

      public abstract void refreshAutoTitles(Chart2 chart)
      Reads out the data column names from dataset and refreshes the chart labels. Please use this function to refresh the chart labels if the data was be changed.
      Angegeben von:
      refreshAutoTitles in Schnittstelle ChartPlot
      Parameter:
      chart - the chart
    • getStyle

      public abstract ChartStyle getStyle()
      Returns the style of this chart, ie. the general category this plot belongs to.
      Gibt zurück:
      the style
      Seit:
      8.0
      Siehe auch:
    • getReferencedObject

      public List getReferencedObject()
      Returns a list of referenced i-net Clear Reports objects: Field or Group
      Angegeben von:
      getReferencedObject in Schnittstelle ChartPlot
      Gibt zurück:
      the list of objects.
    • saveProperties

      public void saveProperties(PrintWriter out, int depth)
      Writes the properties of this chart plot to PrintWriter.
      Angegeben von:
      saveProperties in Schnittstelle ChartPlot
      Parameter:
      out - the output
      depth - the depth of XML indent
    • getSubProperties

      protected StringBuilder getSubProperties(int depth)
      Returns the serialized simple properties of subclasses.
      Parameter:
      depth - the depth of XML indent
      Gibt zurück:
      the properties.
      Seit:
      8.0
    • saveSubProperties

      protected void saveSubProperties(PrintWriter out, int depth)
      Writes the intern properties to output. Overwrites this to save intern properties direct to PrintWriter without building a StringBuilder.
      Parameter:
      out - the output
      depth - the depth of XML indent
      Seit:
      8.0
    • readProperties

      public void readProperties(Element element, Chart2 chart)
      Reads the chart properties from the DOMParser Element.
      Angegeben von:
      readProperties in Schnittstelle ChartPlot
      Parameter:
      element - the DOMParser Element
      chart - the chart