Skip to content

Commit

Permalink
The transform handling has been improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
eselmeister committed Apr 19, 2018
1 parent 2244de6 commit 81458f5
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -50,13 +50,28 @@ public void setLabels(Map<Integer, String> labels, int indexSeries, int orientat
this.labels = (labels != null) ? labels : new HashMap<Integer, String>();
this.indexSeries = indexSeries;
if(orientation == SWT.VERTICAL) {
disposeTransform();
transform = new Transform(Display.getDefault());
transform.rotate(-90);
} else {
transform = null;
}
}

@Override
protected void finalize() throws Throwable {

super.finalize();
disposeTransform();
}

private void disposeTransform() {

if(transform != null) {
transform.dispose();
}
}

public void clear() {

labels.clear();
Expand Down

0 comments on commit 81458f5

Please sign in to comment.