Top Description Fields Constructors Methods
org.apache.pdfbox.debugger.colorpane

public Class CSSeparation

extends Object
implements ChangeListener, ActionListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ActionListener, java.util.EventListener, javax.swing.event.ChangeListener
Imports
java.awt.Color, .Component, .Dimension, .Font, .GridBagConstraints, .GridBagLayout, .Insets, java.awt.event.ActionEvent, .ActionListener, java.io.IOException, java.util.Dictionary, .Hashtable, javax.swing.BoxLayout, .JLabel, .JPanel, .JSlider, .JTextField, javax.swing.border.BevelBorder, javax.swing.event.ChangeEvent, .ChangeListener, org.apache.pdfbox.cos.COSArray, org.apache.pdfbox.pdmodel.graphics.color.PDSeparation

A class that provides the necessary UI and functionalities to show the Separation color space.
Author
Khyrul Bashar.

Field Summary

Modifier and TypeField and Description
private JLabel
private JPanel
private final PDSeparation
private JSlider
private JTextField
private float

Constructor Summary

AccessConstructor and Description
public
CSSeparation(COSArray
COSArray instance of the Separation color space.
array
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent
the event of the action
actionEvent
)

Implements java.awt.event.ActionListener.actionPerformed.

input changed in text field.

private float
private int
getIntRepresentation(float value)

public JPanel

Returns:

JPanel instance
getPanel
()

return the main panel that hold all the UI elements.

private void
initUI()

initialize all the UI elements and arrange them.

private void
private void
setColorBarBorder()

Set a little border around colorbar.

public void
stateChanged(ChangeEvent
the event of the change
changeEvent
)

Implements javax.swing.event.ChangeListener.stateChanged.

input changed in slider.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorBarback to summary
private JLabel colorBar
panelback to summary
private JPanel panel
separationback to summary
private final PDSeparation separation
sliderback to summary
private JSlider slider
tintFieldback to summary
private JTextField tintField
tintValueback to summary
private float tintValue

Constructor Detail

CSSeparationback to summary
public CSSeparation(COSArray array) throws IOException

Constructor

Parameters
array:COSArray

COSArray instance of the Separation color space.

Exceptions
IOException:
if the instance could not be created

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent actionEvent)

Implements java.awt.event.ActionListener.actionPerformed.

input changed in text field.

Parameters
actionEvent:ActionEvent

the event of the action

Annotations
@Override
getFloatRepresentationback to summary
private float getFloatRepresentation(int value)
getIntRepresentationback to summary
private int getIntRepresentation(float value)
getPanelback to summary
public JPanel getPanel()

return the main panel that hold all the UI elements.

Returns:JPanel

JPanel instance

initUIback to summary
private void initUI() throws IOException

initialize all the UI elements and arrange them.

initValuesback to summary
private void initValues()
setColorBarBorderback to summary
private void setColorBarBorder() throws IOException

Set a little border around colorbar. color of the border is the darkest of the colorant.

stateChangedback to summary
public void stateChanged(ChangeEvent changeEvent)

Implements javax.swing.event.ChangeListener.stateChanged.

input changed in slider.

Parameters
changeEvent:ChangeEvent

the event of the change

Annotations
@Override
updateColorBarback to summary
private void updateColorBar() throws IOException