|
Lines 74-80
Link Here
|
| 74 |
return intermediate; |
74 |
return intermediate; |
| 75 |
} |
75 |
} |
| 76 |
|
76 |
|
| 77 |
void createToolbar(final MUIElement element, Composite intermediate) { |
77 |
ToolBar createToolbar(final MUIElement element, Composite intermediate) { |
| 78 |
int orientation = getOrientation(element); |
78 |
int orientation = getOrientation(element); |
| 79 |
RowLayout layout = RowLayoutFactory.fillDefaults().wrap(false) |
79 |
RowLayout layout = RowLayoutFactory.fillDefaults().wrap(false) |
| 80 |
.spacing(0).type(orientation).create(); |
80 |
.spacing(0).type(orientation).create(); |
|
Lines 86-92
Link Here
|
| 86 |
ToolBar separatorToolBar = new ToolBar(intermediate, orientation |
86 |
ToolBar separatorToolBar = new ToolBar(intermediate, orientation |
| 87 |
| SWT.WRAP | SWT.FLAT | SWT.RIGHT); |
87 |
| SWT.WRAP | SWT.FLAT | SWT.RIGHT); |
| 88 |
new ToolItem(separatorToolBar, SWT.SEPARATOR); |
88 |
new ToolItem(separatorToolBar, SWT.SEPARATOR); |
| 89 |
new ToolBar(intermediate, orientation | SWT.WRAP | SWT.FLAT | SWT.RIGHT); |
89 |
return new ToolBar(intermediate, orientation | SWT.WRAP | SWT.FLAT |
|
|
90 |
| SWT.RIGHT); |
| 90 |
} |
91 |
} |
| 91 |
|
92 |
|
| 92 |
int getOrientation(final MUIElement element) { |
93 |
int getOrientation(final MUIElement element) { |
|
Lines 108-114
Link Here
|
| 108 |
} |
109 |
} |
| 109 |
ToolBar toolbar = findToolbar(intermediate); |
110 |
ToolBar toolbar = findToolbar(intermediate); |
| 110 |
if (toolbar == null) { |
111 |
if (toolbar == null) { |
| 111 |
createToolbar(childElement.getParent(), intermediate); |
112 |
toolbar = createToolbar(childElement.getParent(), intermediate); |
| 112 |
} |
113 |
} |
| 113 |
return toolbar; |
114 |
return toolbar; |
| 114 |
} |
115 |
} |