Java Code Examples for org.eclipse.gef.EditPart#refresh()

The following examples show how to use org.eclipse.gef.EditPart#refresh() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomCatchLinkEvent2EditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void handleNotificationEvent(Notification notification) {
	super.handleNotificationEvent(notification);
	Object feature = notification.getFeature();
	//if name changed
	if(notification.getEventType() == Notification.SET
			&& feature.equals(ProcessPackage.Literals.ELEMENT__NAME)){
		final IGraphicalEditPart topGraphicEditPart = (IGraphicalEditPart) getRoot().getChildren().get(0);
		for(ThrowLinkEvent tle : ((CatchLinkEvent)resolveSemanticElement()).getFrom()){
			/*Get the corresponding ThrowLinkEditpart*/
			final EditPart findEditPart = topGraphicEditPart.findEditPart(topGraphicEditPart, tle);
			if(findEditPart != null){
				/*refresh the label edit part*/
				for(EditPart childPart : (List<EditPart>)findEditPart.getChildren()){
					childPart.refresh();
				}
			}
		}
	}
}
 
Example 2
Source File: MultipleEditPart.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
protected void contentChange( Map info )
{
	Object action = info.get(GraphicsViewModelEventProcessor.CONTENT_EVENTTYPE );
	if (action instanceof Integer)
	{
		int intValue = ((Integer)action).intValue( );
		if (intValue == ViewsContentEvent.ADD
				|| intValue == ViewsContentEvent.SHIFT
				|| intValue == ViewsContentEvent.REMOVE)
		{
			markDirty( true );
			removeGuideFeedBack( );
			if (getMultipleAdapter( ).getViews( ).size( ) ==0)
			{
				markDirty( true );
				EditPart part = getParent( );
				((ReportElementEditPart)getParent( )).removeChild( this );
				part.refresh( );
				
				return;
			}
		}
	}
	super.contentChange( info );
}
 
Example 3
Source File: TriggerSetOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 4
Source File: ERDiagramOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 5
Source File: CompartmentRepositionEObjectCommand.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
public CommandResult doExecuteWithResult(
		IProgressMonitor progressMonitor, IAdaptable info)
		throws ExecutionException {
	CommandResult rs = super.doExecuteWithResult(progressMonitor, info);

	EditPart compartment = childToMove.getParent(); 
	
	ViewUtil.repositionChildAt((View)compartment.getModel(), (View)childToMove.getModel(), newIndex);
	compartment.refresh();		
	
	return rs;
}
 
Example 6
Source File: CrosstabTableEditPart.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void refreshChildren( )
	{
		super.refreshChildren( );
		List list = getChildren( );
		int size = list.size( );
		for ( int i = 0; i < size; i++ )
		{
			( (ReportElementEditPart) list.get( i ) ).refreshChildren( );
		}
		if (!adapter.layoutCheck( ))
		{
			EditPart part = getParent( );
			removeGuideFeedBack( );
			((ReportElementEditPart)part).removeChild( this );
			part.refresh( );
//			getViewer( ).getControl( ).getDisplay( ).asyncExec( new Runnable()
//			{
//				public void run( )
//				{
//					
//					
//					//((GraphicalEditPart)part).getFigure( ).repaint( );
//				}
//				
//			});
		}
	}
 
Example 7
Source File: IndexSetOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 8
Source File: DictionaryOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 9
Source File: TableOutlineEditPart.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshOutlineVisuals() {
    refreshName();

    for (final Object child : getChildren()) {
        final EditPart part = (EditPart) child;
        part.refresh();
    }
}
 
Example 10
Source File: TablespaceSetOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 11
Source File: ViewOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
	this.refreshName();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 12
Source File: GroupSetOutlineEditPart.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshChildren() {
    super.refreshChildren();
    for (final Object child : getChildren()) {
        final EditPart part = (EditPart) child;
        part.refresh();
    }
}
 
Example 13
Source File: ERDiagramOutlineEditPart.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshOutlineVisuals() {
    for (final Object child : getChildren()) {
        final EditPart part = (EditPart) child;
        part.refresh();
    }
}
 
Example 14
Source File: ViewOutlineEditPart.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshOutlineVisuals() {
    refreshName();

    for (final Object child : getChildren()) {
        final EditPart part = (EditPart) child;
        part.refresh();
    }
}
 
Example 15
Source File: ViewSetOutlineEditPart.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshChildren() {
    super.refreshChildren();

    for (final Object child : getChildren()) {
        final EditPart part = (EditPart) child;
        part.refresh();
    }
}
 
Example 16
Source File: ERModelOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
@Override
protected void refreshOutlineVisuals() {
	this.refreshName();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 17
Source File: TableOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
	this.refreshName();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 18
Source File: TableSetOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	tableEditParts = new ArrayList<EditPart>();
	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		tableEditParts.add(part);
		part.refresh();
	}
}
 
Example 19
Source File: SequenceSetOutlineEditPart.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void refreshChildren() {
	super.refreshChildren();

	for (Object child : this.getChildren()) {
		EditPart part = (EditPart) child;
		part.refresh();
	}
}
 
Example 20
Source File: DestroyEditPart.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
private void reload()
{
	EditPart part = getParent( );
	((ReportElementEditPart)part).removeChild( this );
	part.refresh( );
}