com::cosylab::logging::client::DetailedLogTable::MultilineRenderer Class Reference

Inheritance diagram for com::cosylab::logging::client::DetailedLogTable::MultilineRenderer:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::logging::client::DetailedLogTable::MultilineRenderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MultilineRenderer ()
Component getTableCellRendererComponent (JTable table, Object obj, boolean isSelected, boolean hasFocus, int row, int column)

Private Member Functions

int formatText (String str)

Constructor & Destructor Documentation

com::cosylab::logging::client::DetailedLogTable::MultilineRenderer::MultilineRenderer (  )  [inline]

Member Function Documentation

int com::cosylab::logging::client::DetailedLogTable::MultilineRenderer::formatText ( String  str  )  [inline, private]

Calculate the number of lines to display the string in the renderer.

Setting the preferred size worked with jdk 1.3 but now does not and I did not find anything on the net so I have to find a solution by myself.

The calculation is not 100% perfect but seems to work pretty well. In future we should think of changing this strategy with something better..

Parameters:
str The string to display into the renderer
Returns:
The number of lines (probably) needed to display the string into the text area.

Referenced by getTableCellRendererComponent().

Component com::cosylab::logging::client::DetailedLogTable::MultilineRenderer::getTableCellRendererComponent ( JTable  table,
Object  obj,
boolean  isSelected,
boolean  hasFocus,
int  row,
int  column 
) [inline]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2