Class CSSeparation
- java.lang.Object
-
- org.apache.pdfbox.debugger.colorpane.CSSeparation
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
,javax.swing.event.ChangeListener
public class CSSeparation extends java.lang.Object implements javax.swing.event.ChangeListener, java.awt.event.ActionListener
A class that provides the necessary UI and functionalities to show the Separation color space.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JLabel
colorBar
private javax.swing.JPanel
panel
private PDSeparation
separation
private javax.swing.JSlider
slider
private javax.swing.JTextField
tintField
private float
tintValue
-
Constructor Summary
Constructors Constructor Description CSSeparation(COSArray array)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent actionEvent)
input changed in text field.private float
getFloatRepresentation(int value)
private int
getIntRepresentation(float value)
javax.swing.JPanel
getPanel()
return the main panel that hold all the UI elements.private void
initUI()
initialize all the UI elements and arrange them.private void
initValues()
private void
setColorBarBorder()
Set a little border around colorbar.void
stateChanged(javax.swing.event.ChangeEvent changeEvent)
input changed in slider.private void
updateColorBar()
-
-
-
Field Detail
-
slider
private javax.swing.JSlider slider
-
tintField
private javax.swing.JTextField tintField
-
colorBar
private javax.swing.JLabel colorBar
-
panel
private javax.swing.JPanel panel
-
separation
private final PDSeparation separation
-
tintValue
private float tintValue
-
-
Constructor Detail
-
CSSeparation
public CSSeparation(COSArray array) throws java.io.IOException
Constructor- Parameters:
array
- COSArray instance of the Separation color space.- Throws:
java.io.IOException
-
-
Method Detail
-
initUI
private void initUI() throws java.io.IOException
initialize all the UI elements and arrange them.- Throws:
java.io.IOException
-
initValues
private void initValues()
-
getPanel
public javax.swing.JPanel getPanel()
return the main panel that hold all the UI elements.- Returns:
- JPanel instance
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent changeEvent)
input changed in slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
changeEvent
-
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
input changed in text field.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Parameters:
actionEvent
-
-
updateColorBar
private void updateColorBar() throws java.io.IOException
- Throws:
java.io.IOException
-
setColorBarBorder
private void setColorBarBorder() throws java.io.IOException
Set a little border around colorbar. color of the border is the darkest of the colorant.- Throws:
java.io.IOException
-
getFloatRepresentation
private float getFloatRepresentation(int value)
-
getIntRepresentation
private int getIntRepresentation(float value)
-
-