2013-04-16 29 views
1

我有一個EditPart我需要改變它的位置和背景顏色。 我已成功使用來改變它的位置:改變EditPar的位置和背景顏色

ChangeBoundsRequest request = new ChangeBoundsRequest(RequestConstants.REQ_MOVE); 
    request.setEditParts(editPart); 
    request.setMoveDelta(newLocation); 

    Command cmd = editPart.getCommand(request); 
    if (cmd != null && cmd.canExecute()) { 
     cmd.execute(); 
    } 

我已成功地改變由背景色:

editPart.getContentPane().setBackgroundColor(color); 

但每當我關閉並重新打開應用程序時,我做了顏色的變化變遠!

如何提交背景顏色!

回答