Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2015-07-01 07:28:20 -0400
committerPablo Torregrosa Paez2015-07-01 09:02:52 -0400
commit0501f07f0ba12d7603f6de4882763382fcaf15f6 (patch)
tree21aac6b2766cd0e8aff8883d7c864a0b5bd21551 /target_explorer
parentad9d78a5dfbf27e9a18d3ae3a3e4f215225c1643 (diff)
downloadorg.eclipse.tcf-0501f07f0ba12d7603f6de4882763382fcaf15f6.tar.gz
org.eclipse.tcf-0501f07f0ba12d7603f6de4882763382fcaf15f6.tar.xz
org.eclipse.tcf-0501f07f0ba12d7603f6de4882763382fcaf15f6.zip
Target Explorer: Switch to fixedwidth font for the PID column
Change-Id: Ie252d13d191a1367567b162940e80ad2917665f3 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDLabelProvider.java33
1 files changed, 32 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDLabelProvider.java
index 59c44c3be..c07345b71 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDLabelProvider.java
@@ -14,6 +14,11 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.IFontProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.services.ISysMonitor;
import org.eclipse.tcf.te.runtime.services.ServiceUtils;
@@ -27,7 +32,25 @@ import org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.AbstractLabelProvid
/**
* The label provider for the tree column "PID".
*/
-public class PIDLabelProvider extends AbstractLabelProviderDelegate {
+public class PIDLabelProvider extends AbstractLabelProviderDelegate implements IFontProvider {
+
+ Font pidFont = null;
+
+ public PIDLabelProvider() {
+ super();
+ FontData fd = new FontData("Courier New", 10, SWT.NORMAL); //$NON-NLS-1$
+ pidFont = new Font(Display.getCurrent(), fd );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.BaseLabelProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+
+ if (pidFont != null) pidFont.dispose();
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
@@ -74,4 +97,12 @@ public class PIDLabelProvider extends AbstractLabelProviderDelegate {
return ""; //$NON-NLS-1$
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
+ */
+ @Override
+ public Font getFont(Object element) {
+ return pidFont;
+ }
}

Back to the top