本文整理汇总了Java中java.beans.EventSetDescriptor.getName方法的典型用法代码示例。如果您正苦于以下问题:Java EventSetDescriptor.getName方法的具体用法?Java EventSetDescriptor.getName怎么用?Java EventSetDescriptor.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.beans.EventSetDescriptor
的用法示例。
在下文中一共展示了EventSetDescriptor.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _addEvent
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
private void _addEvent(
Hashtable<String, EventSetDescriptor> events,
EventSetDescriptor descriptor
)
{
String key = descriptor.getName() + descriptor.getListenerType();
if (descriptor.getName().equals("propertyChange"))
{
_propertyChangeSource = true;
}
EventSetDescriptor oldDescriptor = events.get(key);
if (oldDescriptor == null)
{
events.put(key, descriptor);
return;
}
EventSetDescriptor composite = _createMergedEventSetDescriptor(
oldDescriptor,
descriptor);
events.put(key, composite);
}
示例2: __createMergedEventSetStub
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
static EventSetDescriptor __createMergedEventSetStub(
EventSetDescriptor oldDescriptor,
MethodDescriptor[] listenerDescriptors
)
{
try
{
EventSetDescriptor stubDescriptor = new EventSetDescriptor(
oldDescriptor.getName(),
oldDescriptor.getListenerType(),
listenerDescriptors,
oldDescriptor.getAddListenerMethod(),
oldDescriptor.getRemoveListenerMethod());
// set the unicast attribute
stubDescriptor.setUnicast(oldDescriptor.isUnicast());
return stubDescriptor;
}
catch (Exception e)
{
// _LOG.severe(e);
return null;
}
}
示例3: BeanConnection
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
/**
* Creates a new <code>BeanConnection</code> instance.
*
* @param source the source bean
* @param target the target bean
* @param esd the EventSetDescriptor for the connection be displayed
*/
public BeanConnection(BeanInstance source, BeanInstance target,
EventSetDescriptor esd, Integer... tab) {
int tabIndex = 0;
if (tab.length > 0) {
tabIndex = tab[0].intValue();
}
Vector<BeanConnection> connections = TABBED_CONNECTIONS.get(tabIndex);
m_source = source;
m_target = target;
// m_sourceEsd = sourceEsd;
m_eventName = esd.getName();
// System.err.println(m_eventName);
// attempt to connect source and target beans
Method registrationMethod =
// m_sourceEsd.getAddListenerMethod();
// getSourceEventSetDescriptor().getAddListenerMethod();
esd.getAddListenerMethod();
Object targetBean = m_target.getBean();
Object[] args = new Object[1];
args[0] = targetBean;
Class<?> listenerClass = esd.getListenerType();
if (listenerClass.isInstance(targetBean)) {
try {
registrationMethod.invoke(m_source.getBean(), args);
// if the target implements BeanCommon, then inform
// it that it has been registered as a listener with a source via
// the named listener interface
if (targetBean instanceof BeanCommon) {
((BeanCommon) targetBean).connectionNotification(esd.getName(),
m_source.getBean());
}
connections.addElement(this);
} catch (Exception ex) {
System.err.println("[BeanConnection] Unable to connect beans");
ex.printStackTrace();
}
} else {
System.err.println("[BeanConnection] Unable to connect beans");
}
}
示例4: eventGeneratable
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
/**
* Returns true, if at the current time, the event described by the supplied
* event descriptor could be generated.
*
* @param esd an <code>EventSetDescriptor</code> value
* @return a <code>boolean</code> value
*/
public boolean eventGeneratable(EventSetDescriptor esd) {
String eventName = esd.getName();
return eventGeneratable(eventName);
}