Top Inners Fields Constructors Methods
org.apache.pdfbox.debugger.fontencodingpane

pack-priv Class FontEncodingView

extends Object
Class Inheritance
Imports
javax.swing.BorderFactory, .JLabel, .JPanel, .JScrollPane, .JTable, .SwingConstants, javax.swing.table.TableCellRenderer, java.awt.Color, .Component, .Dimension, .Font, .Graphics2D, .GraphicsEnvironment, .GridBagConstraints, .GridBagLayout, .Rectangle, .RenderingHints, java.awt.geom.AffineTransform, .GeneralPath, .Rectangle2D, java.awt.image.BufferedImage, java.util.Iterator, .Map, org.apache.pdfbox.debugger.PDFDebugger, org.apache.pdfbox.debugger.ui.HighResolutionImageIcon

Authors
Khyrul Bashar, Tilman Hausherr A class that creates the UI for font encoding pane.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final AffineTransform
private JPanel

Constructor Summary

AccessConstructor and Description
pack-priv
FontEncodingView(Object[][]
Object[][] instance as table data.
tableData
,
Map<String, String>
Map instance which contains info for showing in header panel. Here keys will be info type.
headerAttributes
,
String[]
String array containing the columns name.
columnNames
,
double[]
min low and max high bound of all glyphs.
yBounds
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
private void
createView(JPanel headerPanel, JTable table)

private JPanel
pack-priv JPanel
private JTable
getTable(Object[][] tableData, String[] columnNames, double[] yBounds)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_TRANSFORMback to summary
private static final AffineTransform DEFAULT_TRANSFORM
panelback to summary
private JPanel panel

Constructor Detail

FontEncodingViewback to summary
pack-priv FontEncodingView(Object[][] tableData, Map<String, String> headerAttributes, String[] columnNames, double[] yBounds)

Constructor.

Parameters
tableData:Object[][]

Object[][] instance as table data.

headerAttributes:Map<String, String>

Map instance which contains info for showing in header panel. Here keys will be info type.

columnNames:String[]

String array containing the columns name.

yBounds:double[]

min low and max high bound of all glyphs.

Method Detail

createViewback to summary
private void createView(JPanel headerPanel, JTable table)
getHeaderPanelback to summary
private JPanel getHeaderPanel(Map<String, String> attributes)
getPanelback to summary
pack-priv JPanel getPanel()
getTableback to summary
private JTable getTable(Object[][] tableData, String[] columnNames, double[] yBounds)
org.apache.pdfbox.debugger.fontencodingpane back to summary

private final Class FontEncodingView.GlyphCellRenderer

extends Object
implements TableCellRenderer
Class Inheritance
  • java.lang.Object
  • org.apache.pdfbox.debugger.fontencodingpane.FontEncodingView.GlyphCellRenderer
All Implemented Interfaces
javax.swing.table.TableCellRenderer

Field Summary

Modifier and TypeField and Description
private final double[]

Constructor Summary

AccessConstructor and Description
private
GlyphCellRenderer(double[] yBounds)

Method Summary

Modifier and TypeMethod and Description
public Component
getTableCellRendererComponent(JTable
the JTable that is asking the renderer to draw; can be null
jTable
,
Object
the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
o
,
boolean
true if the cell is to be rendered with the selection highlighted; otherwise false
b
,
boolean
if true, render cell appropriately. For example, put a special border on the cell, if the cell can be edited, render in the color used to indicate editing
b1
,
int
the row index of the cell being drawn. When drawing the header, the value of row is -1
row
,
int
the column index of the cell being drawn
col
)

Implements javax.swing.table.TableCellRenderer.getTableCellRendererComponent.

Returns the component used for drawing the cell.

private BufferedImage
renderGlyph(GeneralPath path, Rectangle2D bounds2D, Rectangle cellRect)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

yBoundsback to summary
private final double[] yBounds

Constructor Detail

GlyphCellRendererback to summary
private GlyphCellRenderer(double[] yBounds)

Method Detail

getTableCellRendererComponentback to summary
public Component getTableCellRendererComponent(JTable jTable, Object o, boolean b, boolean b1, int row, int col)

Implements javax.swing.table.TableCellRenderer.getTableCellRendererComponent.

Doc from javax.swing.table.TableCellRenderer.getTableCellRendererComponent.

Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing.

The TableCellRenderer is also responsible for rendering the the cell representing the table's current DnD drop location if it has one. If this renderer cares about rendering the DnD drop location, it should query the table directly to see if the given row and column represent the drop location:

    JTable.DropLocation dropLocation = table.getDropLocation();
    if (dropLocation != null
            && !dropLocation.isInsertRow()
            && !dropLocation.isInsertColumn()
            && dropLocation.getRow() == row
            && dropLocation.getColumn() == column) {

        // this cell represents the current drop location
        // so render it specially, perhaps with a different color
    }

During a printing operation, this method will be called with isSelected and hasFocus values of false to prevent selection and focus from appearing in the printed output. To do other customization based on whether or not the table is being printed, check the return value from javax.swing.JComponent#isPaintingForPrint().

Parameters
jTable:JTable

the JTable that is asking the renderer to draw; can be null

o:Object

the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value

b:boolean

true if the cell is to be rendered with the selection highlighted; otherwise false

b1:boolean

if true, render cell appropriately. For example, put a special border on the cell, if the cell can be edited, render in the color used to indicate editing

row:int

the row index of the cell being drawn. When drawing the header, the value of row is -1

col:int

the column index of the cell being drawn

Returns:Component

the component used for drawing the cell.

Annotations
@Override
renderGlyphback to summary
private BufferedImage renderGlyph(GeneralPath path, Rectangle2D bounds2D, Rectangle cellRect)