Package aurelienribon.slidinglayout.SLConfig

Examples of aurelienribon.slidinglayout.SLConfig.Tile


      if (isPartOf(c, cmpsWithStartSide)) {
        cfg.getPanel().add(c, new Integer(1));
        startTiles.put(c, cfg.getTile(c).clone());
      } else {
        cmpsToAddAfterTransition.add(c);
        Tile t = cfg.getTile(c);
        c.setBounds(t.x, t.y, t.w, t.h);
        c.validate();
      }
    }

    // If old components have an end side, their target location will be
    // computed later, and they will be removed at the end of the
    //transition. Else, they are directly removed from the panel.
    for (Component c : oldCmps) {
      if (isPartOf(c, cmpsWithEndSide)) {
        cmpsToRemoveAfterTransition.add(c);
        targetTiles.put(c, prevKf.cfg.getTile(c).clone());
      } else {
        cfg.getPanel().remove(c);
      }
    }

    // Start/target locations are computed for new/old components
    // that have a start/end side set.
    for (SLSide s : SLSide.values()) {
      hideTiles(getTiles(cmpsWithStartSide.get(s), startTiles), s);
      hideTiles(getTiles(cmpsWithEndSide.get(s), targetTiles), s);
    }

    // New components with a start side are then placed at the location
    // computed above.
    for (Component c : startTiles.keySet()) {
      Tile t = startTiles.get(c);
      c.setBounds(t.x, t.y, t.w, t.h);
      c.validate();
    }
  }
View Full Code Here


    if (timeline != null) timeline.kill();

    timeline = Timeline.createParallel();

    for (Component c : kf.getCmps()) {
      Tile t = kf.getTarget(c);

      int dx = c.getX() - t.x;
      int dy = c.getY() - t.y;
      int dw = c.getWidth() - t.w;
      int dh = c.getHeight() - t.h;
View Full Code Here

TOP

Related Classes of aurelienribon.slidinglayout.SLConfig.Tile

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.