Examples of Position


Examples of org.modeshape.common.text.Position

     *
     * @return the string content for characters bounded by the previous marked position and the position of the currentToken
     *         (inclusive).
     */
    public String getMarkedContent() {
        Position startPosition = new Position(currentMarkedPosition.getIndexInContent(), currentMarkedPosition.getLine(),
                                              currentMarkedPosition.getColumn());

        mark();

        return getContentBetween(startPosition, currentMarkedPosition);
View Full Code Here

Examples of org.olap4j.Position

    @Override
    public List<?> next() throws TranslatorException {
      if (!iterator.hasNext()) {
        return null;
      }
      Position nextRow = iterator.next();
      Object[] result = new Object[colWidth];
      int i = 0;
      // add in rows axis
    List<Member> members = nextRow.getMembers();
    for (Member member:members) {
      String columnName = member.getHierarchy().getName();
      result[i++] = columnName;
    }
View Full Code Here

Examples of org.openfaces.component.Position

        Styles.renderStyleClasses(context, fileUpload);

        int uploadedSize = 0;
        boolean duplicateAllowed = true;//fileUpload.isDuplicateAllowed();

        Position popupPosition = fileUpload.getPosition();

        List<String> listOfImages = new LinkedList<String>();
        String defStopUrl = null;
        if (fileUpload.getStopButtonNearProgress()) {
            if (stopButton == null) {
                defStopUrl = Resources.getURL(context, null, null, DEFAULT_STOP_URL);
                listOfImages.add(defStopUrl);
                Rendering.renderPreloadImagesScript(context, listOfImages, false);
            }
        }
        Script initScript = new ScriptBuilder().initScript(context, fileUpload, "O$.SingleFileUpload._init",
                uploadedSize,
                fileUpload.getNotUploadedStatusText(),
                fileUpload.getInProgressStatusText(),
                fileUpload.getUploadedStatusText(),
                fileUpload.getFileSizeLimitErrorText(),
                fileUpload.getUnexpectedErrorText(),
                fileUpload.getAcceptedFileTypes(),
                duplicateAllowed,
                clientId + BROWSE_BTN_ID,
                addButtonClass,
                addButtonOnMouseOverClass,
                addButtonOnMouseDownClass,
                addButtonOnFocusClass,
                addButtonDisabledClass,
                fileUpload.isDisabled(),
                fileUpload.getTabindex(),
                progressBar.getClientId(context),
                fileUpload.getStoppedStatusText(),
                fileUpload.getStoppingStatusText(),
                uniqueId,
                Utilities.getFunctionOfEvent(fileUpload.getOnchange()),
                Utilities.getFunctionOfEvent(fileUpload.getOnstart()),
                Utilities.getFunctionOfEvent(fileUpload.getOnend()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfilestart()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfileinprogress()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfileend()),
                Utilities.getFunctionOfEvent(fileUpload.getOnwrongfiletype()),
                Utilities.getFunctionOfEvent(fileUpload.getOndirectorydropped()),
                dropTargetDragoverClass,
                getRender(context, fileUpload),
                getExternalDropTargetId(context, fileUpload),
                fileUpload.getAcceptedMimeTypes(),
                fileUpload.getLayoutMode(),
                defStopUrl,
                getIconStyle(fileUpload, layoutMode),
                fileUpload.getShowInfoAfterUpload(),
                fileUpload.getBrowseButtonDuringUpload(),
                fileUpload.getStopButtonNearProgress(),
                fileUpload.getDirectoryDroppedText(),
                fileUpload.getWrongFileTypeText(),
                getExternalButtonId(context, fileUpload),
                fileUpload.getShowInPopup(),
                getPositionedBy(context, fileUpload),
                popupPosition.getHorizontalAlignment(),
                popupPosition.getVerticalAlignment(),
                popupPosition.getHorizontalDistance(),
                popupPosition.getVerticalDistance()
        );

        Rendering.renderInitScript(context, initScript,
                Resources.utilJsURL(context),
                Resources.jsonJsURL(context),
View Full Code Here

Examples of org.opengis.geometry.coordinate.Position

    assertTrue(Double.compare(uc.getOrdinate(0), Double.NaN) == 0);
    assertTrue(Double.compare(uc.getOrdinate(1), Double.NaN) == 0);
    assertTrue(Double.compare(uc.getOrdinate(2), Double.NaN) == 0);
   
    // public Position createPosition(DirectPosition dp);
    Position pos1 = cf.createPosition(dp2);
    assertTrue(pos1.getDirectPosition().getOrdinate(0) == 10.0);
    assertTrue(pos1.getDirectPosition().getOrdinate(1) == -115000.0);
    assertTrue(pos1.getDirectPosition().getOrdinate(2) == 0.0000000125);

    // public LineSegment createLineSegment(Position startPoint, Position endPoint);
    Position pos2 = cf.createPosition(dp1);
    LineSegment seg1 = cf.createLineSegment(pos1, pos2);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(0), Double.NaN) == 0.0);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(1), Double.NaN) == 0.0);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(2), Double.NaN) == 0.0);
    assertTrue(seg1.getStartPoint().getOrdinate(0) == 10.0);
View Full Code Here

