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;
109 ((
XYLineGraph)graph_).setBorderColor(normalColor_);
111 legend_.
setFont(GRAPH_LEGEND_FONT);
117 graph_.addMouseListener(
this);
118 legend_.addMouseListener(
this);
void mouseUp(MouseEvent e)
void setBorderColor(Color color)
static final int GRAPH_LEFT_MARGIN
static final int GRAPH_RIGHT_MARGIN
void setFocuse(GraphElement ge)
static Activator getDefault()
void setBackColor(Color color)
static final Font GRAPH_LEGEND_FONT
void setGraph(XYLineGraph graph, LegendPanel legend)
GraphElement(GraphPanel gp, Composite parent, TrendGraph tg)
static final int GRAPH_TOP_MARGIN
TrendGraph getTrendGraph()
Font getFont(String fontName)
void mouseDoubleClick(MouseEvent e)
void setBorderColor(Color color)
void mouseDown(MouseEvent e)
static final Color normalColor_
static final int GRAPH_BOTTOM_MARGIN
DroppableXYGraph getGraph()