예제 #1
0
 /** Inform simulation and editBox of new positions. */
 @Override
 public void dragged(Vec3d dist) {
   KeywordIndex kw =
       InputAgent.formatPointsInputs(pointsInput.getKeyword(), pointsInput.getValue(), dist);
   InputAgent.apply(this, kw);
   super.dragged(dist);
 }
예제 #2
0
  @Override
  public HasScreenPoints.PointsInfo[] getScreenPoints() {
    synchronized (screenPointLock) {
      if (cachedPointInfo == null) {
        cachedPointInfo = new HasScreenPoints.PointsInfo[1];
        HasScreenPoints.PointsInfo pi = new HasScreenPoints.PointsInfo();
        cachedPointInfo[0] = pi;

        pi.points = pointsInput.getValue();
        pi.color = colourInput.getValue();
        pi.width = widthInput.getValue().intValue();
        if (pi.width < 1) pi.width = 1;
      }
      return cachedPointInfo;
    }
  }