Package org.jmol.script

Examples of org.jmol.script.Token


        return;
      }
      if (isBound(action, ACTION_popupMenu)) {
        char type = 'j';
        if (viewer.getModelkitMode()) {
          Token t = viewer.checkObjectClicked(x, y, Binding.getMouseAction(1,
              Binding.LEFT));
          type = (t != null && t.tok == Token.bonds ? 'b' : viewer
              .findNearestAtomIndex(x, y) >= 0 ? 'a' : 'm');
        }
        viewer.popupMenu(x, y, type);
View Full Code Here


    }
    Point3fi nearestPoint = null;
    int tokType = 0;
    // t.tok will let us know if this is an atom or a bond that was clicked
    if (!drawMode && !atomOnly) {
      Token t = viewer.checkObjectClicked(x, y, action);
      if (t != null) {
        tokType = t.tok;
        nearestPoint = (Point3fi) t.value;
      }
    }
View Full Code Here

    Shape shape;
    Point3fi pt = null;
    if ((shape = shapes[JmolConstants.SHAPE_ISOSURFACE]) != null
        && (viewer.getDrawPicking() || viewer.getNavigationMode() && viewer.getNavigateSurface())
         && (pt = shape.checkObjectClicked(x, y, modifiers, bsVisible)) != null)
      return new Token(Token.isosurface, pt);

    if (modifiers != 0 && viewer.getBondPicking()
        && (pt = shapes[JmolConstants.SHAPE_STICKS].checkObjectClicked(x, y,
            modifiers, bsVisible)) != null)
      return new Token(Token.bonds, pt);

    if ((shape = shapes[JmolConstants.SHAPE_ECHO])!= null && modifiers != 0
        && (pt = shape.checkObjectClicked(x, y, modifiers, bsVisible)) != null)
      return new Token(Token.echo, pt);
    if ((shape = shapes[JmolConstants.SHAPE_DRAW]) != null &&
        (pt = shape.checkObjectClicked(x, y, modifiers, bsVisible)) != null)
      return new Token(Token.draw, pt);
    return null;
  }
View Full Code Here

        if (propertyName.startsWith("property_")) {
          lt.text = propertyName;
          lt.tok = Token.data;
          lt.data = viewer.getDataFloat(lt.text);
        } else {
          Token token = Token.getTokenFromName(propertyName);
          if (token != null && isLabelPropertyTok(token.tok))
            lt.tok = token.tok;
        }
        ich = ichClose + 1;
        break;
View Full Code Here

TOP

Related Classes of org.jmol.script.Token

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.