Examples of org.opengis.temporal.Position

            }

            if (temporalCRS != null) {
                List<Position> envelopePositions = new LinkedList<Position>();

                Position beginning = new DefaultPosition(((DefaultTemporalCRS) temporalCRS).toDate(envelope.getLowerCorner().getOrdinate(envelope.getDimension() - 1)));
                Position ending = new DefaultPosition(((DefaultTemporalCRS) temporalCRS).toDate(envelope.getUpperCorner().getOrdinate(envelope.getDimension() - 1)));

                envelopePositions.add(beginning);
                envelopePositions.add(ending);

                return envelopePositions;
View Full Code Here

Examples of org.openhab.binding.astro.internal.model.Position

    double th = getSiderealTime(j, lw);

    double azimuth = getAzimuth(th, a, phi, d) / DEG2RAD;
    double elevation = getElevation(th, a, phi, d) / DEG2RAD;

    Position position = sun.getPosition();
    position.setAzimuth(azimuth + 180);
    position.setElevation(elevation);
  }
View Full Code Here

Examples of org.openmrs.module.drawing.Position

            String idString = attributes.getNamedItem("id").getNodeValue();
            String date = attributes.getNamedItem("date").getNodeValue();
            String userid = attributes.getNamedItem("userid").getNodeValue();
            String xcoordinate = attributes.getNamedItem("xcoordinate").getNodeValue();
            String ycoordinate = attributes.getNamedItem("ycoordinate").getNodeValue();
            Position position = new Position(Integer.parseInt(xcoordinate), Integer.parseInt(ycoordinate));
            User user = Context.getUserService().getUser(Integer.parseInt(userid));
            annotations.add(new ImageAnnotation(Integer.parseInt(idString), position, text, new Date(Long
                    .parseLong(date)), user, Status.UNCHANGED));
          }
          catch (NumberFormatException e) {
View Full Code Here

Examples of org.openscience.jchempaint.renderer.elements.TextGroupElement.Position

                         IAtom atom,
                         JChemPaintRendererModel model) {
        Stack<Position> unused = getUnusedPositions(ac, atom);
       
        if (!invisibleCarbon(atom, ac, model) && model.getDrawNumbers()) {
            Position position = getNextPosition(unused);
            String number = String.valueOf(ac.getAtomNumber(atom) + 1);
            textGroup.addChild(number, position);
        }
       
        if (
             (model.getShowImplicitHydrogens() && !invisibleCarbon(atom, ac, model))
             ||
             // Always show implicit hydrogens on end carbons
             (atom.getSymbol().equals("C") && model.getShowEndCarbons() && ac.getConnectedBondsList(atom).size() == 1)
            ) {
          if(atom.getImplicitHydrogenCount()!=null){
              int nH = atom.getImplicitHydrogenCount();
              if (nH > 0) {
                  Position position = getNextPosition(unused);
                  if (nH == 1) {
                      textGroup.addChild("H", position);
                  } else {
                      textGroup.addChild("H", String.valueOf(nH), position);
                  }
              }
          }
        }
       
        Integer massNumber = atom.getMassNumber();
        if (massNumber != null) {
            try {
                IsotopeFactory factory =
                    XMLIsotopeFactory.getInstance(ac.getBuilder());
                if(factory.getMajorIsotope(atom.getSymbol())!=null){
                  int majorMass =
                      factory.getMajorIsotope(atom.getSymbol()).getMassNumber();
                  if (massNumber != majorMass) {
                      Position position = getNextPosition(unused);
                      textGroup.addChild(String.valueOf(massNumber), position);
                  }
                }
            } catch (IOException io) {
               
            }
        }
       
        if(atom.getFormalCharge()!=0){
          String chargeString="";
          if (atom.getFormalCharge() == 1) {
              chargeString = "+";
          } else if (atom.getFormalCharge() > 1) {
              chargeString = atom.getFormalCharge() + "+";
          } else if (atom.getFormalCharge() == -1) {
              chargeString = "-";
          } else if (atom.getFormalCharge() < -1) {
              int absCharge = Math.abs(atom.getFormalCharge());
              chargeString = absCharge + "-";
          }
            Position position = getNextPosition(unused);
            textGroup.addChild(chargeString, position);
        }

        if(atom.getValency()!=null){
          String valencyString="(v"+atom.getValency().toString()+")";
            Position position = getNextPosition(unused);
            textGroup.addChild(valencyString, position);
        }
   
        if(atom.getProperty(CDKConstants.COMMENT)!=null){
            //Position position = getNextPosition(unused);
View Full Code Here

Examples of org.rometools.feed.module.georss.geometries.Position

            Element posElement = pointElement.getChild("pos", GeoRSSModule.GML_NS);
            if (posElement != null) {
                geoRSSModule = new GMLModuleImpl();
                String coordinates = posElement.getText();
                String[] coord = GeoRSSUtils.trimWhitespace(coordinates).split(" ");
                Position pos = new Position(Double.parseDouble(coord[0]), Double.parseDouble(coord[1]));
                geoRSSModule.setGeometry(new Point(pos));
            }
        } else if (lineStringElement != null) {
            Element posListElement = lineStringElement.getChild("posList", GeoRSSModule.GML_NS);
            if (posListElement != null) {
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.Position

   }
  
   public String getCurrentSlide()
   {
      // search starting two lines ahead
      Position cursorPos = docDisplay_.getCursorPosition();
      Position searchPos = Position.create(cursorPos.getRow()+2, 0);
      InputEditorSelection sel = docDisplay_.search(SLIDE_REGEX,
                                                true,
                                                false,
                                                false,
                                                false,
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.