Class CSSeparation

java.lang.Object
org.apache.pdfbox.debugger.colorpane.CSSeparation
All Implemented Interfaces:
ActionListener, EventListener, ChangeListener

public class CSSeparation extends Object implements ChangeListener, ActionListener
A class that provides the necessary UI and functionalities to show the Separation color space.
  • Field Details

    • slider

      private JSlider slider
    • tintField

      private JTextField tintField
    • colorBar

      private JLabel colorBar
    • panel

      private JPanel panel
    • separation

      private final PDSeparation separation
    • tintValue

      private float tintValue
  • Constructor Details

    • CSSeparation

      public CSSeparation(COSArray array) throws IOException
      Constructor
      Parameters:
      array - COSArray instance of the Separation color space.
      Throws:
      IOException
  • Method Details

    • initUI

      private void initUI() throws IOException
      initialize all the UI elements and arrange them.
      Throws:
      IOException
    • initValues

      private void initValues()
    • getPanel

      public JPanel getPanel()
      return the main panel that hold all the UI elements.
      Returns:
      JPanel instance
    • stateChanged

      public void stateChanged(ChangeEvent changeEvent)
      input changed in slider.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      changeEvent -
    • actionPerformed

      public void actionPerformed(ActionEvent actionEvent)
      input changed in text field.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      actionEvent -
    • updateColorBar

      private void updateColorBar() throws IOException
      Throws:
      IOException
    • setColorBarBorder

      private void setColorBarBorder() throws IOException
      Set a little border around colorbar. color of the border is the darkest of the colorant.
      Throws:
      IOException
    • getFloatRepresentation

      private float getFloatRepresentation(int value)
    • getIntRepresentation

      private int getIntRepresentation(float value)