Class StyleEditorPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class StyleEditorPanel extends JPanel
Editor panel for an IStyled's appearance: symbol type/size/color, line style/width/color, and (for applicable PlotDataTypes) a separate fit-line color and style.

The panel does not own a style reference; setStyle(IStyled) pushes an existing style's values into the panel's widgets (each widget is only touched if it exists for the constructed PlotDataType — some widgets, like the fit-line controls, only apply to curve types that support fitting). Callers read the edited values back out via the individual widget getters (getSymbolSelector(), getSymbolSizeSelector(), getLineWidthSelector(), etc.).

See Also:
  • Field Details

  • Constructor Details

    • StyleEditorPanel

      public StyleEditorPanel(PlotDataType type)
      Create the stye editing panel.
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • setStyle

      public void setStyle(IStyled style)
      Set the choices in the style editor
      Parameters:
      style - the new choices
    • getSymbolSizeSelector

      public TextFieldSlider getSymbolSizeSelector()
      Get the symbols size slider
      Returns:
      symbols size slider
    • getLineWidthSelector

      public TextFieldSlider getLineWidthSelector()
      Get the line width slider
      Returns:
      line width slider
    • getSymbolSelector

      public EnumComboBox<SymbolType> getSymbolSelector()
      Get the symbol selector
      Returns:
      the symbol selector
    • getBorderSelector

      public EnumComboBox<LineStyle> getBorderSelector()
      Get the border selector
      Returns:
      the border selector
    • getSymbolColor

      public ColorLabel getSymbolColor()
      Get the symbol color selector
      Returns:
      the symbol color selector
    • getBorderColor

      public ColorLabel getBorderColor()
      Get the line color selector
      Returns:
      the line color selector
    • getFitLineColor

      public ColorLabel getFitLineColor()
      Get the fit line color selector
      Returns:
      the fit line color selector