Model access in Swing Component Action Follow
Hello forum!
I'm using a swing component (JCheckBox) in the editor aspect. If the user clicks on the checkbox I would like to change a property from my concept. Unfortunately the ModelAccess is deprecated. What can I use instead?
final JCheckBox cb=new JCheckBox("CheckBox");
ActionListener actionListener = newActionListener(){
@Override
public void actionPerformed(ActionEvent p0){
ModelAccess.instance().runWriteInEDT(new Runnable(){
@Override
public void run(){
node.property=cb.isSelected();
}});
}};
cb.addActionListener(actionListener);
Please sign in to leave a comment.
Use editorContext.getRepository().getModelAccess().
Sergej.. Thank you very much.