Examples of Position


Examples of org.sbml.jsbml.ext.layout.Position

    else if (contextObject instanceof BoundingBox)
    {
      BoundingBox bbox = (BoundingBox) contextObject;

      if (elementName.equals(position)) {
        Position position = new Position();
        bbox.setPosition(position);

        return position;
      }
      else if (elementName.equals(dimensions)) {
View Full Code Here

Examples of org.swtchart.IAxis.Position

            if (layoutData.titleLayoutdata == null
                    || layoutData.tickLabelsLayoutdata == null
                    || layoutData.tickMarksLayoutdata == null) {
                continue;
            }
            Position position = axis.getPosition();
            if (position == Position.Primary && axis.isHorizontalAxis()) {
                layoutBottomAxis(r, layoutData);
            } else if (position == Position.Secondary
                    && axis.isHorizontalAxis()) {
                layoutTopAxis(r, layoutData);
View Full Code Here

Examples of org.traccar.model.Position

        if (!parser.matches()) {
            return null;
        }

        // Create new position
        Position position = new Position();
        ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(getProtocol());
        Integer index = 1;

        // Get device by IMEI
        String imei = parser.group(index++);
        try {
            position.setDeviceId(getDataManager().getDeviceByImei(imei).getId());
        } catch(Exception error) {
            // Compatibility mode (remove in future)
            try {
                position.setDeviceId(getDataManager().getDeviceByImei("000" + imei).getId());
            } catch(Exception error2) {
                Log.warning("Unknown device - " + imei);
                return null;
            }
        }

        // Date
        Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        time.clear();
        if (parser.group(index++) == null) {
            time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));
            time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);
            time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));
        } else {
            time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));
            time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);
            time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));
        }

        // Validity
        position.setValid(parser.group(index++).compareTo("A") == 0);

        // Latitude
        Double latitude = Double.valueOf(parser.group(index++));
        latitude += Double.valueOf(parser.group(index++)) / 60;
        if (parser.group(index++).compareTo("S") == 0) latitude = -latitude;
        position.setLatitude(latitude);

        // Longitude
        Double longitude = Double.valueOf(parser.group(index++));
        longitude += Double.valueOf(parser.group(index++)) / 60;
        if (parser.group(index++).compareTo("W") == 0) longitude = -longitude;
        position.setLongitude(longitude);

        // Altitude
        position.setAltitude(0.0);

        // Speed
        position.setSpeed(Double.valueOf(parser.group(index++)) * 0.539957);

        // Time
        time.set(Calendar.HOUR_OF_DAY, Integer.valueOf(parser.group(index++)));
        time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));
        time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));
        position.setTime(time.getTime());

        // Course
        position.setCourse(Double.valueOf(parser.group(index++)));
       
        // State
        extendedInfo.set("state", parser.group(index++));

        // Milage
        String milage = parser.group(index++);
        if (milage != null) {
            extendedInfo.set("milage", Integer.parseInt(milage, 16));
        }

        position.setExtendedInfo(extendedInfo.toString());
        return position;
    }
View Full Code Here

Examples of org.uberfire.workbench.model.Position

                                                          null );
        final WidgetArea westWidgetArea = new WidgetArea( westWidget,
                                                          null );
        final WidgetArea centreWidgetArea = new WidgetArea( centreWidget,
                                                            null );
        Position p = Position.NONE;
        if ( northWidgetArea.intersects( l ) ) {
            p = Position.NORTH;
        } else if ( southWidgetArea.intersects( l ) ) {
            p = Position.SOUTH;
        } else if ( eastWidgetArea.intersects( l ) ) {
View Full Code Here

Examples of org.waxeye.ast.Position

                                        value = res.get(0);
                                        break;
                                    }
                                    default:
                                    {
                                        value = new AST<E>(type, res, new Position(startPos, input.getPosition()));
                                        break;
                                    }
                                }
                                break;
                            }
                            default:
                            {
                                value = new AST<E>(type, res, new Position(startPos, input.getPosition()));
                                break;
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.zkoss.ganttz.data.Position

            public boolean accepts(Object object) {
                return accepts((Task) object);
            }

            private boolean accepts(Task task) {
                Position position = context.getMapper().findPositionFor(task);
                if (position.isAtTop()) {
                    return true;
                } else {
                    for (TaskContainer taskContainer : position.getAncestors()) {
                        if (!taskContainer.isExpanded()) {
                            return false;
                        }
                    }
                    return true;
View Full Code Here

Examples of org.zkoss.zss.ui.Position

    }
    focusOut = true;
   
    handleCellText();
   
    Position pos = bookCtrl.getCellFocus();
    int row = pos.getRow();
    int col = pos.getColumn();
    int oldrow = currentEditcell == null ? -1 : currentEditcell.getRowIndex();
    int oldcol = currentEditcell == null ? -1 : currentEditcell.getColumnIndex();
    final boolean focusChanged = (row != oldrow || col != oldcol); //user click directly to a different cell
    if (!focusChanged) {
      if (everTab != null) { //Tab key
View Full Code Here

Examples of pl.michalostruszka.gameoflife.cell.Position

    private static Set<Position> currentCellNeighbours() {
        Set<Position> expectedNeighbours = new HashSet<Position>();
        int[][] neighboursRelativeCoords = {{0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}};
        for (int[] coords : neighboursRelativeCoords) {
            expectedNeighbours.add(new Position(coords[0], coords[1]));
        }
        return expectedNeighbours;
    }
View Full Code Here

Examples of polyglot.util.Position

    public String file() {
        return file;
    }

    private Position pos() {
        return new Position(file, yyline+1, yycolumn, yyline+1, yycolumn+yytext().length());
    }
View Full Code Here

Examples of pong.common.Position

    this.listener = new KeyboardListener();
    this.window.setFocusable(true);
    this.roundWon = new Integer[2];
    this.position = new Position[3];
    for (int i = 0; i < 3; i++) {
      this.position[i] = new Position();
    }
    this.state = State.GETTING_SERVER_INFORMATION;
  }
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.