Package org.mt4j.components

Examples of org.mt4j.components.MTComponent.addStateChangeListener()


              MTComponent mtCurrentComp = (MTComponent)currentComp;
             
///////////////////////////////             
              // Listen to destroy events of the clustered components, to remove them from
              // the cluster and pack the polygon.
              mtCurrentComp.addStateChangeListener(StateChange.COMPONENT_DESTROYED, new StateChangeListener(){
                public void stateChanged(StateChangeEvent evt) {
                  if (evt.getSource() instanceof MTComponent) {
                    MTComponent sourceComp = (MTComponent) evt.getSource();
                   
                    //Remove component from cluster it is in
View Full Code Here


  public synchronized void addClusterable(IdragClusterable selectable){
    dragSelectables.add(selectable);
    if (selectable instanceof MTComponent) {
      MTComponent baseComp = (MTComponent) selectable;

      baseComp.addStateChangeListener(StateChange.COMPONENT_DESTROYED, new StateChangeListener(){
        public void stateChanged(StateChangeEvent evt) {
          if (evt.getSource() instanceof IdragClusterable) {
            IdragClusterable clusterAble = (IdragClusterable) evt.getSource();
            removeClusterable(clusterAble);
            //logger.debug("Removed comp from clustergesture analyzers tracking");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.