10 package com.generalrobotix.ui.view.graph;
15 import org.eclipse.swt.SWT;
16 import org.eclipse.swt.custom.SashForm;
17 import org.eclipse.swt.events.MouseEvent;
18 import org.eclipse.swt.events.MouseListener;
19 import org.eclipse.swt.events.PaintEvent;
20 import org.eclipse.swt.events.PaintListener;
21 import org.eclipse.swt.events.SelectionListener;
22 import org.eclipse.swt.graphics.Color;
23 import org.eclipse.swt.graphics.Font;
24 import org.eclipse.swt.layout.GridData;
25 import org.eclipse.swt.layout.GridLayout;
26 import org.eclipse.swt.widgets.Composite;
37 public class GraphElement extends Composite implements MouseListener
46 SelectionListener actionListener_;
69 super(parent, SWT.NONE);
75 GridData gridData0 =
new GridData();
76 gridData0.horizontalAlignment = GridData.FILL;
77 gridData0.grabExcessHorizontalSpace =
true;
78 setLayoutData(gridData0);
80 GridLayout layout=
new GridLayout(1,
true);
81 layout.marginHeight=0;
85 graphPane_ =
new SashForm(
this, SWT.HORIZONTAL );
86 GridData gridData =
new GridData();
87 gridData.horizontalAlignment = GridData.FILL;
88 gridData.grabExcessHorizontalSpace =
true;
89 gridData.verticalAlignment = GridData.FILL;
90 gridData.grabExcessVerticalSpace =
true;
91 graphPane_.setLayoutData(gridData);
106 graphPane_.setWeights(
new int[] { 4,1});
107 graphPane_.SASH_WIDTH = 6;
117 graph_.addMouseListener(
this);
118 legend_.addMouseListener(
this);