Examples of Led


Examples of eu.hansolo.enzo.led.Led

        if (Double.compare(getSkinnable().getMaxWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getMaxHeight(), 0.0) <=0) {
            getSkinnable().setMaxSize(MAXIMUM_SIZE, MAXIMUM_SIZE);
        }

        for(int i = 0 ; i < getSkinnable().getNoOfLeds() ; i++) {
            Led led = LedBuilder.create()
                                .frameVisible(getSkinnable().isFrameVisible())
                                .prefWidth(getSkinnable().getLedSize())
                                .prefHeight(getSkinnable().getLedSize())
                                .build();
            ledList.add(led);
View Full Code Here

Examples of eu.hansolo.enzo.led.Led

        if (Double.compare(getSkinnable().getMaxWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getMaxHeight(), 0.0) <=0) {
            getSkinnable().setMaxSize(MAXIMUM_SIZE, MAXIMUM_SIZE);
        }

        for(int i = 0 ; i < getSkinnable().getNoOfLeds() ; i++) {
            Led led = LedBuilder.create()
                                .frameVisible(getSkinnable().isFrameVisible())
                                .prefWidth(getSkinnable().getLedSize())
                                .prefHeight(getSkinnable().getLedSize())
                                .build();
            ledList.add(led);
View Full Code Here

Examples of org.contikios.cooja.interfaces.LED

    }

    @Override
    public void doAction(Visualizer visualizer, Mote mote) {
      Simulation simulation = mote.getSimulation();
      LED led = mote.getInterfaces().getLED();
      if (led == null) {
        return;
      }

      /* Extract description (input to plugin) */
 
View Full Code Here

Examples of org.contikios.cooja.interfaces.LED

  public void paintAfterMotes(Graphics g) {
    /* Paint LEDs left of each mote */
    Mote[] allMotes = simulation.getMotes();
    for (Mote mote: allMotes) {
      LED leds = mote.getInterfaces().getLED();
      if (leds == null) {
        continue;
      }

      Position pos = mote.getInterfaces().getPosition();
      Point pixel = visualizer.transformPositionToPixel(pos);

      int x = pixel.x - 2*Visualizer.MOTE_RADIUS;
     
      int y = pixel.y - Visualizer.MOTE_RADIUS;
      g.setColor(Color.RED);
      if (leds.isRedOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }

      y += 6;
      g.setColor(Color.GREEN);
      if (leds.isGreenOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }

      y += 6;
      g.setColor(Color.BLUE);
      if (leds.isYellowOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }
    }
View Full Code Here

Examples of org.contikios.cooja.interfaces.LED

    }
  }

  private void addMoteObservers(final Mote mote, final MoteEvents moteEvents) {
    /* LEDs */
    final LED moteLEDs = mote.getInterfaces().getLED();
    if (moteLEDs != null) {
      LEDEvent startupEv = new LEDEvent(
          simulation.getSimulationTime(),
          moteLEDs.isRedOn(),
          moteLEDs.isGreenOn(),
          moteLEDs.isYellowOn()
      );
      moteEvents.addLED(startupEv);
      Observer observer = new Observer() {
        public void update(Observable o, Object arg) {
          LEDEvent ev = new LEDEvent(
              simulation.getSimulationTime(),
              moteLEDs.isRedOn(),
              moteLEDs.isGreenOn(),
              moteLEDs.isYellowOn()
          );

          moteEvents.addLED(ev);
        }
      };

      moteLEDs.addObserver(observer);
      activeMoteObservers.add(new MoteObservation(mote, moteLEDs, observer));
    }

    /* Radio OnOff, RXTX, and channels */
    final Radio moteRadio = mote.getInterfaces().getRadio();
View Full Code Here

Examples of org.contikios.cooja.interfaces.LED

    }

    @Override
    public void doAction(Visualizer visualizer, Mote mote) {
      Simulation simulation = mote.getSimulation();
      LED led = mote.getInterfaces().getLED();
      if (led == null) {
        return;
      }

      /* Extract description (input to plugin) */
 
View Full Code Here

Examples of org.eclipse.gef.examples.logicdesigner.model.LED

  } else if (oldPart instanceof Circuit) {
    newPart = new Circuit();
  } else if (oldPart instanceof GroundOutput) {
    newPart = new GroundOutput();
  } else if (oldPart instanceof LED) {
    newPart = new LED();
    newPart.setPropertyValue(LED.P_VALUE, oldPart.getPropertyValue(LED.P_VALUE));
  } else if (oldPart instanceof LiveOutput) {
    newPart = new LiveOutput();
  } else if (oldPart instanceof LogicLabel) {
    newPart = new LogicLabel();
View Full Code Here

Examples of se.glockner.raspberrypi.Led

    private Led checkMailLed;
   
    public void startApp() {
        try{
            checkButton = new Button(17, "CheckMail Button");
            newMailLed = new Led(18, "New Mail Arrived");
            checkMailLed = new Led(23, "Checking Mail");
           
            checkButton.setInputListener(new PinListener(){
                public void valueChanged(PinEvent event){
                    System.out.println(checkButton);
                    checkMailLed.on();
View Full Code Here

Examples of se.sics.cooja.interfaces.LED

  }

  public void setInactive() {
    simulation.deleteObserver(simObserver);
    for (Mote mote: simulation.getMotes()) {
      LED led = mote.getInterfaces().getLED();
      if (led != null) {
        led.deleteObserver(ledObserver);
      }
    }
  }
View Full Code Here

Examples of se.sics.cooja.interfaces.LED

  public void paintSkin(Graphics g) {
    /* Paint LEDs left of each mote */
    Mote[] allMotes = simulation.getMotes();
    for (Mote mote: allMotes) {
      LED leds = mote.getInterfaces().getLED();
      if (leds == null) {
        continue;
      }

      Position pos = mote.getInterfaces().getPosition();
      Point pixel = visualizer.transformPositionToPixel(pos);

      int x = pixel.x - 2*Visualizer.MOTE_RADIUS;
     
      int y = pixel.y - Visualizer.MOTE_RADIUS;
      g.setColor(Color.RED);
      if (leds.isRedOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }

      y += 6;
      g.setColor(Color.GREEN);
      if (leds.isGreenOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }

      y += 6;
      g.setColor(Color.BLUE);
      if (leds.isYellowOn()) {
        g.fillRect(x, y, 7, 4);
      } else {
        g.drawRect(x, y, 7, 4);
      }

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.