issrg.utils.gui.xml
Class KnockOnEffectsMsgHandler

java.lang.Object
  extended by issrg.utils.gui.xml.KnockOnEffectsMsgHandler

public class KnockOnEffectsMsgHandler
extends java.lang.Object

The class is not intend for instantiate new object. It contains the logic to produce a explanatory warning message to the user if there are serious knock-on effects.

Author:
Cheng Chung Yang

Constructor Summary
KnockOnEffectsMsgHandler()
           
 
Method Summary
static int analyseEvent(XMLEditor xmlED, XMLChangeEvent ev)
          The mehtod ,firstly, analyze the XMLChangeEvent to determine if there is dependency in the updating sub-policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnockOnEffectsMsgHandler

public KnockOnEffectsMsgHandler()
Method Detail

analyseEvent

public static int analyseEvent(XMLEditor xmlED,
                               XMLChangeEvent ev)
The mehtod ,firstly, analyze the XMLChangeEvent to determine if there is dependency in the updating sub-policy. If so, invoke the corresponding private method to analyze the sub events list in the XMLChangeEvent to generate a explanatory warning message and send it to the user. In the end, return the decision of the user.

Parameters:
xmlED - the XMLEditor of the policy
ev - the XMLChangEvent being processed
Returns:
if there is a warning message, return decision of the user. otherwise, return JOptionPane.YES_OPTION.