Commit f47c4dea authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch 'master' of https://git.fortiss.org/af3/kernel.git into 3084

parents 1857c260 1cdf74d2
ColumnHandle.java 8fc5f04cbb0127e5df8c7a9e3b2620502bf93716 GREEN
GenericAnnotationView.java 53d2c1715edd2ec311ccd93b397657caa4ca71b3 RED
GenericAnnotationView.java 0c7f46fa1e4549e619bd9599dbb4f306ca0ca043 GREEN
HierarchicalNameViewerComparator.java 393f888a671d788c05650d17c937b76dda8a0f43 GREEN
......@@ -304,70 +304,6 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
}
}
/**
* Installs a listener to the given {@link Table} that adjust the row height to to the current
* contents.
*/
// TODO: Disable for now (see #3381).
// private void addRowHeightListener(Table table) {
//
// /*
// * NB: MeasureItem, PaintItem and EraseItem are called repeatedly and are hence
// * performance critical.
// */
// Listener rowHeightListener = new Listener() {
// @Override
// public void handleEvent(Event event) {
// switch(event.type) {
// case SWT.MeasureItem: {
// TableItem item = (TableItem)event.item;
// String text = item.getText(event.index);
// Point textSize = event.gc.textExtent(text);
// event.width = textSize.x;
// event.height = Math.max(event.height, textSize.y);
//
// Image image = item.getImage(event.index);
// if(image != null) {
// Rectangle imageSize = image.getBounds();
// event.width = max(event.width, imageSize.x);
// event.height = max(event.height, imageSize.y);
// }
// break;
// }
// case SWT.PaintItem: {
// TableItem item = (TableItem)event.item;
//
// // Determine maximum content height (considering text and image contents),
// // and derive resulting vertical offset
// String text = item.getText(event.index);
// int contentHeight = event.gc.textExtent(text).y;
//
// Image image = item.getImage(event.index);
// if(image != null) {
// contentHeight = max(contentHeight, image.getBounds().y);
// }
// int offset = max(0, (event.height - contentHeight) / 2);
//
// // Render content
// event.gc.drawText(text, event.x, event.y + offset, true);
// if(image != null) {
// event.gc.drawImage(image, event.x, event.y + offset);
// }
//
// break;
// }
// case SWT.EraseItem: {
// event.detail &= ~SWT.FOREGROUND;
// break;
// }
// }
// }
// };
// table.addListener(SWT.MeasureItem, rowHeightListener);
// table.addListener(SWT.PaintItem, rowHeightListener);
// table.addListener(SWT.EraseItem, rowHeightListener);
// }
/**
* Constructs a {@link Listener} such that a context menu is created upon a right-click on
* entries in the Annotation View.
......@@ -559,10 +495,6 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
table.setLinesVisible(true);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
// Listener to adjust row height to contents
// TODO: Disable for now (see #3381)
// addRowHeightListener(table);
// Preserve default row-height (used to restore it during contents updates in
// update(Collection<AnnotationEntry>)).
defaultRowHeight = table.getItemHeight();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment