|
Lines 46-51
Link Here
|
| 46 |
import org.eclipse.swt.widgets.Display; |
46 |
import org.eclipse.swt.widgets.Display; |
| 47 |
import org.eclipse.swt.widgets.Event; |
47 |
import org.eclipse.swt.widgets.Event; |
| 48 |
import org.eclipse.swt.widgets.Item; |
48 |
import org.eclipse.swt.widgets.Item; |
|
|
49 |
import org.eclipse.swt.widgets.ScrollBar; |
| 49 |
import org.eclipse.zest.core.widgets.internal.ContainerFigure; |
50 |
import org.eclipse.zest.core.widgets.internal.ContainerFigure; |
| 50 |
import org.eclipse.zest.core.widgets.internal.RevealListener; |
51 |
import org.eclipse.zest.core.widgets.internal.RevealListener; |
| 51 |
import org.eclipse.zest.core.widgets.internal.ZestRootLayer; |
52 |
import org.eclipse.zest.core.widgets.internal.ZestRootLayer; |
|
Lines 123-128
Link Here
|
| 123 |
this.style = style; |
124 |
this.style = style; |
| 124 |
this.setBackground(ColorConstants.white); |
125 |
this.setBackground(ColorConstants.white); |
| 125 |
|
126 |
|
|
|
127 |
createScrollBars(style); |
| 128 |
|
| 126 |
LIGHT_BLUE = new Color(Display.getDefault(), 216, 228, 248); |
129 |
LIGHT_BLUE = new Color(Display.getDefault(), 216, 228, 248); |
| 127 |
LIGHT_BLUE_CYAN = new Color(Display.getDefault(), 213, 243, 255); |
130 |
LIGHT_BLUE_CYAN = new Color(Display.getDefault(), 213, 243, 255); |
| 128 |
GREY_BLUE = new Color(Display.getDefault(), 139, 150, 171); |
131 |
GREY_BLUE = new Color(Display.getDefault(), 139, 150, 171); |
|
Lines 366-371
Link Here
|
| 366 |
* Dispose of the nodes and edges when the graph is disposed. |
369 |
* Dispose of the nodes and edges when the graph is disposed. |
| 367 |
*/ |
370 |
*/ |
| 368 |
public void dispose() { |
371 |
public void dispose() { |
|
|
372 |
if (horizontalBar != null) { |
| 373 |
horizontalBar.dispose(); |
| 374 |
} |
| 375 |
if (verticalBar != null) { |
| 376 |
verticalBar.dispose(); |
| 377 |
} |
| 378 |
|
| 369 |
while (nodes.size() > 0) { |
379 |
while (nodes.size() > 0) { |
| 370 |
GraphNode node = (GraphNode) nodes.get(0); |
380 |
GraphNode node = (GraphNode) nodes.get(0); |
| 371 |
if (node != null && !node.isDisposed()) { |
381 |
if (node != null && !node.isDisposed()) { |
|
Lines 1239-1242
Link Here
|
| 1239 |
return (GraphItem) figure2ItemMap.get(figure); |
1249 |
return (GraphItem) figure2ItemMap.get(figure); |
| 1240 |
} |
1250 |
} |
| 1241 |
|
1251 |
|
|
|
1252 |
public ScrollBar getHorizontalBar() { |
| 1253 |
checkWidget(); |
| 1254 |
return horizontalBar; |
| 1255 |
} |
| 1256 |
|
| 1257 |
public ScrollBar getVerticalBar() { |
| 1258 |
checkWidget(); |
| 1259 |
return verticalBar; |
| 1260 |
} |
| 1261 |
|
| 1262 |
private ScrollBar horizontalBar; |
| 1263 |
private ScrollBar verticalBar; |
| 1264 |
|
| 1265 |
private void createScrollBars(final int style) { |
| 1266 |
//if ((style & SWT.H_SCROLL) != 0) { |
| 1267 |
horizontalBar = new ScrollBar(this, SWT.H_SCROLL); |
| 1268 |
horizontalBar.setVisible(false); |
| 1269 |
//} |
| 1270 |
//if ((style & SWT.V_SCROLL) != 0) { |
| 1271 |
verticalBar = new ScrollBar(this, SWT.V_SCROLL); |
| 1272 |
verticalBar.setVisible(false); |
| 1273 |
//} |
| 1274 |
} |
| 1242 |
} |
1275 |
} |