Commit 0f943824 authored by Kisslinger's avatar Kisslinger
Browse files

automatic resizing of input/output ref lists done

refs 894
parent 3ba3f052
......@@ -48,6 +48,7 @@ import org.eclipse.emf.databinding.EMFObservables;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
......@@ -87,7 +88,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
* @author rosenberger
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 8963FEBF59A5D7EDA54E2E9C5059A752
* @ConQAT.Rating YELLOW Hash: 33F3F1A24A7ECB8F23C03F8B288A3302
*/
public class UseCaseEditor extends RequirementEditor<UseCase> {
......@@ -453,19 +454,26 @@ public class UseCaseEditor extends RequirementEditor<UseCase> {
Button changeInputsButton = toolkit.createButton(detailComposite, "", SWT.NONE);
changeInputsButton.setImage(imageDescriptorFromPlugin(PLUGIN_ID, "/icons/inputPort.gif")
.createImage());
changeInputsButton.addSelectionListener(new SelectionAdapter() {
/** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
new ConnectUseCaseInputsToInputPortAction(editedObject, detailComposite.getShell())
.run();
// for automatic resizing
detailComposite.getParent().layout();
detailComposite.getParent().getParent().layout();
}
});
// line 2
toolkit.createLabel(detailComposite, "");
TableViewer inputsRefTable = createSpecificationTable(detailComposite, INPUT_SPECIFICATION);
multiLineInputFactory.hint(SWT.DEFAULT, 60).applyTo(inputsRefTable.getControl());
final TableViewer inputsRefTable =
createSpecificationTable(detailComposite, INPUT_SPECIFICATION);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).grab(true, true)
.applyTo(inputsRefTable.getControl());
inputsRefTable.addDoubleClickListener(new IDoubleClickListener() {
/** {@inheritDoc} */
......@@ -504,21 +512,26 @@ public class UseCaseEditor extends RequirementEditor<UseCase> {
Button changeOutputsButton = toolkit.createButton(detailComposite, "", SWT.NONE);
changeOutputsButton.setImage(imageDescriptorFromPlugin(PLUGIN_ID, "/icons/inputPort.gif")
.createImage());
changeOutputsButton.addSelectionListener(new SelectionAdapter() {
/** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
new ConnectUseCaseOutputsToOutputPortAction(editedObject, detailComposite
.getShell()).run();
// for automatic resizing
detailComposite.getParent().layout();
detailComposite.getParent().getParent().layout();
}
});
// line 2
toolkit.createLabel(detailComposite, "");
TableViewer outputsRefTable =
final TableViewer outputsRefTable =
createSpecificationTable(detailComposite, OUTPUT_SPECIFICATION);
multiLineInputFactory.hint(SWT.DEFAULT, 60).applyTo(outputsRefTable.getControl());
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).grab(true, true)
.applyTo(outputsRefTable.getControl());
outputsRefTable.addDoubleClickListener(new IDoubleClickListener() {
/** {@inheritDoc} */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment