jbackup/src/main/java/org/jbundle/jbackup/MainPropertyView.java
public void actionPerformed(ActionEvent e)
	{
		PropertyOwner propOwner = null;
		String strClass = null;
		Object objClass = null;
		if (e.getSource() == m_buttonSource)
		{
			strClass = m_properties.getProperty(Scanner.SOURCE_PARAM);
			objClass = Util.makeObjectFromClassName(Object.class.getName(), SOURCE_PARAM, strClass);
			if (objClass instanceof BaseSource)	// Always
				((BaseSource)objClass).init(m_properties);
		}
		else if (e.getSource() == m_buttonDestination)
		{
			strClass = m_properties.getProperty(Scanner.DESTINATION_PARAM);
			objClass = Util.makeObjectFromClassName(Object.class.getName(), DESTINATION_PARAM, strClass);
			if (objClass instanceof BaseDestination)	// Always
				((BaseDestination)objClass).init(m_properties);
		}
		if (objClass instanceof PropertyOwner)
			propOwner = (PropertyOwner)objClass;
		if (propOwner != null)
		{
			this.controlsToProperties();
			PropertyView panel = propOwner.getPropertyView(m_properties);
			if (panel == null)	// Default
				panel = new PropertyView(m_propOwner, m_properties);
			if (JOptionPane.showConfirmDialog(null, panel, panel.getDescription(), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
			{
				panel.controlsToProperties();
				propOwner.setProperties(m_properties);	// Send the property owner the new settings
			}
		}
	}
public void actionPerformed(ActionEvent e)
	{
		PropertyOwner propOwner = null;
		String strClass = null;
		Object objClass = null;
		if (e.getSource() == m_buttonSource)
		{
			strClass = m_properties.getProperty(Scanner.SOURCE_PARAM);
			objClass = Util.makeObjectFromClassName(Object.class.getName(), SOURCE_PARAM, strClass);
			if (objClass instanceof BaseSource)	// Always
				((BaseSource)objClass).init(m_properties);
		}
		else if (e.getSource() == m_buttonDestination)
		{
			strClass = m_properties.getProperty(Scanner.DESTINATION_PARAM);
			objClass = Util.makeObjectFromClassName(Object.class.getName(), DESTINATION_PARAM, strClass);
			if (objClass instanceof BaseDestination)	// Always
				((BaseDestination)objClass).init(m_properties);
		}
		if (objClass instanceof PropertyOwner)
			propOwner = (PropertyOwner)objClass;
		if (propOwner != null)
		{
			this.controlsToProperties();
			PropertyView panel = propOwner.getPropertyView(m_properties);
			if (panel == null)	// Default
				panel = new PropertyView(m_propOwner, m_properties);
			if (JOptionPane.showConfirmDialog(null, panel, panel.getDescription(), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
			{
				panel.controlsToProperties();
				propOwner.setProperties(m_properties);	// Send the property owner the new settings
			}
		}
	}
public void actionPerformed ( ActionEvent e ) { PropertyOwner propOwner = null ; String strClass = null ; Object objClass = null ; if ( e . getSource ( ) == m_buttonSource ) { strClass = m_properties . getProperty ( Scanner . SOURCE_PARAM ) ; objClass = Util . makeObjectFromClassName ( Object . class . getName ( ) , SOURCE_PARAM , strClass ) ; if ( objClass instanceof BaseSource ) // Always ( ( BaseSource ) objClass ) . init ( m_properties ) ; } else if ( e . getSource ( ) == m_buttonDestination ) { strClass = m_properties . getProperty ( Scanner . DESTINATION_PARAM ) ; objClass = Util . makeObjectFromClassName ( Object . class . getName ( ) , DESTINATION_PARAM , strClass ) ; if ( objClass instanceof BaseDestination ) // Always ( ( BaseDestination ) objClass ) . init ( m_properties ) ; } if ( objClass instanceof PropertyOwner ) propOwner = ( PropertyOwner ) objClass ; if ( propOwner != null ) { this . controlsToProperties ( ) ; PropertyView panel = propOwner . getPropertyView ( m_properties ) ; if ( panel == null ) // Default panel = new PropertyView ( m_propOwner , m_properties ) ; if ( JOptionPane . showConfirmDialog ( null , panel , panel . getDescription ( ) , JOptionPane . OK_CANCEL_OPTION ) == JOptionPane . OK_OPTION ) { panel . controlsToProperties ( ) ; propOwner . setProperties ( m_properties ) ; // Send the property owner the new settings } } }
/*
User pressed a button.
/ * User pressed a button .