Issue #2483 - Fixed image memory leak.
Former-commit-id:1a52e2b388
[formerly73caae724c
] [formerlya2f75e547d
] [formerly1a52e2b388
[formerly73caae724c
] [formerlya2f75e547d
] [formerly3d6547d644
[formerlya2f75e547d
[formerly b590a1d5799a94068fe9e444e40bb3819d596071]]]] Former-commit-id:3d6547d644
Former-commit-id:0d399cc52a
[formerly25c7bd679f
] [formerly 3d39b70d995dcfb7c2529bb9b72c3ce4df1b010c [formerly74603afd97
]] Former-commit-id: f5083a1cd8fdfc81b02738eb21c687f754459c86 [formerly8f1956da81
] Former-commit-id:ce35925120
This commit is contained in:
parent
a30f43298f
commit
2bf50b46b9
1 changed files with 28 additions and 17 deletions
|
@ -82,8 +82,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.Bundle;
|
import org.osgi.framework.Bundle;
|
||||||
|
|
||||||
import com.google.common.eventbus.Subscribe;
|
import com.google.common.eventbus.Subscribe;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
|
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterChangeEvent;
|
import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterChangeEvent;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.event.UserNicknameChangedEvent;
|
import com.raytheon.uf.viz.collaboration.comm.provider.event.UserNicknameChangedEvent;
|
||||||
|
@ -132,6 +130,7 @@ import com.raytheon.viz.ui.views.CaveFloatingView;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 1, 2012 rferrel Initial creation
|
* Mar 1, 2012 rferrel Initial creation
|
||||||
|
* Oct 22, 2013 #2483 lvenable Fixed image memory leak.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -142,13 +141,8 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
LocalGroupListener, IUserSelector {
|
LocalGroupListener, IUserSelector {
|
||||||
public static final String ID = "com.raytheon.uf.viz.collaboration.ui.CollaborationGroupView";
|
public static final String ID = "com.raytheon.uf.viz.collaboration.ui.CollaborationGroupView";
|
||||||
|
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
|
||||||
.getHandler(CollaborationGroupView.class);
|
|
||||||
|
|
||||||
private TreeViewer usersTreeViewer;
|
private TreeViewer usersTreeViewer;
|
||||||
|
|
||||||
// private List<CustomRosterGroup> groups;
|
|
||||||
|
|
||||||
private UsersTreeFilter usersTreeFilter;
|
private UsersTreeFilter usersTreeFilter;
|
||||||
|
|
||||||
private CollaborationGroupContainer topLevel;
|
private CollaborationGroupContainer topLevel;
|
||||||
|
@ -159,14 +153,18 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
|
|
||||||
private DisplayFeedAction displayFeedAction;
|
private DisplayFeedAction displayFeedAction;
|
||||||
|
|
||||||
// private Action pgenAction;
|
|
||||||
|
|
||||||
private Action collapseAllAction;
|
private Action collapseAllAction;
|
||||||
|
|
||||||
private TreeEditor treeEditor;
|
private TreeEditor treeEditor;
|
||||||
|
|
||||||
private Composite parent;
|
private Composite parent;
|
||||||
|
|
||||||
|
private Image inactiveImage = null;
|
||||||
|
|
||||||
|
private Image activeImage = null;
|
||||||
|
|
||||||
|
private Image pressedImage = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
|
@ -175,6 +173,9 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
super.createPartControl(parent);
|
super.createPartControl(parent);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.parent.setLayout(new GridLayout());
|
this.parent.setLayout(new GridLayout());
|
||||||
|
|
||||||
|
createImages();
|
||||||
|
|
||||||
// build the necessary actions for the view
|
// build the necessary actions for the view
|
||||||
createActions();
|
createActions();
|
||||||
|
|
||||||
|
@ -186,6 +187,20 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
openConnection();
|
openConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create images.
|
||||||
|
*/
|
||||||
|
private void createImages() {
|
||||||
|
inactiveImage = AbstractUIPlugin.imageDescriptorFromPlugin(
|
||||||
|
PlatformUI.PLUGIN_ID, "$nl$/icons/full/dtool16/clear_co.gif")
|
||||||
|
.createImage();
|
||||||
|
activeImage = AbstractUIPlugin.imageDescriptorFromPlugin(
|
||||||
|
PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.gif")
|
||||||
|
.createImage();
|
||||||
|
pressedImage = new Image(Display.getCurrent(), activeImage,
|
||||||
|
SWT.IMAGE_GRAY);
|
||||||
|
}
|
||||||
|
|
||||||
private void openConnection() {
|
private void openConnection() {
|
||||||
CollaborationConnection connection = CollaborationConnection
|
CollaborationConnection connection = CollaborationConnection
|
||||||
.getConnection();
|
.getConnection();
|
||||||
|
@ -221,6 +236,10 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
connection.getContactsManager().removeLocalGroupListener(this);
|
connection.getContactsManager().removeLocalGroupListener(this);
|
||||||
}
|
}
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
||||||
|
inactiveImage.dispose();
|
||||||
|
activeImage.dispose();
|
||||||
|
pressedImage.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -554,14 +573,6 @@ public class CollaborationGroupView extends CaveFloatingView implements
|
||||||
|
|
||||||
// only create the button if the text widget doesn't support one
|
// only create the button if the text widget doesn't support one
|
||||||
// natively
|
// natively
|
||||||
final Image inactiveImage = AbstractUIPlugin.imageDescriptorFromPlugin(
|
|
||||||
PlatformUI.PLUGIN_ID, "$nl$/icons/full/dtool16/clear_co.gif")
|
|
||||||
.createImage();
|
|
||||||
final Image activeImage = AbstractUIPlugin.imageDescriptorFromPlugin(
|
|
||||||
PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.gif")
|
|
||||||
.createImage();
|
|
||||||
final Image pressedImage = new Image(Display.getCurrent(), activeImage,
|
|
||||||
SWT.IMAGE_GRAY);
|
|
||||||
final Label clearButton = new Label(comp, SWT.NONE);
|
final Label clearButton = new Label(comp, SWT.NONE);
|
||||||
clearButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER,
|
clearButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER,
|
||||||
false, false));
|
false, false));
|
||||||
|
|
Loading…
Add table
Reference in a new issue