|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--jp.gr.javacons.jim.DataReferencer
DataReferencer is the class of the object that is held as a property of a JIM GUI Bean and has the function of automatically establishing a reference relationship between the GUI Bean object and the DataHolder object to be referred. The process of establishing the reference relationship includes the following.
・ Acquisition of a reference to the DataHolder object from the DataReferencer object
・ Listener registration from the JIM GUI Bean to the DataHolder object
By acquiring a reference to the DataHolder object, a JIM GUI Bean is able to make update processing requests directly to the DataHolder object. By listener registration, events are informed to the JIM GUI Bean side corresponding to changes in the DataHolder object.
If the information to identify the DataHolder object (dataHolderName of the DataHolder object and dataProviderName of the DataProvider object which holds and maintains the DataHolder object) to which the DataReferencer object is to refer has been set, then at the time the DataReferencer object and the DataHolder object become available, the Manager object behaves as a mediator and automatically maintains the relationship between them.
In addition, the DataReferencerEditor is provided in the JIM framework for editing the property that holds the DataReferencer object. At design-time the application developer can specify the DataHolder object within the properties of the DataReferencer object in the JIM GUI Bean.
A JIM GUI Bean that holds a DataReferencer object(s) must implement the DataReferencerOwner interface.
Note) With component programming using JavaBeans, some methods in the container (applet) should use source code to describe the various relationships of the listener registration between Beans in the container. With the JIM framework, only the dataHolderName of the DataHolder object to be referred to and the dataProviderName of the DataProvider object that holds the DataHolder object need to be set in the DataReferencer object held in a Bean. Special source code to establish the relationship between the DataHolder object and the JIM GUI Bean is not necessary.
A JIM GUI Bean must implement a mechanism to reproduce the relationship in the setter method for the property holding the DataReferencer object and also in the addNotify method. It must also implement a mechanism to dissolve the relationship in the removeNotify method. The implementation examples are described in Section 8., "JIM GUI Bean".
コンストラクタの概要 | |
DataReferencer(DataReferencerOwner owner)
This creates a DataReferencer object using a DataReferencerOwner object (JIM GUI Bean) as an argument. |
|
DataReferencer(String dataProviderName,
String dataHolderName)
This creates a DataReferencer object using dataProviderName and dataHolderName as arguments. |
メソッドの概要 | |
void |
addedAsDataReferenceMaintainer()
This acquires the DataHolder object to be referred to using the character string information maintained by the DataReferencer to identify the DataHolder. |
void |
connect(DataReferencerOwner jimGUI)
This registers this DataReferencer object with the Manager object. |
void |
dataHolderAvailable(DataProvider dp,
DataHolder[] dhs)
This processes the reference relationship when the reference object is included in the arguments and no reference relationship has been established yet. |
void |
dataHolderRenamed(DataProvider dp,
DataHolder dh,
String newName,
String oldName)
If oldName corresponds to the character string that identifies a DataHolder object to be referred to and the reference relation has already been established, the character string is changed to newName. |
void |
dataHolderRevoked(DataProvider dp,
DataHolder[] dhs)
When the objects with a reference relationship are included in the arguments, this will dissolve the relationship. |
void |
dataProviderAvailable(DataProvider dp,
DataHolder[] dhs)
This processes the reference relationship when the reference object is included in the arguments and no reference relationship has been established yet. |
void |
dataProviderRenamed(DataProvider dp,
String newName,
String oldName)
If oldName corresponds to the character string that identifies the DataProvider object that holds the DataHolder object to be referred to and the reference relation has already been established, the character string is changed to newName. |
void |
dataProviderRevoked(DataProvider dp,
DataHolder[] dhs)
When the objects with a reference relationship are included in the arguments, this will dissolve the relationship. |
void |
disconnect(DataReferencerOwner jimGUI)
This deregisters this DataReferencer object from the Manager object. |
DataHolder |
getDataHolder()
This returns the DataHolder object that has a reference relationship. |
String |
getDataHolderName()
This returns the dataHolderName of the DataHolder object that should be referred to. |
String |
getDataProviderName()
This returns the dataProviderName of the DataProvider object that holds the DataHolder object to be referred to. |
Class[][] |
getReferableDataHolderTypeInfo()
This queries the owner of this DataReferencer object as to what DataHolder types can be referred to. |
void |
removedAsDataReferenceMaintainer()
The reference relation to the DataHolder object(s) is released. |
void |
setDataHolderID(String dataProviderName,
String dataHolderName)
|
String |
toString()
|
クラス java.lang.Object から継承したメソッド |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
コンストラクタの詳細 |
public DataReferencer(String dataProviderName, String dataHolderName)
dataProviderName
This character string information identifies the DataProvider object that holds the DataHolder object to be referred to. A null or empty string can be used to put it into a state with no reference to any DataHolder object.
dataHolderName
This character string information identifies the DataHolder object to be referred to. A null or empty string can be used to put it into a state with no reference to a DataHolder object.
public DataReferencer(DataReferencerOwner owner)
メソッドの詳細 |
public void addedAsDataReferenceMaintainer()
public void connect(DataReferencerOwner jimGUI)
public void dataHolderAvailable(DataProvider dp, DataHolder[] dhs)
Note) When Beans such as DataProvider Beans and JIM GUI Beans are recreated when starting the runtime application (applet), listener registration from a GUI Bean to a DataHolder object needs to be recreated. Specifically, even if either of the DataHolder object or DataReferencer object is reproduced in advance, the listener registration should be recreated correctly with the DataHolder object.
When a DataProvider Bean is recreated and becomes available, the Manager object calls the dataProviderAvailable method of the DataRefefencer object with the arguments of the DataProvider object and the DataHolder objects which is held by the DataProvider object if the DataReferencer object has already been created.
When a DataHolder object is added to a DataProvider object which has already been available, the Manager object calls the the dataHolderAvailable method of the DataReferencer object if it has already been recreated with a JIM GUI Bean.
public void dataHolderRenamed(DataProvider dp, DataHolder dh, String newName, String oldName)
This method is invoked when there is a change in the dataHolderName of the DataHolder object of the second argument, which is held by the DataProvider object of the first argument registered with the Manager object.
public void dataHolderRevoked(DataProvider dp, DataHolder[] dhs)
public void dataProviderAvailable(DataProvider dp, DataHolder[] dhs)
Note) When Beans such as DataProvider Beans and JIM GUI Beans are recreated when starting the runtime application (applet), listener registration from a GUI Bean to a DataHolder object needs to be recreated. Specifically, even if either of the DataHolder object or DataReferencer object is reproduced in advance, the listener registration should be recreated correctly with the DataHolder object.
When a DataProvider Bean is recreated and becomes available, the Manager object calls the dataProviderAvailable method of the DataRefefencer object with the arguments of the DataProvider object and the DataHolder objects which is held by the DataProvider object if the DataReferencer object has already been created.
When a DataHolder object is added to a DataProvider object which has already been available, the Manager object calls the the dataHolderAvailable method of the DataReferencer object if it has already been recreated with a JIM GUI Bean.
public void dataProviderRenamed(DataProvider dp, String newName, String oldName)
This method is invoked when there is a change in the dataProviderName of the DataProvider object of the first argument, which has been registered with the Manager object.
public void dataProviderRevoked(DataProvider dp, DataHolder[] dhs)
public void disconnect(DataReferencerOwner jimGUI)
public DataHolder getDataHolder()
public String getDataHolderName()
public String getDataProviderName()
public Class[][] getReferableDataHolderTypeInfo()
public void removedAsDataReferenceMaintainer()
This method is invoked at deregistration from the Manager object.
public void setDataHolderID(String dataProviderName, String dataHolderName)
public String toString()
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |