ConnectorDirection.WEST, ColorConstants.black); figure.add(this.label); layout.setConstraint(this.label, new GridData(SWT.RIGHT, SWT.CENTER, false, false)); layout.setConstraint(this.inherit, new GridData(SWT.RIGHT, SWT.CENTER, false, false)); this.inherit.addChangeListener(new ChangeListener() { context.setLayoutConstraint(figure, new GridData(SWT.RIGHT, SWT.CENTER, false, false));
private Object convert ( final GridChild child ) { final GridData gd = new GridData (); gd.horizontalAlignment = convert ( child.getHorizontalAlignment () ); gd.verticalAlignment = convert ( child.getVerticalAlignment () ); gd.grabExcessHorizontalSpace = child.isGrabHorizontalSpace (); gd.grabExcessVerticalSpace = child.isGrabVerticalSpace (); gd.horizontalSpan = child.getSpanCols (); gd.verticalSpan = child.getSpanRows (); if ( child.getWidthHint () != null ) { gd.widthHint = child.getWidthHint (); } if ( child.getHeightHint () != null ) { gd.heightHint = child.getHeightHint (); } return gd; }
private Object convert ( final GridChild child ) { final GridData gd = new GridData (); gd.horizontalAlignment = convert ( child.getHorizontalAlignment () ); gd.verticalAlignment = convert ( child.getVerticalAlignment () ); gd.grabExcessHorizontalSpace = child.isGrabHorizontalSpace (); gd.grabExcessVerticalSpace = child.isGrabVerticalSpace (); gd.horizontalSpan = child.getSpanCols (); gd.verticalSpan = child.getSpanRows (); if ( child.getWidthHint () != null ) { gd.widthHint = child.getWidthHint (); } if ( child.getHeightHint () != null ) { gd.heightHint = child.getHeightHint (); } return gd; }
ConnectorDirection.NORTH, StandardOfficeFloorColours .LINK_LINE()); figureLayout.setConstraint(managedObject, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(managedObject);
ConnectorDirection.WEST, StandardOfficeFloorColours.BLACK()); dependency.setBorder(new MarginBorder(10, 0, 0, 0)); objectAndMoLayout.setConstraint(dependency, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); objectAndMo.add(dependency); figureLayout.setConstraint(mos, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(mos);
ConnectorDirection.WEST, StandardOfficeFloorColours.BLACK()); dependency.setBorder(new MarginBorder(10, 0, 0, 0)); objectAndMoLayout.setConstraint(dependency, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); objectAndMo.add(dependency); figureLayout.setConstraint(mos, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(mos);
ConnectorDirection.WEST, StandardOfficeFloorColours.BLACK()); dependency.setBorder(new MarginBorder(10, 0, 0, 0)); objectAndMoLayout.setConstraint(dependency, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); objectAndMo.add(dependency); figureLayout.setConstraint(mos, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(mos);
ConnectorDirection.NORTH, StandardOfficeFloorColours .LINK_LINE()); figureLayout.setConstraint(managedObject, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(managedObject);
ConnectorDirection.WEST, StandardOfficeFloorColours.BLACK()); dependency.setBorder(new MarginBorder(10, 0, 0, 0)); objectAndMoLayout.setConstraint(dependency, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); objectAndMo.add(dependency); figureLayout.setConstraint(mos, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(mos);
ConnectorDirection.WEST, StandardOfficeFloorColours.BLACK()); dependency.setBorder(new MarginBorder(5, 0, 0, 0)); objectContainerMosLayout.setConstraint(dependency, new GridData( SWT.BEGINNING, SWT.BEGINNING, false, false)); objectContainerMos.add(dependency); StandardOfficeFloorColours.BLACK()); mos.setBorder(new MarginBorder(5, 0, 0, 0)); objectContainerMosLayout.setConstraint(mos, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); objectContainerMos.add(mos); figureLayout.setConstraint(boundMos, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(boundMos);
ConnectorDirection.NORTH, StandardOfficeFloorColours .LINK_LINE()); figureLayout.setConstraint(managedObject, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(managedObject);
/** * Initiate. * * @param context * {@link DeployedOfficeFigureContext}. */ public StandardDeployedOfficeFigure(DeployedOfficeFigureContext context) { // Create the figure Figure figure = new Figure(); NoSpacingGridLayout figureLayout = new NoSpacingGridLayout(2); figure.setLayoutManager(figureLayout); // Create the office RoundedContainerFigure office = new RoundedContainerFigure(context .getDeployedOfficeName(), StandardOfficeFloorColours.OFFICE(), 20, false); this.deployedOfficeName = office.getContainerName(); figure.add(office); // Create the managing object connection ConnectorFigure managingObject = new ConnectorFigure( ConnectorDirection.EAST, StandardOfficeFloorColours.BLACK()); managingObject.setBorder(new MarginBorder(10, 0, 0, 0)); this.registerConnectionAnchor( OfficeFloorManagedObjectSourceToDeployedOfficeModel.class, managingObject.getConnectionAnchor()); figure.add(managingObject); figureLayout.setConstraint(managingObject, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); // Specify figures this.setFigure(figure); this.setContentPane(office.getContentPane()); }
ConnectorDirection.NORTH, StandardOfficeFloorColours .LINK_LINE()); figureLayout.setConstraint(managedObject, new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); figure.add(managedObject); office.setBorder(new MarginBorder(10, 0, 0, 0)); officeAndMos.add(office); officeAndMosLayout.setConstraint(office, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
contentPaneWrap.add(contentPane); workFigure.add(contentPaneWrap); workLayout.setConstraint(contentPaneWrap, new GridData(SWT.FILL, SWT.BEGINNING, true, false)); this.registerConnectionAnchor(WorkToInitialTaskModel.class, initialFlowConnector.getConnectionAnchor()); layout.setConstraint(initialFlowConnector, new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
contentPaneWrap.setLayoutManager(contentPaneWrapLayout); contentPaneWrap.setBorder(new ContentBorder()); containerLayout.setConstraint(contentPaneWrap, new GridData(SWT.FILL, 0, true, false)); container.add(contentPaneWrap); this.contentPane.setBorder(new MarginBorder(2, contentPaneLeftInset, 2, 2)); contentPaneWrapLayout.setConstraint(this.contentPane, new GridData( SWT.FILL, 0, true, false)); contentPaneWrap.add(this.contentPane);
DeskManagedObjectSourceFlowToTaskModel.class, inputAnchor); figure.add(inputConnector); layout.setConstraint(inputConnector, new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false)); this.registerConnectionAnchor(TaskToNextExternalFlowModel.class, nextFlowAnchor); layout.setConstraint(nextFlow, new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false)); figure.add(nextFlow);
contentPaneWrap.add(this.contentPane); container.add(contentPaneWrap); containerLayout.setConstraint(contentPaneWrap, new GridData(SWT.FILL, 0, true, false));