use of org.apache.cayenne.modeler.event.DataMapDisplayListener in project cayenne by apache.
the class DataMapView method initController.
private void initController() {
eventController.addDataMapDisplayListener(new DataMapDisplayListener() {
public void currentDataMapChanged(DataMapDisplayEvent e) {
DataMap map = e.getDataMap();
if (map != null) {
initFromModel(map);
}
}
});
nodeSelector.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setDataNode();
}
});
quoteSQLIdentifiers.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
setQuoteSQLIdentifiers(quoteSQLIdentifiers.isSelected());
}
});
defaultLockType.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
setDefaultLockType(defaultLockType.isSelected() ? ObjEntity.LOCK_TYPE_OPTIMISTIC : ObjEntity.LOCK_TYPE_NONE);
}
});
clientSupport.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
setClientSupport(clientSupport.isSelected());
}
});
updateDefaultClientPackage.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultClientPackage();
}
});
updateDefaultClientSuperclass.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultClientSuperclass();
}
});
updateDefaultCatalog.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultCatalog();
}
});
updateDefaultSchema.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultSchema();
}
});
updateDefaultPackage.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultPackage();
}
});
updateDefaultSuperclass.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultSuperclass();
}
});
updateDefaultLockType.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDefaultLockType();
}
});
}
Aggregations