Created
February 22, 2009 13:49
-
-
Save shin1ogawa/68474 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* TODO for shin1ogawa | |
* | |
* @param diagramIndex ダイアグラムエディタのインデックス(エディタ内のタブインデックス) | |
* @param nodeAdapter ノードに対応する{@link NodeAdapter} | |
* @param nodeProfile 追加する{@link NodeProfile} | |
*/ | |
public void addNodeProfile(int diagramIndex, final NodeAdapter nodeAdapter, final NodeProfile nodeProfile) { | |
DiagramPresentations diagramPresentations = getRootModel().getAdapter(DiagramPresentations.class); | |
final DiagramPresentationModel diagramPresentationModel = diagramPresentations.get(diagramIndex); | |
Command redoCommand = new AddProfileToDiaglamCommand(getRootModel(), nodeAdapter, nodeProfile); | |
Command undoCommand = redoCommand.execute(new CommandProcessor() { | |
public void process(Command command) { | |
diagramPresentationModel.getFigureProfiles().put(nodeAdapter, nodeProfile); | |
} | |
}); | |
redoStack.push(redoCommand); | |
undoStack.push(undoCommand); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment