com.altair.hwm.toolkit.binding
Class HWMBindingPopupFactory

java.lang.Object
  extended by com.altair.hwm.toolkit.binding.HWMBindingPopupFactory

public class HWMBindingPopupFactory
extends java.lang.Object

Title: HWMBindingPopupFactory

Description: This class creates popupmenus for binding beans.

Company: Altair Engineering, Inc.


Constructor Summary
HWMBindingPopupFactory()
           
 
Method Summary
 javax.swing.JPopupMenu CreateEventTargetPopup(java.beans.BeanInfo beanInfo, java.lang.String strMethName, java.beans.EventSetDescriptor eventTarget)
          Creates a popup for an event target with 'no param' methods and matching event sets.
 javax.swing.JPopupMenu CreatePropertyTargetPopup(java.beans.BeanInfo beanInfo, java.lang.Class classPropertyType)
          Creates a popupmenu for a component.
 javax.swing.JPopupMenu CreateSourcePopup(java.beans.BeanInfo beanInfo)
          Creates a popupmenu for a component.
 boolean IsTargetMethodValid(java.lang.reflect.Method methTarget, java.lang.reflect.Method methListener)
          Compares the method - with methListener.
 void setMenuItemListener(java.awt.event.ActionListener listenerMenuItem)
          Set the listener for menu item events
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMBindingPopupFactory

public HWMBindingPopupFactory()
Method Detail

CreateSourcePopup

public javax.swing.JPopupMenu CreateSourcePopup(java.beans.BeanInfo beanInfo)
Creates a popupmenu for a component.

Parameters:
beanInfo - The property, event, and method info
Returns:
JPopupMenu

IsTargetMethodValid

public boolean IsTargetMethodValid(java.lang.reflect.Method methTarget,
                                   java.lang.reflect.Method methListener)
Compares the method - with methListener. Returns true if methTarget takes 0 args or same (# and type) as the methListener

Parameters:
methTarget - The method to compare
methListener - The lsietner method
Returns:
boolean true if the method takes either 0 args or same args as listener method.

CreateEventTargetPopup

public javax.swing.JPopupMenu CreateEventTargetPopup(java.beans.BeanInfo beanInfo,
                                                     java.lang.String strMethName,
                                                     java.beans.EventSetDescriptor eventTarget)
Creates a popup for an event target with 'no param' methods and matching event sets.

Parameters:
beanInfo - The target bean's info
strMethodName - The listener method which is called
eventTarget - The source EventSetDescriptor
Returns:
JPopupMenu The dynamically created popup menu.

CreatePropertyTargetPopup

public javax.swing.JPopupMenu CreatePropertyTargetPopup(java.beans.BeanInfo beanInfo,
                                                        java.lang.Class classPropertyType)
Creates a popupmenu for a component.

Parameters:
beanInfo - The property, event, and method info
classPropertyType - If property binding, then the class of the property, else just pass null and event binding is assumed
Returns:
JPopupMenu

setMenuItemListener

public void setMenuItemListener(java.awt.event.ActionListener listenerMenuItem)
Set the listener for menu item events

Parameters:
ActionListener - The listener for menu item events. (See Java help for more info)