Project

General

Profile

« Previous | Next » 

Revision 94681750

Added by Patrick Plitzner almost 7 years ago

ref #6694 Beautify alignment of feature tree editor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java
103 103
	/** {@inheritDoc} */
104 104
	@PostConstruct
105 105
	public void createControl(Composite parent, @Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
106
	    parent.setLayout(new GridLayout());
107
		Composite composite = new Composite(parent, SWT.NULL);
108
		composite.setLayout(new GridLayout());
109
		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
106
	    parent.setLayout(new GridLayout(2, false));
110 107

  
111
		Composite composite_treeTitle = new Composite(composite, SWT.NULL);
108
		Composite composite_treeTitle = new Composite(parent, SWT.NULL);
112 109
		composite_treeTitle.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true,
113 110
				false));
114
		composite_treeTitle.setLayout(new GridLayout(3, false));
111
		GridLayout gl_composite_treeTitle = new GridLayout(2, false);
112
		gl_composite_treeTitle.marginWidth = 0;
113
		composite_treeTitle.setLayout(gl_composite_treeTitle);
115 114

  
116 115
		label_title = new Label(composite_treeTitle, SWT.NULL);
117 116
		label_title.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
......
120 119
		text_title = new Text(composite_treeTitle, SWT.BORDER);
121 120
		text_title.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
122 121

  
123
		btnOpenFeatureTree = new Button(composite_treeTitle, SWT.NONE);
122
		btnOpenFeatureTree = new Button(parent, SWT.NONE);
123
		btnOpenFeatureTree.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
124 124
		btnOpenFeatureTree.setToolTipText("Open Tree");
125 125
		btnOpenFeatureTree.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
126 126

  
127
		Composite composite_treeContent = new Composite(composite, SWT.NULL);
128
		composite_treeContent.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
129
				true, true));
130
		composite_treeContent.setLayout(new GridLayout(2, false));
131

  
132
		viewer = new TreeViewer(composite_treeContent);
127
		viewer = new TreeViewer(parent);
133 128
		Tree tree = viewer.getTree();
134 129
		tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
135 130
		viewer.getControl().setLayoutData(
136 131
				new GridData(SWT.FILL, SWT.FILL, true, true));
137 132

  
138
		Composite composite_buttons = new Composite(composite_treeContent,
133
		Composite composite_buttons = new Composite(parent,
139 134
				SWT.NULL);
140 135
		composite_buttons.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false,
141 136
				false));
142 137
		composite_buttons.setLayout(new GridLayout());
143 138

  
144 139
		button_add = new Button(composite_buttons, SWT.PUSH);
140
		button_add.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
145 141
		button_add.setToolTipText("Add a feature to this feature tree.");
146 142
		button_add.setImage(ImageResources.getImage(ImageResources.ADD_EDIT));
147 143
		button_remove = new Button(composite_buttons, SWT.PUSH);
144
		button_remove.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
148 145
		button_remove.setToolTipText("Remove a feature from this feature tree.");
149 146
		button_remove.setImage(ImageResources.getImage(ImageResources.TRASH_ICON));
150 147

  

Also available in: Unified diff