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.ActionListenerA 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.JLabelcolorBarprivate javax.swing.JPanelpanelprivate PDSeparationseparationprivate javax.swing.JSlidersliderprivate javax.swing.JTextFieldtintFieldprivate floattintValue
-
Constructor Summary
Constructors Constructor Description CSSeparation(COSArray array)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent actionEvent)input changed in text field.private floatgetFloatRepresentation(int value)private intgetIntRepresentation(float value)javax.swing.JPanelgetPanel()return the main panel that hold all the UI elements.private voidinitUI()initialize all the UI elements and arrange them.private voidinitValues()private voidsetColorBarBorder()Set a little border around colorbar.voidstateChanged(javax.swing.event.ChangeEvent changeEvent)input changed in slider.private voidupdateColorBar()
-
-
-
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- if the instance could not be created
-
-
Method Detail
-
initUI
private void initUI() throws java.io.IOExceptioninitialize 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:
stateChangedin interfacejavax.swing.event.ChangeListener- Parameters:
changeEvent- the event of the change
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
input changed in text field.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
actionEvent- the event of the action
-
updateColorBar
private void updateColorBar() throws java.io.IOException- Throws:
java.io.IOException
-
setColorBarBorder
private void setColorBarBorder() throws java.io.IOExceptionSet 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)
-
-