Revision f4fd193c
Added by Niels Hoffmann about 13 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/AbstractKeyEditor.java | ||
---|---|---|
30 | 30 |
import org.eclipse.zest.core.widgets.ZestStyles; |
31 | 31 |
import org.eclipse.zest.layouts.LayoutAlgorithm; |
32 | 32 |
import org.eclipse.zest.layouts.LayoutStyles; |
33 |
import org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm; |
|
34 |
import org.eclipse.zest.layouts.algorithms.HorizontalShift; |
|
33 | 35 |
import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm; |
34 | 36 |
|
35 | 37 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
... | ... | |
151 | 153 |
|
152 | 154 |
@Override |
153 | 155 |
public void controlResized(ControlEvent e) { |
154 |
applyLayout(); |
|
156 |
// applyLayout();
|
|
155 | 157 |
} |
156 | 158 |
|
157 | 159 |
@Override |
... | ... | |
203 | 205 |
|
204 | 206 |
public void refresh() { |
205 | 207 |
graphViewer.refresh(); |
206 |
graphViewer.applyLayout(); |
|
208 |
// graphViewer.applyLayout();
|
|
207 | 209 |
} |
208 | 210 |
|
209 | 211 |
@Override |
... | ... | |
218 | 220 |
|
219 | 221 |
private LayoutAlgorithm getLayoutAlgoritm() { |
220 | 222 |
if (layoutAlgoritm == null) { |
221 |
layoutAlgoritm = new TreeLayoutAlgorithm( |
|
222 |
LayoutStyles.NO_LAYOUT_NODE_RESIZING); |
|
223 |
layoutAlgoritm.setEntityAspectRatio(2.5); |
|
223 |
layoutAlgoritm = new CompositeLayoutAlgorithm( |
|
224 |
LayoutStyles.NO_LAYOUT_NODE_RESIZING, |
|
225 |
new LayoutAlgorithm[] { |
|
226 |
new TreeLayoutAlgorithm( |
|
227 |
LayoutStyles.NO_LAYOUT_NODE_RESIZING), |
|
228 |
new HorizontalShift( |
|
229 |
LayoutStyles.NO_LAYOUT_NODE_RESIZING) }); |
|
230 |
|
|
231 |
// layoutAlgoritm = new TreeLayoutAlgorithm( |
|
232 |
// LayoutStyles.NO_LAYOUT_NODE_RESIZING); |
|
233 |
// layoutAlgoritm.setEntityAspectRatio(2.5); |
|
224 | 234 |
} |
225 | 235 |
return layoutAlgoritm; |
226 | 236 |
} |
Also available in: Unified diff
Improving polytomous key handling