Beispiel #1
0
  /** Type is the character command that toggles footprint visiblity */
  public void mySetType(String type) {
    final SequenceEncoder.Decoder st = new SequenceEncoder.Decoder(type, ';');
    st.nextToken();

    trailKey = st.nextKeyStroke(DEFAULT_TRAIL_KEY);
    menuCommand = st.nextToken(DEFAULT_MENU_COMMAND);
    initiallyVisible = st.nextBoolean(DEFAULT_INITIALLY_VISIBLE.booleanValue());
    globallyVisible = st.nextBoolean(DEFAULT_GLOBALLY_VISIBLE.booleanValue());
    circleRadius = st.nextInt(DEFAULT_CIRCLE_RADIUS);
    fillColor = st.nextColor(DEFAULT_FILL_COLOR);
    lineColor = st.nextColor(DEFAULT_LINE_COLOR);
    selectedTransparency = st.nextInt(DEFAULT_SELECTED_TRANSPARENCY);
    unSelectedTransparency = st.nextInt(DEFULT_UNSELECTED_TRANSPARENCY);
    edgePointBuffer = st.nextInt(DEFAULT_EDGE_POINT_BUFFER);
    edgeDisplayBuffer = st.nextInt(DEFAULT_EDGE_DISPLAY_BUFFER);
    lineWidth = st.nextDouble(LINE_WIDTH);

    commands = null;
    showTrailCommand = null;

    if (initiallyVisible) {
      localVisibility = true;
      globalVisibility = true;
    }
  }
Beispiel #2
0
 public void mySetState(String newState) {
   pointList.clear();
   final SequenceEncoder.Decoder ss = new SequenceEncoder.Decoder(newState, ';');
   globalVisibility = ss.nextBoolean(initiallyVisible);
   startMapId = ss.nextToken("");
   final int items = ss.nextInt(0);
   for (int i = 0; i < items; i++) {
     final String point = ss.nextToken("");
     if (point.length() != 0) {
       final SequenceEncoder.Decoder sp = new SequenceEncoder.Decoder(point, ',');
       final int x = sp.nextInt(0);
       final int y = sp.nextInt(0);
       pointList.add(new Point(x, y));
     }
   }
 }