Package nl.lxtreme.ols.client.signaldisplay.signalelement

Examples of nl.lxtreme.ols.client.signaldisplay.signalelement.SignalElement


      {
        newGroup = newModel.addGroup( oldGroup.getName() );

        for ( SignalElement oldElement : oldGroup.getElements() )
        {
          SignalElement element;
          if ( oldElement.isDigitalSignal() )
          {
            int channelIdx = oldElement.getChannel().getIndex();
            if ( channelIdx >= newChannelList.length )
            {
              // Not in the new data...
              continue;
            }

            Channel newChannel = newChannelList[channelIdx];
            seenChannelIdxs.add( Integer.valueOf( channelIdx ) );

            element = createDigitalSignalElement( newChannel, newGroup );
            element.setSignalAlignment( oldElement.getSignalAlignment() );
            element.setSignalHeight( oldElement.getSignalHeight() );
          }
          else if ( oldElement.isAnalogSignal() )
          {
            element = createAnalogScopeElement( newGroup );
          }
          else if ( oldElement.isGroupSummary() )
          {
            element = createGroupSummaryElement( newGroup );
          }
          else
          {
            throw new RuntimeException( "Unknown/unhandled signal element: " + oldElement );
          }

          element.setColor( oldElement.getColor() );
          element.setEnabled( oldElement.isEnabled() );
          element.setHeight( oldElement.getHeight() );
          element.setLabel( oldElement.getLabel() );

          newModel.addSignalElement( newGroup, element );
        }
      }
View Full Code Here

TOP

Related Classes of nl.lxtreme.ols.client.signaldisplay.signalelement.SignalElement

Copyright © 2018 www.massapicom. 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.