New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetNewsView bug fixed #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested this locally and looks to be working. Great job.
// Custom cell renderer to allow displaying a clipped preview of a larger String using tooltip | ||
private static class ClippedPreviewTableCellRenderer extends DefaultTableCellRenderer { | ||
private static final int MAX_PREVIEW_LENGTH = 60; | ||
|
||
@Override | ||
public Component getTableCellRendererComponent( | ||
JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { | ||
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); | ||
if (value != null) { | ||
String text = value.toString(); | ||
if (text.length() > MAX_PREVIEW_LENGTH) { | ||
String previewText = text.substring(0, MAX_PREVIEW_LENGTH) + " ..."; | ||
setToolTipText("<html><p width='300'>" + text + "</p></html>"); | ||
setText(previewText); | ||
} | ||
} | ||
return c; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this code segment for?
Also, there are now conflicts due to recent merges, please fix those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now
Extraneous addition/rendering of too many articles bug fixed. Also, rendering improved for longer string values in the tables.