svnno****@sourc*****
svnno****@sourc*****
2008年 9月 30日 (火) 00:52:39 JST
Revision: 1975 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=1975 Author: shin1 Date: 2008-09-30 00:52:39 +0900 (Tue, 30 Sep 2008) Log Message: ----------- [CORE-76]ChangeListener,ChangeSupport,ChangeSupportImplを自動生成。 Added Paths: ----------- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/ColumnModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/DomainModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/JiemamyModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/RootModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractConnectionModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractRelationModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ForeignKeyMappingChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/InheritanceModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/CheckConstraintModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintSetModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/NotNullConstraintModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/PrimaryKeyConstraintModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/InsertDataSetModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/RecordModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/DataTypeChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/GeneralDataTypeChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/SpecialDataTypeChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/IndexModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractEntityModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractNodeModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/StickyModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/TableModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ViewModelChangeSupportImpl.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeSupport.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeListener.java zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeSupport.java Removed Paths: ------------- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/typedef/datatype/ -------------- next part -------------- Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/ColumnModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/ColumnModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/ColumnModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.ColumnModelChangeListener; +import org.jiemamy.spec.event.model.ColumnModelChangeSupport; +import org.jiemamy.spec.model.ColumnModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ColumnModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class ColumnModelChangeSupportImpl implements ColumnModelChangeSupport { + + /** ColumnModel自身のEventを監視するListenerのリスト */ + private List<ColumnModelChangeListener> listeners = new ArrayList<ColumnModelChangeListener>(); + + /** + * ColumnModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link ColumnModel} + * @category instance creation + */ + public ColumnModelChangeSupportImpl(ColumnModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * ColumnModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ColumnModelChangeListener} + * @see #removeColumnModelChangeListener(ColumnModelChangeListener) + */ + public void addColumnModelChangeListener(ColumnModelChangeListener l) { + listeners.add(l); + } + + /** + * ColumnModel自身を監視するListenerに通知されたEventをColumnModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (ColumnModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * ColumnModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ColumnModelChangeListener} + * @see #addColumnModelChangeListener(ColumnModelChangeListener) + */ + public void removeColumnModelChangeListener(ColumnModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/ColumnModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/DomainModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/DomainModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/DomainModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.DomainModelChangeListener; +import org.jiemamy.spec.event.model.DomainModelChangeSupport; +import org.jiemamy.spec.model.DomainModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、DomainModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class DomainModelChangeSupportImpl implements DomainModelChangeSupport { + + /** DomainModel自身のEventを監視するListenerのリスト */ + private List<DomainModelChangeListener> listeners = new ArrayList<DomainModelChangeListener>(); + + /** + * DomainModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link DomainModel} + * @category instance creation + */ + public DomainModelChangeSupportImpl(DomainModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * DomainModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link DomainModelChangeListener} + * @see #removeDomainModelChangeListener(DomainModelChangeListener) + */ + public void addDomainModelChangeListener(DomainModelChangeListener l) { + listeners.add(l); + } + + /** + * DomainModel自身を監視するListenerに通知されたEventをDomainModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (DomainModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * DomainModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link DomainModelChangeListener} + * @see #addDomainModelChangeListener(DomainModelChangeListener) + */ + public void removeDomainModelChangeListener(DomainModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/DomainModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/JiemamyModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/JiemamyModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/JiemamyModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.JiemamyModelChangeListener; +import org.jiemamy.spec.event.model.JiemamyModelChangeSupport; +import org.jiemamy.spec.model.JiemamyModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、JiemamyModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class JiemamyModelChangeSupportImpl implements JiemamyModelChangeSupport { + + /** JiemamyModel自身のEventを監視するListenerのリスト */ + private List<JiemamyModelChangeListener> listeners = new ArrayList<JiemamyModelChangeListener>(); + + /** + * JiemamyModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link JiemamyModel} + * @category instance creation + */ + public JiemamyModelChangeSupportImpl(JiemamyModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * JiemamyModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link JiemamyModelChangeListener} + * @see #removeJiemamyModelChangeListener(JiemamyModelChangeListener) + */ + public void addJiemamyModelChangeListener(JiemamyModelChangeListener l) { + listeners.add(l); + } + + /** + * JiemamyModel自身を監視するListenerに通知されたEventをJiemamyModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (JiemamyModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * JiemamyModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link JiemamyModelChangeListener} + * @see #addJiemamyModelChangeListener(JiemamyModelChangeListener) + */ + public void removeJiemamyModelChangeListener(JiemamyModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/JiemamyModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/RootModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/RootModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/RootModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,224 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableList; +import org.jiemamy.spec.event.model.RootModelChangeListener; +import org.jiemamy.spec.event.model.RootModelChangeSupport; +import org.jiemamy.spec.model.DomainModel; +import org.jiemamy.spec.model.RootModel; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; +import org.jiemamy.spec.model.dataset.InsertDataSetModel; +import org.jiemamy.spec.model.node.AbstractNodeModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、RootModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class RootModelChangeSupportImpl implements RootModelChangeSupport { + + /** RootModel自身のEventを監視するListenerのリスト */ + private List<RootModelChangeListener> listeners = new ArrayList<RootModelChangeListener>(); + + /** + * connectionsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireConnectionsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel> connectionsCollectionChangeListener = + new ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + fireConnectionsCollectionChangeEvent(event); + } + }; + + /** + * domainsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireDomainsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<DomainModel>, DomainModel> domainsCollectionChangeListener = + new ObservableCollectionChangeListener<List<DomainModel>, DomainModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<List<DomainModel>, DomainModel> event) { + fireDomainsCollectionChangeEvent(event); + } + }; + + /** + * insertDataSetsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireInsertDataSetsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<InsertDataSetModel>, InsertDataSetModel> insertDataSetsCollectionChangeListener = + new ObservableCollectionChangeListener<List<InsertDataSetModel>, InsertDataSetModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<InsertDataSetModel>, InsertDataSetModel> event) { + fireInsertDataSetsCollectionChangeEvent(event); + } + }; + + /** + * nodesのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireNodesCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<AbstractNodeModel>, AbstractNodeModel> nodesCollectionChangeListener = + new ObservableCollectionChangeListener<List<AbstractNodeModel>, AbstractNodeModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<AbstractNodeModel>, AbstractNodeModel> event) { + fireNodesCollectionChangeEvent(event); + } + }; + + /** + * RootModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link RootModel} + * @category instance creation + */ + public RootModelChangeSupportImpl(RootModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableList<AbstractConnectionModel>) source.getConnections()) + .addListener(connectionsCollectionChangeListener); + ((ObservableList<DomainModel>) source.getDomains()).addListener(domainsCollectionChangeListener); + ((ObservableList<InsertDataSetModel>) source.getInsertDataSets()) + .addListener(insertDataSetsCollectionChangeListener); + ((ObservableList<AbstractNodeModel>) source.getNodes()).addListener(nodesCollectionChangeListener); + } + + /** + * RootModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link RootModelChangeListener} + * @see #removeRootModelChangeListener(RootModelChangeListener) + */ + public void addRootModelChangeListener(RootModelChangeListener l) { + listeners.add(l); + } + + /** + * connectionsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + for (RootModelChangeListener l : listeners) { + l.connectionCollectionChange(event); + } + } + + /** + * domainsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireDomainsCollectionChangeEvent(ObservableCollectionChangeEvent<List<DomainModel>, DomainModel> event) { + for (RootModelChangeListener l : listeners) { + l.domainCollectionChange(event); + } + } + + /** + * insertDataSetsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireInsertDataSetsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<InsertDataSetModel>, InsertDataSetModel> event) { + for (RootModelChangeListener l : listeners) { + l.insertDataSetCollectionChange(event); + } + } + + /** + * nodesのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireNodesCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractNodeModel>, AbstractNodeModel> event) { + for (RootModelChangeListener l : listeners) { + l.nodCollectionChange(event); + } + } + + /** + * RootModel自身を監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (RootModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * RootModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link RootModelChangeListener} + * @see #addRootModelChangeListener(RootModelChangeListener) + */ + public void removeRootModelChangeListener(RootModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/RootModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractConnectionModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractConnectionModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractConnectionModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,94 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.connection; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.connection.AbstractConnectionModelChangeListener; +import org.jiemamy.spec.event.model.connection.AbstractConnectionModelChangeSupport; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractConnectionModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class AbstractConnectionModelChangeSupportImpl implements AbstractConnectionModelChangeSupport { + + /** AbstractConnectionModel自身のEventを監視するListenerのリスト */ + private List<AbstractConnectionModelChangeListener> listeners = + new ArrayList<AbstractConnectionModelChangeListener>(); + + /** + * AbstractConnectionModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link AbstractConnectionModel} + * @category instance creation + */ + public AbstractConnectionModelChangeSupportImpl(AbstractConnectionModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * AbstractConnectionModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractConnectionModelChangeListener} + * @see #removeAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener) + */ + public void addAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener l) { + listeners.add(l); + } + + /** + * AbstractConnectionModel自身を監視するListenerに通知されたEventをAbstractConnectionModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (AbstractConnectionModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * AbstractConnectionModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractConnectionModelChangeListener} + * @see #addAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener) + */ + public void removeAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractConnectionModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractRelationModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractRelationModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractRelationModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.connection; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.connection.AbstractRelationModelChangeListener; +import org.jiemamy.spec.event.model.connection.AbstractRelationModelChangeSupport; +import org.jiemamy.spec.model.connection.AbstractRelationModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractRelationModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class AbstractRelationModelChangeSupportImpl implements AbstractRelationModelChangeSupport { + + /** AbstractRelationModel自身のEventを監視するListenerのリスト */ + private List<AbstractRelationModelChangeListener> listeners = new ArrayList<AbstractRelationModelChangeListener>(); + + /** + * AbstractRelationModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link AbstractRelationModel} + * @category instance creation + */ + public AbstractRelationModelChangeSupportImpl(AbstractRelationModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * AbstractRelationModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractRelationModelChangeListener} + * @see #removeAbstractRelationModelChangeListener(AbstractRelationModelChangeListener) + */ + public void addAbstractRelationModelChangeListener(AbstractRelationModelChangeListener l) { + listeners.add(l); + } + + /** + * AbstractRelationModel自身を監視するListenerに通知されたEventをAbstractRelationModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (AbstractRelationModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * AbstractRelationModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractRelationModelChangeListener} + * @see #addAbstractRelationModelChangeListener(AbstractRelationModelChangeListener) + */ + public void removeAbstractRelationModelChangeListener(AbstractRelationModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/AbstractRelationModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ForeignKeyMappingChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ForeignKeyMappingChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ForeignKeyMappingChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.connection; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.connection.ForeignKeyMappingChangeListener; +import org.jiemamy.spec.event.model.connection.ForeignKeyMappingChangeSupport; +import org.jiemamy.spec.model.connection.ForeignKeyMapping; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ForeignKeyMappingからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class ForeignKeyMappingChangeSupportImpl implements ForeignKeyMappingChangeSupport { + + /** ForeignKeyMapping自身のEventを監視するListenerのリスト */ + private List<ForeignKeyMappingChangeListener> listeners = new ArrayList<ForeignKeyMappingChangeListener>(); + + /** + * ForeignKeyMappingの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link ForeignKeyMapping} + * @category instance creation + */ + public ForeignKeyMappingChangeSupportImpl(ForeignKeyMapping source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * ForeignKeyMapping自身のEventを監視するListenerを追加する。 + * + * @param l {@link ForeignKeyMappingChangeListener} + * @see #removeForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener) + */ + public void addForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener l) { + listeners.add(l); + } + + /** + * ForeignKeyMapping自身を監視するListenerに通知されたEventをForeignKeyMappingの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (ForeignKeyMappingChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * ForeignKeyMapping自身のEventを監視するListenerを削除する。 + * + * @param l {@link ForeignKeyMappingChangeListener} + * @see #addForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener) + */ + public void removeForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/ForeignKeyMappingChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/InheritanceModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/InheritanceModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/InheritanceModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.connection; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.connection.InheritanceModelChangeListener; +import org.jiemamy.spec.event.model.connection.InheritanceModelChangeSupport; +import org.jiemamy.spec.model.connection.InheritanceModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、InheritanceModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class InheritanceModelChangeSupportImpl implements InheritanceModelChangeSupport { + + /** InheritanceModel自身のEventを監視するListenerのリスト */ + private List<InheritanceModelChangeListener> listeners = new ArrayList<InheritanceModelChangeListener>(); + + /** + * InheritanceModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link InheritanceModel} + * @category instance creation + */ + public InheritanceModelChangeSupportImpl(InheritanceModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * InheritanceModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link InheritanceModelChangeListener} + * @see #removeInheritanceModelChangeListener(InheritanceModelChangeListener) + */ + public void addInheritanceModelChangeListener(InheritanceModelChangeListener l) { + listeners.add(l); + } + + /** + * InheritanceModel自身を監視するListenerに通知されたEventをInheritanceModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (InheritanceModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * InheritanceModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link InheritanceModelChangeListener} + * @see #addInheritanceModelChangeListener(InheritanceModelChangeListener) + */ + public void removeInheritanceModelChangeListener(InheritanceModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/connection/InheritanceModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/CheckConstraintModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/CheckConstraintModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/CheckConstraintModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.constraint; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.constraint.CheckConstraintModelChangeListener; +import org.jiemamy.spec.event.model.constraint.CheckConstraintModelChangeSupport; +import org.jiemamy.spec.model.constraint.CheckConstraintModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、CheckConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class CheckConstraintModelChangeSupportImpl implements CheckConstraintModelChangeSupport { + + /** CheckConstraintModel自身のEventを監視するListenerのリスト */ + private List<CheckConstraintModelChangeListener> listeners = new ArrayList<CheckConstraintModelChangeListener>(); + + /** + * CheckConstraintModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link CheckConstraintModel} + * @category instance creation + */ + public CheckConstraintModelChangeSupportImpl(CheckConstraintModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * CheckConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link CheckConstraintModelChangeListener} + * @see #removeCheckConstraintModelChangeListener(CheckConstraintModelChangeListener) + */ + public void addCheckConstraintModelChangeListener(CheckConstraintModelChangeListener l) { + listeners.add(l); + } + + /** + * CheckConstraintModel自身を監視するListenerに通知されたEventをCheckConstraintModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (CheckConstraintModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * CheckConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link CheckConstraintModelChangeListener} + * @see #addCheckConstraintModelChangeListener(CheckConstraintModelChangeListener) + */ + public void removeCheckConstraintModelChangeListener(CheckConstraintModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/CheckConstraintModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.constraint; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.constraint.ConstraintChangeListener; +import org.jiemamy.spec.event.model.constraint.ConstraintChangeSupport; +import org.jiemamy.spec.model.constraint.Constraint; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、Constraintからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class ConstraintChangeSupportImpl implements ConstraintChangeSupport { + + /** Constraint自身のEventを監視するListenerのリスト */ + private List<ConstraintChangeListener> listeners = new ArrayList<ConstraintChangeListener>(); + + /** + * Constraintの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link Constraint} + * @category instance creation + */ + public ConstraintChangeSupportImpl(Constraint source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * Constraint自身のEventを監視するListenerを追加する。 + * + * @param l {@link ConstraintChangeListener} + * @see #removeConstraintChangeListener(ConstraintChangeListener) + */ + public void addConstraintChangeListener(ConstraintChangeListener l) { + listeners.add(l); + } + + /** + * Constraint自身を監視するListenerに通知されたEventをConstraintの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (ConstraintChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * Constraint自身のEventを監視するListenerを削除する。 + * + * @param l {@link ConstraintChangeListener} + * @see #addConstraintChangeListener(ConstraintChangeListener) + */ + public void removeConstraintChangeListener(ConstraintChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintSetModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintSetModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintSetModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.constraint; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.constraint.ConstraintSetModelChangeListener; +import org.jiemamy.spec.event.model.constraint.ConstraintSetModelChangeSupport; +import org.jiemamy.spec.model.constraint.ConstraintSetModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ConstraintSetModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class ConstraintSetModelChangeSupportImpl implements ConstraintSetModelChangeSupport { + + /** ConstraintSetModel自身のEventを監視するListenerのリスト */ + private List<ConstraintSetModelChangeListener> listeners = new ArrayList<ConstraintSetModelChangeListener>(); + + /** + * ConstraintSetModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link ConstraintSetModel} + * @category instance creation + */ + public ConstraintSetModelChangeSupportImpl(ConstraintSetModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * ConstraintSetModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ConstraintSetModelChangeListener} + * @see #removeConstraintSetModelChangeListener(ConstraintSetModelChangeListener) + */ + public void addConstraintSetModelChangeListener(ConstraintSetModelChangeListener l) { + listeners.add(l); + } + + /** + * ConstraintSetModel自身を監視するListenerに通知されたEventをConstraintSetModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (ConstraintSetModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * ConstraintSetModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ConstraintSetModelChangeListener} + * @see #addConstraintSetModelChangeListener(ConstraintSetModelChangeListener) + */ + public void removeConstraintSetModelChangeListener(ConstraintSetModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/ConstraintSetModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/NotNullConstraintModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/NotNullConstraintModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/NotNullConstraintModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,94 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.constraint; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.constraint.NotNullConstraintModelChangeListener; +import org.jiemamy.spec.event.model.constraint.NotNullConstraintModelChangeSupport; +import org.jiemamy.spec.model.constraint.NotNullConstraintModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、NotNullConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class NotNullConstraintModelChangeSupportImpl implements NotNullConstraintModelChangeSupport { + + /** NotNullConstraintModel自身のEventを監視するListenerのリスト */ + private List<NotNullConstraintModelChangeListener> listeners = + new ArrayList<NotNullConstraintModelChangeListener>(); + + /** + * NotNullConstraintModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link NotNullConstraintModel} + * @category instance creation + */ + public NotNullConstraintModelChangeSupportImpl(NotNullConstraintModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * NotNullConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link NotNullConstraintModelChangeListener} + * @see #removeNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener) + */ + public void addNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener l) { + listeners.add(l); + } + + /** + * NotNullConstraintModel自身を監視するListenerに通知されたEventをNotNullConstraintModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (NotNullConstraintModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * NotNullConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link NotNullConstraintModelChangeListener} + * @see #addNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener) + */ + public void removeNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/NotNullConstraintModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/PrimaryKeyConstraintModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/PrimaryKeyConstraintModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/PrimaryKeyConstraintModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,94 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.constraint; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.constraint.PrimaryKeyConstraintModelChangeListener; +import org.jiemamy.spec.event.model.constraint.PrimaryKeyConstraintModelChangeSupport; +import org.jiemamy.spec.model.constraint.PrimaryKeyConstraintModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、PrimaryKeyConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class PrimaryKeyConstraintModelChangeSupportImpl implements PrimaryKeyConstraintModelChangeSupport { + + /** PrimaryKeyConstraintModel自身のEventを監視するListenerのリスト */ + private List<PrimaryKeyConstraintModelChangeListener> listeners = + new ArrayList<PrimaryKeyConstraintModelChangeListener>(); + + /** + * PrimaryKeyConstraintModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link PrimaryKeyConstraintModel} + * @category instance creation + */ + public PrimaryKeyConstraintModelChangeSupportImpl(PrimaryKeyConstraintModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * PrimaryKeyConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link PrimaryKeyConstraintModelChangeListener} + * @see #removePrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener) + */ + public void addPrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener l) { + listeners.add(l); + } + + /** + * PrimaryKeyConstraintModel自身を監視するListenerに通知されたEventをPrimaryKeyConstraintModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (PrimaryKeyConstraintModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * PrimaryKeyConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link PrimaryKeyConstraintModelChangeListener} + * @see #addPrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener) + */ + public void removePrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/constraint/PrimaryKeyConstraintModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/InsertDataSetModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/InsertDataSetModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/InsertDataSetModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,130 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.dataset; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableMap; +import org.jiemamy.spec.event.model.dataset.InsertDataSetModelChangeListener; +import org.jiemamy.spec.event.model.dataset.InsertDataSetModelChangeSupport; +import org.jiemamy.spec.model.dataset.InsertDataSetModel; +import org.jiemamy.spec.model.node.AbstractEntityModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、InsertDataSetModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class InsertDataSetModelChangeSupportImpl implements InsertDataSetModelChangeSupport { + + /** InsertDataSetModel自身のEventを監視するListenerのリスト */ + private List<InsertDataSetModelChangeListener> listeners = new ArrayList<InsertDataSetModelChangeListener>(); + + /** + * recordsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireRecordsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>> recordsCollectionChangeListener = + new ObservableCollectionChangeListener<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>> event) { + fireRecordsCollectionChangeEvent(event); + } + }; + + /** + * InsertDataSetModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link InsertDataSetModel} + * @category instance creation + */ + public InsertDataSetModelChangeSupportImpl(InsertDataSetModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableMap<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>) source + .getRecords()).addListener(recordsCollectionChangeListener); + } + + /** + * InsertDataSetModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link InsertDataSetModelChangeListener} + * @see #removeInsertDataSetModelChangeListener(InsertDataSetModelChangeListener) + */ + public void addInsertDataSetModelChangeListener(InsertDataSetModelChangeListener l) { + listeners.add(l); + } + + /** + * recordsのcollectionを監視するListenerに通知されたEventをInsertDataSetModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireRecordsCollectionChangeEvent( + ObservableCollectionChangeEvent<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>> event) { + for (InsertDataSetModelChangeListener l : listeners) { + l.recordCollectionChange(event); + } + } + + /** + * InsertDataSetModel自身を監視するListenerに通知されたEventをInsertDataSetModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (InsertDataSetModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * InsertDataSetModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link InsertDataSetModelChangeListener} + * @see #addInsertDataSetModelChangeListener(InsertDataSetModelChangeListener) + */ + public void removeInsertDataSetModelChangeListener(InsertDataSetModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/InsertDataSetModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/RecordModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/RecordModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/RecordModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,127 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.dataset; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableMap; +import org.jiemamy.spec.event.model.dataset.RecordModelChangeListener; +import org.jiemamy.spec.event.model.dataset.RecordModelChangeSupport; +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.dataset.RecordModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、RecordModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class RecordModelChangeSupportImpl implements RecordModelChangeSupport { + + /** RecordModel自身のEventを監視するListenerのリスト */ + private List<RecordModelChangeListener> listeners = new ArrayList<RecordModelChangeListener>(); + + /** + * valuesのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireValuesCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<Map<ColumnModel, String>, String> valuesCollectionChangeListener = + new ObservableCollectionChangeListener<Map<ColumnModel, String>, String>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<Map<ColumnModel, String>, String> event) { + fireValuesCollectionChangeEvent(event); + } + }; + + /** + * RecordModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link RecordModel} + * @category instance creation + */ + public RecordModelChangeSupportImpl(RecordModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableMap<ColumnModel, String>) source.getValues()).addListener(valuesCollectionChangeListener); + } + + /** + * RecordModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link RecordModelChangeListener} + * @see #removeRecordModelChangeListener(RecordModelChangeListener) + */ + public void addRecordModelChangeListener(RecordModelChangeListener l) { + listeners.add(l); + } + + /** + * valuesのcollectionを監視するListenerに通知されたEventをRecordModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireValuesCollectionChangeEvent(ObservableCollectionChangeEvent<Map<ColumnModel, String>, String> event) { + for (RecordModelChangeListener l : listeners) { + l.valuCollectionChange(event); + } + } + + /** + * RecordModel自身を監視するListenerに通知されたEventをRecordModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (RecordModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * RecordModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link RecordModelChangeListener} + * @see #addRecordModelChangeListener(RecordModelChangeListener) + */ + public void removeRecordModelChangeListener(RecordModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/dataset/RecordModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/DataTypeChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/DataTypeChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/DataTypeChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,125 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.datatype; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableList; +import org.jiemamy.spec.event.model.datatype.DataTypeChangeListener; +import org.jiemamy.spec.event.model.datatype.DataTypeChangeSupport; +import org.jiemamy.spec.model.datatype.DataType; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、DataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class DataTypeChangeSupportImpl implements DataTypeChangeSupport { + + /** DataType自身のEventを監視するListenerのリスト */ + private List<DataTypeChangeListener> listeners = new ArrayList<DataTypeChangeListener>(); + + /** + * adaptersのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireAdaptersCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<Object>, Object> adaptersCollectionChangeListener = + new ObservableCollectionChangeListener<List<Object>, Object>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<List<Object>, Object> event) { + fireAdaptersCollectionChangeEvent(event); + } + }; + + /** + * DataTypeの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link DataType} + * @category instance creation + */ + public DataTypeChangeSupportImpl(DataType source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableList<Object>) source.getAdapters()).addListener(adaptersCollectionChangeListener); + } + + /** + * DataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link DataTypeChangeListener} + * @see #removeDataTypeChangeListener(DataTypeChangeListener) + */ + public void addDataTypeChangeListener(DataTypeChangeListener l) { + listeners.add(l); + } + + /** + * adaptersのcollectionを監視するListenerに通知されたEventをDataTypeの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireAdaptersCollectionChangeEvent(ObservableCollectionChangeEvent<List<Object>, Object> event) { + for (DataTypeChangeListener l : listeners) { + l.adapterCollectionChange(event); + } + } + + /** + * DataType自身を監視するListenerに通知されたEventをDataTypeの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (DataTypeChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * DataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link DataTypeChangeListener} + * @see #addDataTypeChangeListener(DataTypeChangeListener) + */ + public void removeDataTypeChangeListener(DataTypeChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/DataTypeChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/GeneralDataTypeChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/GeneralDataTypeChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/GeneralDataTypeChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.datatype; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.datatype.GeneralDataTypeChangeListener; +import org.jiemamy.spec.event.model.datatype.GeneralDataTypeChangeSupport; +import org.jiemamy.spec.model.datatype.GeneralDataType; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、GeneralDataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class GeneralDataTypeChangeSupportImpl implements GeneralDataTypeChangeSupport { + + /** GeneralDataType自身のEventを監視するListenerのリスト */ + private List<GeneralDataTypeChangeListener> listeners = new ArrayList<GeneralDataTypeChangeListener>(); + + /** + * GeneralDataTypeの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link GeneralDataType} + * @category instance creation + */ + public GeneralDataTypeChangeSupportImpl(GeneralDataType source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * GeneralDataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link GeneralDataTypeChangeListener} + * @see #removeGeneralDataTypeChangeListener(GeneralDataTypeChangeListener) + */ + public void addGeneralDataTypeChangeListener(GeneralDataTypeChangeListener l) { + listeners.add(l); + } + + /** + * GeneralDataType自身を監視するListenerに通知されたEventをGeneralDataTypeの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (GeneralDataTypeChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * GeneralDataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link GeneralDataTypeChangeListener} + * @see #addGeneralDataTypeChangeListener(GeneralDataTypeChangeListener) + */ + public void removeGeneralDataTypeChangeListener(GeneralDataTypeChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/GeneralDataTypeChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/SpecialDataTypeChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/SpecialDataTypeChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/SpecialDataTypeChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.datatype; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.datatype.SpecialDataTypeChangeListener; +import org.jiemamy.spec.event.model.datatype.SpecialDataTypeChangeSupport; +import org.jiemamy.spec.model.datatype.SpecialDataType; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、SpecialDataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class SpecialDataTypeChangeSupportImpl implements SpecialDataTypeChangeSupport { + + /** SpecialDataType自身のEventを監視するListenerのリスト */ + private List<SpecialDataTypeChangeListener> listeners = new ArrayList<SpecialDataTypeChangeListener>(); + + /** + * SpecialDataTypeの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link SpecialDataType} + * @category instance creation + */ + public SpecialDataTypeChangeSupportImpl(SpecialDataType source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * SpecialDataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link SpecialDataTypeChangeListener} + * @see #removeSpecialDataTypeChangeListener(SpecialDataTypeChangeListener) + */ + public void addSpecialDataTypeChangeListener(SpecialDataTypeChangeListener l) { + listeners.add(l); + } + + /** + * SpecialDataType自身を監視するListenerに通知されたEventをSpecialDataTypeの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (SpecialDataTypeChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * SpecialDataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link SpecialDataTypeChangeListener} + * @see #addSpecialDataTypeChangeListener(SpecialDataTypeChangeListener) + */ + public void removeSpecialDataTypeChangeListener(SpecialDataTypeChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/datatype/SpecialDataTypeChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/IndexModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/IndexModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/IndexModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,128 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.index; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableList; +import org.jiemamy.spec.event.model.index.IndexModelChangeListener; +import org.jiemamy.spec.event.model.index.IndexModelChangeSupport; +import org.jiemamy.spec.model.index.IndexColumnModel; +import org.jiemamy.spec.model.index.IndexModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、IndexModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class IndexModelChangeSupportImpl implements IndexModelChangeSupport { + + /** IndexModel自身のEventを監視するListenerのリスト */ + private List<IndexModelChangeListener> listeners = new ArrayList<IndexModelChangeListener>(); + + /** + * columnsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireColumnsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<IndexColumnModel>, IndexColumnModel> columnsCollectionChangeListener = + new ObservableCollectionChangeListener<List<IndexColumnModel>, IndexColumnModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<IndexColumnModel>, IndexColumnModel> event) { + fireColumnsCollectionChangeEvent(event); + } + }; + + /** + * IndexModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link IndexModel} + * @category instance creation + */ + public IndexModelChangeSupportImpl(IndexModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableList<IndexColumnModel>) source.getColumns()).addListener(columnsCollectionChangeListener); + } + + /** + * IndexModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link IndexModelChangeListener} + * @see #removeIndexModelChangeListener(IndexModelChangeListener) + */ + public void addIndexModelChangeListener(IndexModelChangeListener l) { + listeners.add(l); + } + + /** + * columnsのcollectionを監視するListenerに通知されたEventをIndexModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireColumnsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<IndexColumnModel>, IndexColumnModel> event) { + for (IndexModelChangeListener l : listeners) { + l.columnCollectionChange(event); + } + } + + /** + * IndexModel自身を監視するListenerに通知されたEventをIndexModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (IndexModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * IndexModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link IndexModelChangeListener} + * @see #addIndexModelChangeListener(IndexModelChangeListener) + */ + public void removeIndexModelChangeListener(IndexModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/index/IndexModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractEntityModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractEntityModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractEntityModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.node; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.node.AbstractEntityModelChangeListener; +import org.jiemamy.spec.event.model.node.AbstractEntityModelChangeSupport; +import org.jiemamy.spec.model.node.AbstractEntityModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractEntityModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class AbstractEntityModelChangeSupportImpl implements AbstractEntityModelChangeSupport { + + /** AbstractEntityModel自身のEventを監視するListenerのリスト */ + private List<AbstractEntityModelChangeListener> listeners = new ArrayList<AbstractEntityModelChangeListener>(); + + /** + * AbstractEntityModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link AbstractEntityModel} + * @category instance creation + */ + public AbstractEntityModelChangeSupportImpl(AbstractEntityModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * AbstractEntityModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractEntityModelChangeListener} + * @see #removeAbstractEntityModelChangeListener(AbstractEntityModelChangeListener) + */ + public void addAbstractEntityModelChangeListener(AbstractEntityModelChangeListener l) { + listeners.add(l); + } + + /** + * AbstractEntityModel自身を監視するListenerに通知されたEventをAbstractEntityModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (AbstractEntityModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * AbstractEntityModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractEntityModelChangeListener} + * @see #addAbstractEntityModelChangeListener(AbstractEntityModelChangeListener) + */ + public void removeAbstractEntityModelChangeListener(AbstractEntityModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractEntityModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractNodeModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractNodeModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractNodeModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,161 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.node; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableList; +import org.jiemamy.spec.event.model.node.AbstractNodeModelChangeListener; +import org.jiemamy.spec.event.model.node.AbstractNodeModelChangeSupport; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; +import org.jiemamy.spec.model.node.AbstractNodeModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractNodeModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class AbstractNodeModelChangeSupportImpl implements AbstractNodeModelChangeSupport { + + /** AbstractNodeModel自身のEventを監視するListenerのリスト */ + private List<AbstractNodeModelChangeListener> listeners = new ArrayList<AbstractNodeModelChangeListener>(); + + /** + * sourceConnectionsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireSourceConnectionsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel> sourceConnectionsCollectionChangeListener = + new ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + fireSourceConnectionsCollectionChangeEvent(event); + } + }; + + /** + * targetConnectionsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireTargetConnectionsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel> targetConnectionsCollectionChangeListener = + new ObservableCollectionChangeListener<List<AbstractConnectionModel>, AbstractConnectionModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + fireTargetConnectionsCollectionChangeEvent(event); + } + }; + + /** + * AbstractNodeModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link AbstractNodeModel} + * @category instance creation + */ + public AbstractNodeModelChangeSupportImpl(AbstractNodeModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableList<AbstractConnectionModel>) source.getSourceConnections()) + .addListener(sourceConnectionsCollectionChangeListener); + ((ObservableList<AbstractConnectionModel>) source.getTargetConnections()) + .addListener(targetConnectionsCollectionChangeListener); + } + + /** + * AbstractNodeModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractNodeModelChangeListener} + * @see #removeAbstractNodeModelChangeListener(AbstractNodeModelChangeListener) + */ + public void addAbstractNodeModelChangeListener(AbstractNodeModelChangeListener l) { + listeners.add(l); + } + + /** + * sourceConnectionsのcollectionを監視するListenerに通知されたEventをAbstractNodeModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireSourceConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + for (AbstractNodeModelChangeListener l : listeners) { + l.sourceConnectionCollectionChange(event); + } + } + + /** + * targetConnectionsのcollectionを監視するListenerに通知されたEventをAbstractNodeModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireTargetConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event) { + for (AbstractNodeModelChangeListener l : listeners) { + l.targetConnectionCollectionChange(event); + } + } + + /** + * AbstractNodeModel自身を監視するListenerに通知されたEventをAbstractNodeModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (AbstractNodeModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * AbstractNodeModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractNodeModelChangeListener} + * @see #addAbstractNodeModelChangeListener(AbstractNodeModelChangeListener) + */ + public void removeAbstractNodeModelChangeListener(AbstractNodeModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/AbstractNodeModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/StickyModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/StickyModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/StickyModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.node; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.node.StickyModelChangeListener; +import org.jiemamy.spec.event.model.node.StickyModelChangeSupport; +import org.jiemamy.spec.model.node.StickyModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、StickyModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class StickyModelChangeSupportImpl implements StickyModelChangeSupport { + + /** StickyModel自身のEventを監視するListenerのリスト */ + private List<StickyModelChangeListener> listeners = new ArrayList<StickyModelChangeListener>(); + + /** + * StickyModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link StickyModel} + * @category instance creation + */ + public StickyModelChangeSupportImpl(StickyModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * StickyModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link StickyModelChangeListener} + * @see #removeStickyModelChangeListener(StickyModelChangeListener) + */ + public void addStickyModelChangeListener(StickyModelChangeListener l) { + listeners.add(l); + } + + /** + * StickyModel自身を監視するListenerに通知されたEventをStickyModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (StickyModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * StickyModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link StickyModelChangeListener} + * @see #addStickyModelChangeListener(StickyModelChangeListener) + */ + public void removeStickyModelChangeListener(StickyModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/StickyModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/TableModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/TableModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/TableModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,219 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.node; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.event.ObservableCollectionChangeListener; +import org.jiemamy.spec.event.collectionimpl.ObservableList; +import org.jiemamy.spec.event.model.node.TableModelChangeListener; +import org.jiemamy.spec.event.model.node.TableModelChangeSupport; +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.constraint.CheckConstraintModel; +import org.jiemamy.spec.model.index.IndexModel; +import org.jiemamy.spec.model.node.TableModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、TableModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class TableModelChangeSupportImpl implements TableModelChangeSupport { + + /** TableModel自身のEventを監視するListenerのリスト */ + private List<TableModelChangeListener> listeners = new ArrayList<TableModelChangeListener>(); + + /** + * checksのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireChecksCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<CheckConstraintModel>, CheckConstraintModel> checksCollectionChangeListener = + new ObservableCollectionChangeListener<List<CheckConstraintModel>, CheckConstraintModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged( + ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event) { + fireChecksCollectionChangeEvent(event); + } + }; + + /** + * columnsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireColumnsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<ColumnModel>, ColumnModel> columnsCollectionChangeListener = + new ObservableCollectionChangeListener<List<ColumnModel>, ColumnModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) { + fireColumnsCollectionChangeEvent(event); + } + }; + + /** + * indexesのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #fireIndexesCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<IndexModel>, IndexModel> indexesCollectionChangeListener = + new ObservableCollectionChangeListener<List<IndexModel>, IndexModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event) { + fireIndexesCollectionChangeEvent(event); + } + }; + + /** + * primaryKeyColumnsのリストを監視するListener + * + * @see ObservableCollectionChangeListener + * @see #firePrimaryKeyColumnsCollectionChangeEvent(ObservableCollectionChangeEvent) + */ + private ObservableCollectionChangeListener<List<ColumnModel>, ColumnModel> primaryKeyColumnsCollectionChangeListener = + new ObservableCollectionChangeListener<List<ColumnModel>, ColumnModel>() { + + /** + * {@inheritDoc} + */ + public void collectionChanged(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) { + firePrimaryKeyColumnsCollectionChangeEvent(event); + } + }; + + /** + * TableModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link TableModel} + * @category instance creation + */ + public TableModelChangeSupportImpl(TableModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + ((ObservableList<CheckConstraintModel>) source.getChecks()).addListener(checksCollectionChangeListener); + ((ObservableList<ColumnModel>) source.getColumns()).addListener(columnsCollectionChangeListener); + ((ObservableList<IndexModel>) source.getIndexes()).addListener(indexesCollectionChangeListener); + ((ObservableList<ColumnModel>) source.getPrimaryKeyColumns()) + .addListener(primaryKeyColumnsCollectionChangeListener); + } + + /** + * TableModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link TableModelChangeListener} + * @see #removeTableModelChangeListener(TableModelChangeListener) + */ + public void addTableModelChangeListener(TableModelChangeListener l) { + listeners.add(l); + } + + /** + * checksのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireChecksCollectionChangeEvent( + ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event) { + for (TableModelChangeListener l : listeners) { + l.checkCollectionChange(event); + } + } + + /** + * columnsのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireColumnsCollectionChangeEvent(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) { + for (TableModelChangeListener l : listeners) { + l.columnCollectionChange(event); + } + } + + /** + * indexesのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void fireIndexesCollectionChangeEvent(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event) { + for (TableModelChangeListener l : listeners) { + l.indexCollectionChange(event); + } + } + + /** + * primaryKeyColumnsのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + public void firePrimaryKeyColumnsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) { + for (TableModelChangeListener l : listeners) { + l.primaryKeyColumnCollectionChange(event); + } + } + + /** + * TableModel自身を監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (TableModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * TableModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link TableModelChangeListener} + * @see #addTableModelChangeListener(TableModelChangeListener) + */ + public void removeTableModelChangeListener(TableModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/TableModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ViewModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ViewModelChangeSupportImpl.java (rev 0) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ViewModelChangeSupportImpl.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.event.model.node; + +import java.util.ArrayList; +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeEvent; +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.Observable; +import org.jiemamy.spec.event.model.node.ViewModelChangeListener; +import org.jiemamy.spec.event.model.node.ViewModelChangeSupport; +import org.jiemamy.spec.model.node.ViewModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ViewModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public class ViewModelChangeSupportImpl implements ViewModelChangeSupport { + + /** ViewModel自身のEventを監視するListenerのリスト */ + private List<ViewModelChangeListener> listeners = new ArrayList<ViewModelChangeListener>(); + + /** + * ViewModelの属性の変更Eventを処理するListener + * + * @see #fireModelChange(ModelChangeEvent) + */ + private ModelChangeListener modelChangeListener = new ModelChangeListener() { + + /** + * {@inheritDoc} + */ + public void modelChanged(ModelChangeEvent event) { + fireModelChange(event); + } + }; + + + /** + * コンストラクタ。 + * + * @param source {@link ViewModel} + * @category instance creation + */ + public ViewModelChangeSupportImpl(ViewModel source) { + source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); + } + + /** + * ViewModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ViewModelChangeListener} + * @see #removeViewModelChangeListener(ViewModelChangeListener) + */ + public void addViewModelChangeListener(ViewModelChangeListener l) { + listeners.add(l); + } + + /** + * ViewModel自身を監視するListenerに通知されたEventをViewModelの監視Listenerへ通知する。 + * + * @param event {@link ModelChangeEvent} + */ + public void fireModelChange(ModelChangeEvent event) { + for (ViewModelChangeListener l : listeners) { + l.modelChanged(event); + } + } + + /** + * ViewModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ViewModelChangeListener} + * @see #addViewModelChangeListener(ViewModelChangeListener) + */ + public void removeViewModelChangeListener(ViewModelChangeListener l) { + listeners.remove(l); + } +} Property changes on: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/model/node/ViewModelChangeSupportImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * ColumnModel用のListener + * + * @author shin1ogawa + */ +public interface ColumnModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ColumnModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface ColumnModelChangeSupport { + + /** + * ColumnModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ColumnModelChangeListener} + * @see #removeColumnModelChangeListener(ColumnModelChangeListener) + */ + void addColumnModelChangeListener(ColumnModelChangeListener l); + + /** + * ColumnModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ColumnModelChangeListener} + * @see #addColumnModelChangeListener(ColumnModelChangeListener) + */ + void removeColumnModelChangeListener(ColumnModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/ColumnModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * DomainModel用のListener + * + * @author shin1ogawa + */ +public interface DomainModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、DomainModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface DomainModelChangeSupport { + + /** + * DomainModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link DomainModelChangeListener} + * @see #removeDomainModelChangeListener(DomainModelChangeListener) + */ + void addDomainModelChangeListener(DomainModelChangeListener l); + + /** + * DomainModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link DomainModelChangeListener} + * @see #addDomainModelChangeListener(DomainModelChangeListener) + */ + void removeDomainModelChangeListener(DomainModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/DomainModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * JiemamyModel用のListener + * + * @author shin1ogawa + */ +public interface JiemamyModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、JiemamyModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface JiemamyModelChangeSupport { + + /** + * JiemamyModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link JiemamyModelChangeListener} + * @see #removeJiemamyModelChangeListener(JiemamyModelChangeListener) + */ + void addJiemamyModelChangeListener(JiemamyModelChangeListener l); + + /** + * JiemamyModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link JiemamyModelChangeListener} + * @see #addJiemamyModelChangeListener(JiemamyModelChangeListener) + */ + void removeJiemamyModelChangeListener(JiemamyModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/JiemamyModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,63 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.DomainModel; +import org.jiemamy.spec.model.RootModel; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; +import org.jiemamy.spec.model.dataset.InsertDataSetModel; +import org.jiemamy.spec.model.node.AbstractNodeModel; + +/** + * RootModel用のListener + * + * @author shin1ogawa + */ +public interface RootModelChangeListener extends ModelChangeListener { + + /** + * {@link RootModel}が保持する{@link org.jiemamy.spec.model.connection.AbstractConnectionModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void connectionCollectionChange( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); + + /** + * {@link RootModel}が保持する{@link org.jiemamy.spec.model.DomainModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void domainCollectionChange(ObservableCollectionChangeEvent<List<DomainModel>, DomainModel> event); + + /** + * {@link RootModel}が保持する{@link org.jiemamy.spec.model.dataset.InsertDataSetModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void insertDataSetCollectionChange( + ObservableCollectionChangeEvent<List<InsertDataSetModel>, InsertDataSetModel> event); + + /** + * {@link RootModel}が保持する{@link org.jiemamy.spec.model.node.AbstractNodeModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void nodCollectionChange(ObservableCollectionChangeEvent<List<AbstractNodeModel>, AbstractNodeModel> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,78 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model; + +import java.util.List; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.DomainModel; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; +import org.jiemamy.spec.model.dataset.InsertDataSetModel; +import org.jiemamy.spec.model.node.AbstractNodeModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、RootModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface RootModelChangeSupport { + + /** + * RootModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link RootModelChangeListener} + * @see #removeRootModelChangeListener(RootModelChangeListener) + */ + void addRootModelChangeListener(RootModelChangeListener l); + + /** + * connectionsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); + + /** + * domainsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireDomainsCollectionChangeEvent(ObservableCollectionChangeEvent<List<DomainModel>, DomainModel> event); + + /** + * insertDataSetsのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireInsertDataSetsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<InsertDataSetModel>, InsertDataSetModel> event); + + /** + * nodesのcollectionを監視するListenerに通知されたEventをRootModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireNodesCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractNodeModel>, AbstractNodeModel> event); + + /** + * RootModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link RootModelChangeListener} + * @see #addRootModelChangeListener(RootModelChangeListener) + */ + void removeRootModelChangeListener(RootModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/RootModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * AbstractConnectionModel用のListener + * + * @author shin1ogawa + */ +public interface AbstractConnectionModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractConnectionModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface AbstractConnectionModelChangeSupport { + + /** + * AbstractConnectionModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractConnectionModelChangeListener} + * @see #removeAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener) + */ + void addAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener l); + + /** + * AbstractConnectionModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractConnectionModelChangeListener} + * @see #addAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener) + */ + void removeAbstractConnectionModelChangeListener(AbstractConnectionModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractConnectionModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * AbstractRelationModel用のListener + * + * @author shin1ogawa + */ +public interface AbstractRelationModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractRelationModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface AbstractRelationModelChangeSupport { + + /** + * AbstractRelationModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractRelationModelChangeListener} + * @see #removeAbstractRelationModelChangeListener(AbstractRelationModelChangeListener) + */ + void addAbstractRelationModelChangeListener(AbstractRelationModelChangeListener l); + + /** + * AbstractRelationModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractRelationModelChangeListener} + * @see #addAbstractRelationModelChangeListener(AbstractRelationModelChangeListener) + */ + void removeAbstractRelationModelChangeListener(AbstractRelationModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/AbstractRelationModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * ForeignKeyMapping用のListener + * + * @author shin1ogawa + */ +public interface ForeignKeyMappingChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ForeignKeyMappingからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface ForeignKeyMappingChangeSupport { + + /** + * ForeignKeyMapping自身のEventを監視するListenerを追加する。 + * + * @param l {@link ForeignKeyMappingChangeListener} + * @see #removeForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener) + */ + void addForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener l); + + /** + * ForeignKeyMapping自身のEventを監視するListenerを削除する。 + * + * @param l {@link ForeignKeyMappingChangeListener} + * @see #addForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener) + */ + void removeForeignKeyMappingChangeListener(ForeignKeyMappingChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/ForeignKeyMappingChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * InheritanceModel用のListener + * + * @author shin1ogawa + */ +public interface InheritanceModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.connection; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、InheritanceModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface InheritanceModelChangeSupport { + + /** + * InheritanceModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link InheritanceModelChangeListener} + * @see #removeInheritanceModelChangeListener(InheritanceModelChangeListener) + */ + void addInheritanceModelChangeListener(InheritanceModelChangeListener l); + + /** + * InheritanceModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link InheritanceModelChangeListener} + * @see #addInheritanceModelChangeListener(InheritanceModelChangeListener) + */ + void removeInheritanceModelChangeListener(InheritanceModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/connection/InheritanceModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * CheckConstraintModel用のListener + * + * @author shin1ogawa + */ +public interface CheckConstraintModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、CheckConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface CheckConstraintModelChangeSupport { + + /** + * CheckConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link CheckConstraintModelChangeListener} + * @see #removeCheckConstraintModelChangeListener(CheckConstraintModelChangeListener) + */ + void addCheckConstraintModelChangeListener(CheckConstraintModelChangeListener l); + + /** + * CheckConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link CheckConstraintModelChangeListener} + * @see #addCheckConstraintModelChangeListener(CheckConstraintModelChangeListener) + */ + void removeCheckConstraintModelChangeListener(CheckConstraintModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/CheckConstraintModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * Constraint用のListener + * + * @author shin1ogawa + */ +public interface ConstraintChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、Constraintからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface ConstraintChangeSupport { + + /** + * Constraint自身のEventを監視するListenerを追加する。 + * + * @param l {@link ConstraintChangeListener} + * @see #removeConstraintChangeListener(ConstraintChangeListener) + */ + void addConstraintChangeListener(ConstraintChangeListener l); + + /** + * Constraint自身のEventを監視するListenerを削除する。 + * + * @param l {@link ConstraintChangeListener} + * @see #addConstraintChangeListener(ConstraintChangeListener) + */ + void removeConstraintChangeListener(ConstraintChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * ConstraintSetModel用のListener + * + * @author shin1ogawa + */ +public interface ConstraintSetModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ConstraintSetModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface ConstraintSetModelChangeSupport { + + /** + * ConstraintSetModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ConstraintSetModelChangeListener} + * @see #removeConstraintSetModelChangeListener(ConstraintSetModelChangeListener) + */ + void addConstraintSetModelChangeListener(ConstraintSetModelChangeListener l); + + /** + * ConstraintSetModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ConstraintSetModelChangeListener} + * @see #addConstraintSetModelChangeListener(ConstraintSetModelChangeListener) + */ + void removeConstraintSetModelChangeListener(ConstraintSetModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/ConstraintSetModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * NotNullConstraintModel用のListener + * + * @author shin1ogawa + */ +public interface NotNullConstraintModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、NotNullConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface NotNullConstraintModelChangeSupport { + + /** + * NotNullConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link NotNullConstraintModelChangeListener} + * @see #removeNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener) + */ + void addNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener l); + + /** + * NotNullConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link NotNullConstraintModelChangeListener} + * @see #addNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener) + */ + void removeNotNullConstraintModelChangeListener(NotNullConstraintModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/NotNullConstraintModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * PrimaryKeyConstraintModel用のListener + * + * @author shin1ogawa + */ +public interface PrimaryKeyConstraintModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.constraint; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、PrimaryKeyConstraintModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface PrimaryKeyConstraintModelChangeSupport { + + /** + * PrimaryKeyConstraintModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link PrimaryKeyConstraintModelChangeListener} + * @see #removePrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener) + */ + void addPrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener l); + + /** + * PrimaryKeyConstraintModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link PrimaryKeyConstraintModelChangeListener} + * @see #addPrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener) + */ + void removePrimaryKeyConstraintModelChangeListener(PrimaryKeyConstraintModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/constraint/PrimaryKeyConstraintModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.dataset; + +import java.util.Map; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.dataset.InsertDataSetModel; +import org.jiemamy.spec.model.node.AbstractEntityModel; + +/** + * InsertDataSetModel用のListener + * + * @author shin1ogawa + */ +public interface InsertDataSetModelChangeListener extends ModelChangeListener { + + /** + * {@link InsertDataSetModel}が保持する{@link java.util.List<org.jiemamy.spec.model.dataset.RecordModel>}のCollectionに対する変更を処理する。 + * + * @param event + */ + void recordCollectionChange( + ObservableCollectionChangeEvent<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,52 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.dataset; + +import java.util.Map; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.node.AbstractEntityModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、InsertDataSetModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface InsertDataSetModelChangeSupport { + + /** + * InsertDataSetModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link InsertDataSetModelChangeListener} + * @see #removeInsertDataSetModelChangeListener(InsertDataSetModelChangeListener) + */ + void addInsertDataSetModelChangeListener(InsertDataSetModelChangeListener l); + + /** + * recordsのcollectionを監視するListenerに通知されたEventをInsertDataSetModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireRecordsCollectionChangeEvent( + ObservableCollectionChangeEvent<Map<AbstractEntityModel, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>>, java.util.List<org.jiemamy.spec.model.dataset.RecordModel>> event); + + /** + * InsertDataSetModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link InsertDataSetModelChangeListener} + * @see #addInsertDataSetModelChangeListener(InsertDataSetModelChangeListener) + */ + void removeInsertDataSetModelChangeListener(InsertDataSetModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/InsertDataSetModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,37 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.dataset; + +import java.util.Map; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.dataset.RecordModel; + +/** + * RecordModel用のListener + * + * @author shin1ogawa + */ +public interface RecordModelChangeListener extends ModelChangeListener { + + /** + * {@link RecordModel}が保持する{@link java.lang.String}のCollectionに対する変更を処理する。 + * + * @param event + */ + void valuCollectionChange(ObservableCollectionChangeEvent<Map<ColumnModel, String>, String> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,51 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.dataset; + +import java.util.Map; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.ColumnModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、RecordModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface RecordModelChangeSupport { + + /** + * RecordModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link RecordModelChangeListener} + * @see #removeRecordModelChangeListener(RecordModelChangeListener) + */ + void addRecordModelChangeListener(RecordModelChangeListener l); + + /** + * valuesのcollectionを監視するListenerに通知されたEventをRecordModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireValuesCollectionChangeEvent(ObservableCollectionChangeEvent<Map<ColumnModel, String>, String> event); + + /** + * RecordModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link RecordModelChangeListener} + * @see #addRecordModelChangeListener(RecordModelChangeListener) + */ + void removeRecordModelChangeListener(RecordModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/dataset/RecordModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,36 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.datatype.DataType; + +/** + * DataType用のListener + * + * @author shin1ogawa + */ +public interface DataTypeChangeListener extends ModelChangeListener { + + /** + * {@link DataType}が保持する{@link java.lang.Object}のCollectionに対する変更を処理する。 + * + * @param event + */ + void adapterCollectionChange(ObservableCollectionChangeEvent<List<Object>, Object> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,50 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + +import java.util.List; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、DataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface DataTypeChangeSupport { + + /** + * DataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link DataTypeChangeListener} + * @see #removeDataTypeChangeListener(DataTypeChangeListener) + */ + void addDataTypeChangeListener(DataTypeChangeListener l); + + /** + * adaptersのcollectionを監視するListenerに通知されたEventをDataTypeの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireAdaptersCollectionChangeEvent(ObservableCollectionChangeEvent<List<Object>, Object> event); + + /** + * DataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link DataTypeChangeListener} + * @see #addDataTypeChangeListener(DataTypeChangeListener) + */ + void removeDataTypeChangeListener(DataTypeChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/DataTypeChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * GeneralDataType用のListener + * + * @author shin1ogawa + */ +public interface GeneralDataTypeChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、GeneralDataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface GeneralDataTypeChangeSupport { + + /** + * GeneralDataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link GeneralDataTypeChangeListener} + * @see #removeGeneralDataTypeChangeListener(GeneralDataTypeChangeListener) + */ + void addGeneralDataTypeChangeListener(GeneralDataTypeChangeListener l); + + /** + * GeneralDataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link GeneralDataTypeChangeListener} + * @see #addGeneralDataTypeChangeListener(GeneralDataTypeChangeListener) + */ + void removeGeneralDataTypeChangeListener(GeneralDataTypeChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/GeneralDataTypeChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * SpecialDataType用のListener + * + * @author shin1ogawa + */ +public interface SpecialDataTypeChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.datatype; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、SpecialDataTypeからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface SpecialDataTypeChangeSupport { + + /** + * SpecialDataType自身のEventを監視するListenerを追加する。 + * + * @param l {@link SpecialDataTypeChangeListener} + * @see #removeSpecialDataTypeChangeListener(SpecialDataTypeChangeListener) + */ + void addSpecialDataTypeChangeListener(SpecialDataTypeChangeListener l); + + /** + * SpecialDataType自身のEventを監視するListenerを削除する。 + * + * @param l {@link SpecialDataTypeChangeListener} + * @see #addSpecialDataTypeChangeListener(SpecialDataTypeChangeListener) + */ + void removeSpecialDataTypeChangeListener(SpecialDataTypeChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/datatype/SpecialDataTypeChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,37 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.index; + +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.index.IndexColumnModel; +import org.jiemamy.spec.model.index.IndexModel; + +/** + * IndexModel用のListener + * + * @author shin1ogawa + */ +public interface IndexModelChangeListener extends ModelChangeListener { + + /** + * {@link IndexModel}が保持する{@link org.jiemamy.spec.model.index.IndexColumnModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void columnCollectionChange(ObservableCollectionChangeEvent<List<IndexColumnModel>, IndexColumnModel> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,52 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.index; + +import java.util.List; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.index.IndexColumnModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、IndexModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface IndexModelChangeSupport { + + /** + * IndexModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link IndexModelChangeListener} + * @see #removeIndexModelChangeListener(IndexModelChangeListener) + */ + void addIndexModelChangeListener(IndexModelChangeListener l); + + /** + * columnsのcollectionを監視するListenerに通知されたEventをIndexModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireColumnsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<IndexColumnModel>, IndexColumnModel> event); + + /** + * IndexModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link IndexModelChangeListener} + * @see #addIndexModelChangeListener(IndexModelChangeListener) + */ + void removeIndexModelChangeListener(IndexModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/index/IndexModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * AbstractEntityModel用のListener + * + * @author shin1ogawa + */ +public interface AbstractEntityModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractEntityModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface AbstractEntityModelChangeSupport { + + /** + * AbstractEntityModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractEntityModelChangeListener} + * @see #removeAbstractEntityModelChangeListener(AbstractEntityModelChangeListener) + */ + void addAbstractEntityModelChangeListener(AbstractEntityModelChangeListener l); + + /** + * AbstractEntityModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractEntityModelChangeListener} + * @see #addAbstractEntityModelChangeListener(AbstractEntityModelChangeListener) + */ + void removeAbstractEntityModelChangeListener(AbstractEntityModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractEntityModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,46 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; +import org.jiemamy.spec.model.node.AbstractNodeModel; + +/** + * AbstractNodeModel用のListener + * + * @author shin1ogawa + */ +public interface AbstractNodeModelChangeListener extends ModelChangeListener { + + /** + * {@link AbstractNodeModel}が保持する{@link org.jiemamy.spec.model.connection.AbstractConnectionModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void sourceConnectionCollectionChange( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); + + /** + * {@link AbstractNodeModel}が保持する{@link org.jiemamy.spec.model.connection.AbstractConnectionModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void targetConnectionCollectionChange( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,60 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import java.util.List; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.connection.AbstractConnectionModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、AbstractNodeModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface AbstractNodeModelChangeSupport { + + /** + * AbstractNodeModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link AbstractNodeModelChangeListener} + * @see #removeAbstractNodeModelChangeListener(AbstractNodeModelChangeListener) + */ + void addAbstractNodeModelChangeListener(AbstractNodeModelChangeListener l); + + /** + * sourceConnectionsのcollectionを監視するListenerに通知されたEventをAbstractNodeModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireSourceConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); + + /** + * targetConnectionsのcollectionを監視するListenerに通知されたEventをAbstractNodeModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireTargetConnectionsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<AbstractConnectionModel>, AbstractConnectionModel> event); + + /** + * AbstractNodeModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link AbstractNodeModelChangeListener} + * @see #addAbstractNodeModelChangeListener(AbstractNodeModelChangeListener) + */ + void removeAbstractNodeModelChangeListener(AbstractNodeModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/AbstractNodeModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * StickyModel用のListener + * + * @author shin1ogawa + */ +public interface StickyModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、StickyModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface StickyModelChangeSupport { + + /** + * StickyModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link StickyModelChangeListener} + * @see #removeStickyModelChangeListener(StickyModelChangeListener) + */ + void addStickyModelChangeListener(StickyModelChangeListener l); + + /** + * StickyModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link StickyModelChangeListener} + * @see #addStickyModelChangeListener(StickyModelChangeListener) + */ + void removeStickyModelChangeListener(StickyModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/StickyModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,60 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import java.util.List; + +import org.jiemamy.spec.event.ModelChangeListener; +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.constraint.CheckConstraintModel; +import org.jiemamy.spec.model.index.IndexModel; +import org.jiemamy.spec.model.node.TableModel; + +/** + * TableModel用のListener + * + * @author shin1ogawa + */ +public interface TableModelChangeListener extends ModelChangeListener { + + /** + * {@link TableModel}が保持する{@link org.jiemamy.spec.model.constraint.CheckConstraintModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void checkCollectionChange(ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event); + + /** + * {@link TableModel}が保持する{@link org.jiemamy.spec.model.ColumnModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void columnCollectionChange(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event); + + /** + * {@link TableModel}が保持する{@link org.jiemamy.spec.model.index.IndexModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void indexCollectionChange(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event); + + /** + * {@link TableModel}が保持する{@link org.jiemamy.spec.model.ColumnModel}のCollectionに対する変更を処理する。 + * + * @param event + */ + void primaryKeyColumnCollectionChange(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,76 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import java.util.List; + +import org.jiemamy.spec.event.ObservableCollectionChangeEvent; +import org.jiemamy.spec.model.ColumnModel; +import org.jiemamy.spec.model.constraint.CheckConstraintModel; +import org.jiemamy.spec.model.index.IndexModel; + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、TableModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface TableModelChangeSupport { + + /** + * TableModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link TableModelChangeListener} + * @see #removeTableModelChangeListener(TableModelChangeListener) + */ + void addTableModelChangeListener(TableModelChangeListener l); + + /** + * checksのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireChecksCollectionChangeEvent( + ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event); + + /** + * columnsのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireColumnsCollectionChangeEvent(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event); + + /** + * indexesのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void fireIndexesCollectionChangeEvent(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event); + + /** + * primaryKeyColumnsのcollectionを監視するListenerに通知されたEventをTableModelの監視Listenerへ通知する。 + * + * @param event {@link ObservableCollectionChangeEvent} + */ + void firePrimaryKeyColumnsCollectionChangeEvent( + ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event); + + /** + * TableModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link TableModelChangeListener} + * @see #addTableModelChangeListener(TableModelChangeListener) + */ + void removeTableModelChangeListener(TableModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/TableModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeListener.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeListener.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeListener.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/06/29 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + +import org.jiemamy.spec.event.ModelChangeListener; + +/** + * ViewModel用のListener + * + * @author shin1ogawa + */ +public interface ViewModelChangeListener extends ModelChangeListener { + +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeListener.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeSupport.java =================================================================== --- zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeSupport.java (rev 0) +++ zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeSupport.java 2008-09-29 15:52:39 UTC (rev 1975) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. Created on 2008/07/02 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.jiemamy.spec.event.model.node; + + +/** + * Event関連の処理をModel内に直接記述するとModelのSourceの可読性が低くなるため、ViewModelからそれらを引き受ける。 + * + * @author shin1ogawa + */ +public interface ViewModelChangeSupport { + + /** + * ViewModel自身のEventを監視するListenerを追加する。 + * + * @param l {@link ViewModelChangeListener} + * @see #removeViewModelChangeListener(ViewModelChangeListener) + */ + void addViewModelChangeListener(ViewModelChangeListener l); + + /** + * ViewModel自身のEventを監視するListenerを削除する。 + * + * @param l {@link ViewModelChangeListener} + * @see #addViewModelChangeListener(ViewModelChangeListener) + */ + void removeViewModelChangeListener(ViewModelChangeListener l); +} Property changes on: zeus/trunk/org.jiemamy.spec.event/src/main/java/org/jiemamy/spec/event/model/node/ViewModelChangeSupport.java ___________________________________________________________________ Name: svn:mime-type + text/plain