예제 #1
0
 private void createMarks(List<Mark> acc, Mark.ENTRY_PART part, String text, int firstMissing) {
   char[] chars = text.toCharArray();
   int i = firstMissing;
   while ((i = editorFont.canDisplayUpTo(chars, i, chars.length)) != -1) {
     int cp = Character.codePointAt(chars, i);
     int start = i;
     i += Character.charCount(cp);
     Font font = FontFallbackManager.getCapableFont(cp);
     if (font == null) {
       continue;
     }
     // Look ahead to try to group as many characters as possible into this run.
     for (int cpn, ccn, j = i; j < chars.length; j += ccn) {
       cpn = Character.codePointAt(chars, j);
       ccn = Character.charCount(cpn);
       if (!editorFont.canDisplay(cpn) && font.canDisplay(cpn)) {
         i += ccn;
       } else {
         break;
       }
     }
     Mark m = new Mark(part, start, i);
     m.attributes = getAttributes(font);
     acc.add(m);
   }
 }
예제 #2
0
 private void recurse(Element element) {
   ElementAction action = classifyElement(element);
   if (action == ElementAction.Whitespace || action == ElementAction.Sentence) {
     appendSpace();
   }
   for (Node childNode : element.childNodes()) {
     // n.b., cdata not possible if we are coming from TagSoup. If we also handle
     // real xhtml by directly parsing it, then we have another story on our hands.
     // though we could use canonical XML to get rid of them.
     if (childNode instanceof TextNode && action != ElementAction.Banned) {
       TextNode textContent = (TextNode) childNode;
       String textString = textContent.text();
       append(textContent, textString);
     } else if (childNode instanceof Element) {
       recurse((Element) childNode);
     }
   }
   if (action == ElementAction.Whitespace) {
     appendSpace();
   } else if (action == ElementAction.Sentence) {
     appendPeriod();
   } else if (action == ElementAction.Mark) {
     Mark mark = new Mark();
     mark.setOffset(pcDataOffset);
     mark.setTag(element.tagName());
   }
 }
예제 #3
0
 /**
  * Starts the timer. If the timer is already running it will over-write the start time and message
  * and most likley make the existing marks meaningless. To re-use an existing stopwatch call reset
  * first.
  *
  * @param message The header for the series of timings
  */
 public void start(String message) {
   if (!disable) {
     start = new Mark();
     start.msg = message;
     start.time = System.currentTimeMillis();
   }
 }
예제 #4
0
 protected void finalize() throws Throwable {
   try {
     startMark.remove();
     endMark.remove();
   } catch (InvalidMarkException e) {
   }
   super.finalize();
 }
예제 #5
0
 /**
  * Adds a time marker and a message associated with the marker.
  *
  * @param message The message which will be printed with this mark
  */
 public void setMark(String message) {
   if (!disable) {
     Mark mark = new Mark();
     mark.msg = message;
     mark.time = System.currentTimeMillis();
     marks.add(mark);
   }
 }
예제 #6
0
파일: Main.java 프로젝트: omusico/bisag-gis
  @SuppressWarnings("unchecked")
  private static Style createStyle(SimpleFeatureSource source, String fieldName) throws Exception {

    StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory();
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();

    Function colourFn = ff.function("colorlookup", ff.literal(source), ff.property(fieldName));

    Stroke stroke =
        styleFactory.createStroke(
            colourFn,
            ff.literal(1.0f), // line
            // width
            ff.literal(1.0f)); // opacity

    Fill fill = styleFactory.createFill(colourFn, ff.literal(1.0f)); // opacity

    Class<?> geomClass = source.getSchema().getGeometryDescriptor().getType().getBinding();
    Symbolizer sym = null;
    Geometries geomType = Geometries.getForBinding((Class<? extends Geometry>) geomClass);

    switch (geomType) {
      case POLYGON:
      case MULTIPOLYGON:
        sym = styleFactory.createPolygonSymbolizer(stroke, fill, null);
        break;

      case LINESTRING:
      case MULTILINESTRING:
        sym = styleFactory.createLineSymbolizer(stroke, null);
        break;

      case POINT:
      case MULTIPOINT:
        Graphic gr = styleFactory.createDefaultGraphic();
        gr.graphicalSymbols().clear();
        Mark mark = styleFactory.getCircleMark();
        mark.setFill(fill);
        mark.setStroke(stroke);
        gr.graphicalSymbols().add(mark);
        gr.setSize(ff.literal(10.0f));
        sym = styleFactory.createPointSymbolizer(gr, null);
        break;

      default:
        throw new IllegalArgumentException("Unsupported geometry type");
    }

    Style style = SLD.wrapSymbolizers(sym);

    return style;
  }
예제 #7
0
 OutlineSpan prevSection(Node before) {
   for (Leaf l = before.getPrevLeaf(); l != null; l = l.getPrevLeaf()) {
     for (int i = l.sizeSticky() - 1; i >= 0; i--) { // doesn't matte
       Mark m = l.getSticky(i);
       Object owner = m.getOwner();
       if (owner instanceof OutlineSpan && ((OutlineSpan) owner).getStart() == m) {
         return (OutlineSpan) owner;
         // System.out.println("found next active = "+l.getNextLeaf()+", owner="+owner);
       }
     }
   }
   return null;
 }
예제 #8
0
 OutlineSpan nextSection(Node after) {
   for (Leaf l = after.getNextLeaf(); l != null; l = l.getNextLeaf()) {
     for (int i = 0, imax = l.sizeSticky(); i < imax; i++) {
       Mark m = l.getSticky(i);
       Object owner = m.getOwner();
       if (owner instanceof OutlineSpan && ((OutlineSpan) owner).getStart() == m) {
         return (OutlineSpan) owner;
         // System.out.println("found next active = "+l.getNextLeaf()+", owner="+owner);
       }
     }
   }
   return null;
 }
 @Override
 protected void nodeCutPaste(BasicNode child) throws IOException {
   CoreEntity e = child.getEntity();
   if (e instanceof Mark) {
     Mark f = (Mark) e;
     f.getParent().removeMark(f);
     getEntity().addMark(f);
     return;
   }
   throw new LogicException(
       "MarkRoot Entity does not have a child of the requested class ("
           + e.getClass().getSimpleName()
           + ")");
 }
예제 #10
0
 /** Get end offset of this element */
 public final int getEndOffset() {
   try {
     return endMark.getOffset();
   } catch (InvalidMarkException e) {
     return 0;
   }
 }
예제 #11
0
 /** Get start offset of this element */
 public final int getStartOffset() {
   try {
     return startMark.getOffset();
   } catch (InvalidMarkException e) {
     return 0;
   }
 }
예제 #12
0
 private void assertNextLine(String[] line, CharSeeker seeker, Mark mark, Extractors extractors)
     throws IOException {
   for (String value : line) {
     assertTrue(seeker.seek(mark, delimiter));
     assertEquals(value, seeker.extract(mark, extractors.string()).value());
   }
   assertTrue(mark.isEndOfLine());
 }
예제 #13
0
 public void deleteSelection() {
   ArrayList<Mark> mlist = new ArrayList<Mark>(selectedMarks);
   if (mlist.size() == 0) {
     JOptionPane.showMessageDialog(
         this,
         "You haven't selected any marks to delete. "
             + "Click on a mark to select it, then try deleting again.");
     return;
   }
   for (Mark m : mlist) {
     selectedMarks.remove(m);
     m.getTrack().remove(m);
     removeChannelEventForMark(m);
     m.getTrack().revalidate();
     m.getTrack().repaint();
   }
 }
예제 #14
0
  public static Document createProgrammatically(ArrayList<Mark> data) {
    Document doc = null;
    try {
      // DocumentBuilder instanzieren
      DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

      // Document-Instanz erzeugen
      doc = docBuilder.newDocument();
    } catch (ParserConfigurationException e) {
      e.printStackTrace();
    }

    if (null != doc) {
      // Root-Element erzeugen
      Element marks = doc.createElement("marks");
      // Element anfügen
      doc.appendChild(marks);

      for (Iterator<Mark> it = data.iterator(); it.hasNext(); ) {
        Mark mark1 = it.next();

        // Noten-Element erzeugen
        Element mark = doc.createElement("mark");
        // Fach-Element erzeugen
        Element subject = doc.createElement("prNr");
        // Fach-Note erzeugen
        Element note = doc.createElement("note");

        // Fach
        subject.setTextContent(mark1.getPrNr());
        // Note
        note.setTextContent(Integer.toString(mark1.getMark()));

        // Noten-Element hinzufügen
        marks.appendChild(mark);
        // Fach-Element hinzufügen
        mark.appendChild(subject);
        // Fach-Note hinzufügen
        mark.appendChild(note);
      }
    }

    // Document-Instanz zurückgeben
    return doc;
  }
 @Override
 protected void nodeCopyPaste(BasicNode child) throws IOException {
   CoreEntity e = child.getEntity();
   if (e instanceof Mark) {
     Mark.getEM().getNew((Mark) e, getEntity());
     return;
   }
   throw new LogicException(
       "MarkRoot Entity does not have a child of the requested class ("
           + e.getClass().getSimpleName()
           + ")");
 }
예제 #16
0
 /** Create new document instance */
 public LeafElement(
     BaseDocument doc,
     BaseElement parent,
     AttributeSet attrs,
     int startOffset,
     int endOffset,
     boolean bol,
     boolean eol) {
   super(doc, parent, attrs);
   this.bol = bol;
   this.eol = eol;
   // create marks for element start and end
   try {
     startMark = new Mark(true);
     endMark = new Mark(false);
     startMark.insert(doc, startOffset);
     endMark.insert(doc, endOffset);
   } catch (BadLocationException e) {
     Utilities.annotateLoggable(e);
   } catch (InvalidMarkException e) {
     throw new IllegalStateException(e.toString());
   }
 }
예제 #17
0
 /**
  * デッキを初期化する
  *
  * @param ジョーカーの数
  */
 public Deck(int numberOfJoker) {
   this.cardList = new ArrayList<Card>();
   // 1 から 13 までの数のすべてのマークのカードをデッキに追加する
   for (Mark mark : Mark.values()) {
     if (mark == Mark.JOKER) {
       continue;
     }
     for (int num = 1; num <= 13; num++) {
       this.cardList.add(new Card(mark, num));
     }
   }
   // ジョーカーをデッキに追加する
   for (int i = 0; i < numberOfJoker; i++) {
     this.cardList.add(new Card(Mark.JOKER));
   }
   shuffle();
 }
예제 #18
0
 public boolean hasOmega() {
   for (Mark m : this.marking.getMarking()) {
     if (m.getTokens() >= 1000000000) return true;
   }
   return false;
 }
예제 #19
0
  private static <T extends AbstractJaxb> void execute(T target, Pattern pattern) {

    TagEnum tagEnum = TagEnum.valueOf(target.getClass().getSimpleName().toUpperCase());

    switch (tagEnum) {
      case A:
        A a = (A) target;
        if (idMatch(a.getId(), pattern)) {
          a.setId(null);
        }
        unsetAllIdWithinObjectList(a.getContent(), pattern);
        break;
      case ABBR:
        Abbr abbr = (Abbr) target;
        if (idMatch(abbr.getId(), pattern)) {
          abbr.setId(null);
        }
        unsetAllIdWithinObjectList(abbr.getContent(), pattern);
        break;
      case ACRONYM:
        Acronym acronym = (Acronym) target;
        if (idMatch(acronym.getId(), pattern)) {
          acronym.setId(null);
        }
        unsetAllIdWithinObjectList(acronym.getContent(), pattern);
        break;
      case ADDRESS:
        Address address = (Address) target;
        if (idMatch(address.getId(), pattern)) {
          address.setId(null);
        }
        unsetAllIdWithinObjectList(address.getContent(), pattern);
        break;
      case APPLET:
        Applet applet = (Applet) target;
        if (idMatch(applet.getId(), pattern)) {
          applet.setId(null);
        }
        unsetAllIdWithinObjectList(applet.getContent(), pattern);
        break;
      case AREA:
        Area area = (Area) target;
        if (idMatch(area.getId(), pattern)) {
          area.setId(null);
        }
        // area is empty element.
        break;
      case B:
        B b = (B) target;
        if (idMatch(b.getId(), pattern)) {
          b.setId(null);
        }
        unsetAllIdWithinObjectList(b.getContent(), pattern);
        break;
      case BASE:
        Base base = (Base) target;
        if (idMatch(base.getId(), pattern)) {
          base.setId(null);
        }
        // empty element.
        break;
      case BASEFONT:
        Basefont basefont = (Basefont) target;
        if (idMatch(basefont.getId(), pattern)) {
          basefont.setId(null);
        }
        // empty element.
        break;
      case BDO:
        Bdo bdo = (Bdo) target;
        if (idMatch(bdo.getId(), pattern)) {
          bdo.setId(null);
        }
        unsetAllIdWithinObjectList(bdo.getContent(), pattern);
        break;
      case BIG:
        Big big = (Big) target;
        if (idMatch(big.getId(), pattern)) {
          big.setId(null);
        }
        unsetAllIdWithinObjectList(big.getContent(), pattern);
        break;
      case BLOCKQUOTE:
        Blockquote blockquote = (Blockquote) target;
        if (idMatch(blockquote.getId(), pattern)) {
          blockquote.setId(null);
        }
        unsetAllIdWithinObjectList(blockquote.getContent(), pattern);
        break;
      case BODY:
        Body body = (Body) target;
        if (idMatch(body.getId(), pattern)) {
          body.setId(null);
        }
        unsetAllIdWithinObjectList(body.getContent(), pattern);
        break;
      case BR:
        Br br = (Br) target;
        if (idMatch(br.getId(), pattern)) {
          br.setId(null);
        }
        // empty element.
        break;
      case BUTTON:
        Button button = (Button) target;
        if (idMatch(button.getId(), pattern)) {
          button.setId(null);
        }
        unsetAllIdWithinObjectList(button.getContent(), pattern);
        break;
      case CAPTION:
        Caption caption = (Caption) target;
        if (idMatch(caption.getId(), pattern)) {
          caption.setId(null);
        }
        unsetAllIdWithinObjectList(caption.getContent(), pattern);
        break;
      case CENTER:
        Center center = (Center) target;
        if (idMatch(center.getId(), pattern)) {
          center.setId(null);
        }
        unsetAllIdWithinObjectList(center.getContent(), pattern);
        break;
      case CITE:
        Cite cite = (Cite) target;
        if (idMatch(cite.getId(), pattern)) {
          cite.setId(null);
        }
        unsetAllIdWithinObjectList(cite.getContent(), pattern);
        break;
      case CODE:
        Code code = (Code) target;
        if (idMatch(code.getId(), pattern)) {
          code.setId(null);
        }
        unsetAllIdWithinObjectList(code.getContent(), pattern);
        break;
      case COL:
        Col col = (Col) target;
        if (idMatch(col.getId(), pattern)) {
          col.setId(null);
        }
        // empty element.
        break;
      case COLGROUP:
        Colgroup colgroup = (Colgroup) target;
        if (idMatch(colgroup.getId(), pattern)) {
          colgroup.setId(null);
        }
        for (Col tmpcol : colgroup.getCol()) {
          execute(tmpcol, pattern);
        }
        break;
      case DD:
        Dd dd = (Dd) target;
        if (idMatch(dd.getId(), pattern)) {
          dd.setId(null);
        }
        unsetAllIdWithinObjectList(dd.getContent(), pattern);
        break;
      case DEL:
        Del del = (Del) target;
        if (idMatch(del.getId(), pattern)) {
          del.setId(null);
        }
        unsetAllIdWithinObjectList(del.getContent(), pattern);
        break;
      case DFN:
        Dfn dfn = (Dfn) target;
        if (idMatch(dfn.getId(), pattern)) {
          dfn.setId(null);
        }
        unsetAllIdWithinObjectList(dfn.getContent(), pattern);
        break;
      case DIR:
        Dir dir = (Dir) target;
        if (idMatch(dir.getId(), pattern)) {
          dir.setId(null);
        }
        for (Li tmpli : dir.getLi()) {
          execute(tmpli, pattern);
        }
        break;
      case DIV:
        Div div = (Div) target;
        if (idMatch(div.getId(), pattern)) {
          div.setId(null);
        }
        unsetAllIdWithinObjectList(div.getContent(), pattern);
        break;
      case DL:
        Dl dl = (Dl) target;
        if (idMatch(dl.getId(), pattern)) {
          dl.setId(null);
        }
        for (AbstractJaxb aj : dl.getDtOrDd()) {
          execute(aj, pattern);
        }
        break;
      case DT:
        Dt dt = (Dt) target;
        if (idMatch(dt.getId(), pattern)) {
          dt.setId(null);
        }
        unsetAllIdWithinObjectList(dt.getContent(), pattern);
        break;
      case EM:
        Em em = (Em) target;
        if (idMatch(em.getId(), pattern)) {
          em.setId(null);
        }
        unsetAllIdWithinObjectList(em.getContent(), pattern);
        break;
      case FIELDSET:
        Fieldset fieldset = (Fieldset) target;
        if (idMatch(fieldset.getId(), pattern)) {
          fieldset.setId(null);
        }
        unsetAllIdWithinObjectList(fieldset.getContent(), pattern);
        break;
      case FONT:
        Font font = (Font) target;
        if (idMatch(font.getId(), pattern)) {
          font.setId(null);
        }
        unsetAllIdWithinObjectList(font.getContent(), pattern);
        break;
      case FORM:
        Form form = (Form) target;
        if (idMatch(form.getId(), pattern)) {
          form.setId(null);
        }
        unsetAllIdWithinObjectList(form.getContent(), pattern);
        break;
      case H1:
        H1 h1 = (H1) target;
        if (idMatch(h1.getId(), pattern)) {
          h1.setId(null);
        }
        unsetAllIdWithinObjectList(h1.getContent(), pattern);
        break;
      case H2:
        H2 h2 = (H2) target;
        if (idMatch(h2.getId(), pattern)) {
          h2.setId(null);
        }
        unsetAllIdWithinObjectList(h2.getContent(), pattern);
        break;
      case H3:
        H3 h3 = (H3) target;
        if (idMatch(h3.getId(), pattern)) {
          h3.setId(null);
        }
        unsetAllIdWithinObjectList(h3.getContent(), pattern);
        break;
      case H4:
        H4 h4 = (H4) target;
        if (idMatch(h4.getId(), pattern)) {
          h4.setId(null);
        }
        unsetAllIdWithinObjectList(h4.getContent(), pattern);
        break;
      case H5:
        H5 h5 = (H5) target;
        if (idMatch(h5.getId(), pattern)) {
          h5.setId(null);
        }
        unsetAllIdWithinObjectList(h5.getContent(), pattern);
        break;
      case H6:
        H6 h6 = (H6) target;
        if (idMatch(h6.getId(), pattern)) {
          h6.setId(null);
        }
        unsetAllIdWithinObjectList(h6.getContent(), pattern);
        break;
      case HGROUP:
        Hgroup hgroup = (Hgroup) target;
        if (idMatch(hgroup.getId(), pattern)) {
          hgroup.setId(null);
        }
        for (AbstractJaxb aj : hgroup.getH1OrH2OrH3()) {
          execute(aj, pattern);
        }
        break;
      case HEAD:
        Head head = (Head) target;
        if (idMatch(head.getId(), pattern)) {
          head.setId(null);
        }
        for (AbstractJaxb aj : head.getContent()) {
          execute(aj, pattern);
        }
        break;
      case HR:
        Hr hr = (Hr) target;
        if (idMatch(hr.getId(), pattern)) {
          hr.setId(null);
        }
        // hr is empty element.
        break;
      case HTML:
        Html html = (Html) target;
        if (idMatch(html.getId(), pattern)) {
          html.setId(null);
        }
        execute(html.getHead(), pattern);
        execute(html.getBody(), pattern);
        break;
      case I:
        I i = (I) target;
        if (idMatch(i.getId(), pattern)) {
          i.setId(null);
        }
        unsetAllIdWithinObjectList(i.getContent(), pattern);
        break;
      case IFRAME:
        Iframe iframe = (Iframe) target;
        if (idMatch(iframe.getId(), pattern)) {
          iframe.setId(null);
        }
        unsetAllIdWithinObjectList(iframe.getContent(), pattern);
        break;
      case IMG:
        Img img = (Img) target;
        if (idMatch(img.getId(), pattern)) {
          img.setId(null);
        }
        // img is empty element.
        break;
      case INPUT:
        Input input = (Input) target;
        if (idMatch(input.getId(), pattern)) {
          input.setId(null);
        }
        // input is empty element.
        break;
      case INS:
        Ins ins = (Ins) target;
        if (idMatch(ins.getId(), pattern)) {
          ins.setId(null);
        }
        unsetAllIdWithinObjectList(ins.getContent(), pattern);
        break;
      case ISINDEX:
        Isindex isindex = (Isindex) target;
        if (idMatch(isindex.getId(), pattern)) {
          isindex.setId(null);
        }
        // empty element.
        break;
      case KBD:
        Kbd kbd = (Kbd) target;
        if (idMatch(kbd.getId(), pattern)) {
          kbd.setId(null);
        }
        unsetAllIdWithinObjectList(kbd.getContent(), pattern);
        break;
      case LABEL:
        Label label = (Label) target;
        if (idMatch(label.getId(), pattern)) {
          label.setId(null);
        }
        unsetAllIdWithinObjectList(label.getContent(), pattern);
        break;
      case LEGEND:
        Legend legend = (Legend) target;
        if (idMatch(legend.getId(), pattern)) {
          legend.setId(null);
        }
        unsetAllIdWithinObjectList(legend.getContent(), pattern);
        break;
      case LI:
        Li li = (Li) target;
        if (idMatch(li.getId(), pattern)) {
          li.setId(null);
        }
        unsetAllIdWithinObjectList(li.getContent(), pattern);
        break;
      case LINK:
        Link link = (Link) target;
        if (idMatch(link.getId(), pattern)) {
          link.setId(null);
        }
        // empty element.
        break;
      case MAIN:
        Main main = (Main) target;
        if (idMatch(main.getId(), pattern)) {
          main.setId(null);
        }
        unsetAllIdWithinObjectList(main.getContent(), pattern);
        break;
      case MAP:
        Map map = (Map) target;
        if (idMatch(map.getId(), pattern)) {
          map.setId(null);
        }
        for (Area tmpArea : map.getArea()) {
          execute(tmpArea, pattern);
        }
        break;
      case MENU:
        Menu menu = (Menu) target;
        if (idMatch(menu.getId(), pattern)) {
          menu.setId(null);
        }
        unsetAllIdWithinObjectList(menu.getContent(), pattern);
        break;
      case META:
        Meta meta = (Meta) target;
        if (idMatch(meta.getId(), pattern)) {
          meta.setId(null);
        }
        // empty element.
        break;
      case NOFRAMES:
        Noframes noframes = (Noframes) target;
        if (idMatch(noframes.getId(), pattern)) {
          noframes.setId(null);
        }
        unsetAllIdWithinObjectList(noframes.getContent(), pattern);
        break;
      case NOSCRIPT:
        Noscript noscript = (Noscript) target;
        if (idMatch(noscript.getId(), pattern)) {
          noscript.setId(null);
        }
        unsetAllIdWithinObjectList(noscript.getContent(), pattern);
        break;
      case OBJECT:
        org.mixer2.jaxb.xhtml.Object object = (org.mixer2.jaxb.xhtml.Object) target;
        if (idMatch(object.getId(), pattern)) {
          object.setId(null);
        }
        unsetAllIdWithinObjectList(object.getContent(), pattern);
        break;
      case OL:
        Ol ol = (Ol) target;
        if (idMatch(ol.getId(), pattern)) {
          ol.setId(null);
        }
        for (Li tmpli : ol.getLi()) {
          execute(tmpli, pattern);
        }
        break;
      case OPTGROUP:
        Optgroup optgroup = (Optgroup) target;
        if (idMatch(optgroup.getId(), pattern)) {
          optgroup.setId(null);
        }
        for (Option tmpOption : optgroup.getOption()) {
          execute(tmpOption, pattern);
        }
        break;
      case OPTION:
        Option option = (Option) target;
        if (idMatch(option.getId(), pattern)) {
          option.setId(null);
        }
        // option tag includes no other element.
        break;
      case P:
        P p = (P) target;
        if (idMatch(p.getId(), pattern)) {
          p.setId(null);
        }
        unsetAllIdWithinObjectList(p.getContent(), pattern);
        break;
      case PARAM:
        Param param = (Param) target;
        if (idMatch(param.getId(), pattern)) {
          param.setId(null);
        }
        // empty element.
        break;
      case PRE:
        Pre pre = (Pre) target;
        if (idMatch(pre.getId(), pattern)) {
          pre.setId(null);
        }
        unsetAllIdWithinObjectList(pre.getContent(), pattern);
        break;
      case Q:
        Q q = (Q) target;
        if (idMatch(q.getId(), pattern)) {
          q.setId(null);
        }
        unsetAllIdWithinObjectList(q.getContent(), pattern);
        break;
      case S:
        S s = (S) target;
        if (idMatch(s.getId(), pattern)) {
          s.setId(null);
        }
        unsetAllIdWithinObjectList(s.getContent(), pattern);
        break;
      case SAMP:
        Samp samp = (Samp) target;
        if (idMatch(samp.getId(), pattern)) {
          samp.setId(null);
        }
        unsetAllIdWithinObjectList(samp.getContent(), pattern);
        break;
      case SCRIPT:
        Script script = (Script) target;
        if (idMatch(script.getId(), pattern)) {
          script.setId(null);
        }
        // script include no other element.
        break;
      case SELECT:
        Select select = (Select) target;
        if (idMatch(select.getId(), pattern)) {
          select.setId(null);
        }
        for (AbstractJaxb aj : select.getOptgroupOrOption()) {
          execute(aj, pattern);
        }
        break;
      case SMALL:
        Small small = (Small) target;
        if (idMatch(small.getId(), pattern)) {
          small.setId(null);
        }
        unsetAllIdWithinObjectList(small.getContent(), pattern);
        break;
      case SPAN:
        Span span = (Span) target;
        if (idMatch(span.getId(), pattern)) {
          span.setId(null);
        }
        unsetAllIdWithinObjectList(span.getContent(), pattern);
        break;
      case STRIKE:
        Strike strike = (Strike) target;
        if (idMatch(strike.getId(), pattern)) {
          strike.setId(null);
        }
        unsetAllIdWithinObjectList(strike.getContent(), pattern);
        break;
      case STRONG:
        Strong strong = (Strong) target;
        if (idMatch(strong.getId(), pattern)) {
          strong.setId(null);
        }
        unsetAllIdWithinObjectList(strong.getContent(), pattern);
        break;
      case STYLE:
        Style style = (Style) target;
        if (idMatch(style.getId(), pattern)) {
          style.setId(null);
        }
        // has no other element.
        break;
      case SUB:
        Sub sub = (Sub) target;
        if (idMatch(sub.getId(), pattern)) {
          sub.setId(null);
        }
        unsetAllIdWithinObjectList(sub.getContent(), pattern);
        break;
      case SUP:
        Sup sup = (Sup) target;
        if (idMatch(sup.getId(), pattern)) {
          sup.setId(null);
        }
        unsetAllIdWithinObjectList(sup.getContent(), pattern);
        break;
      case TABLE:
        Table table = (Table) target;
        if (idMatch(table.getId(), pattern)) {
          table.setId(null);
        }
        if (table.isSetCaption()) {
          execute(table.getCaption(), pattern);
        }
        for (Col tmpCol : table.getCol()) {
          execute(tmpCol, pattern);
        }
        for (Colgroup tmpColgroup : table.getColgroup()) {
          execute(tmpColgroup, pattern);
        }
        for (Tbody tmpTbody : table.getTbody()) {
          execute(tmpTbody, pattern);
        }
        if (table.isSetThead()) {
          execute(table.getThead(), pattern);
        }
        if (table.isSetTfoot()) {
          execute(table.getTfoot(), pattern);
        }
        for (Tr tmpTr : table.getTr()) {
          execute(tmpTr, pattern);
        }
        break;
      case TBODY:
        Tbody tbody = (Tbody) target;
        if (idMatch(tbody.getId(), pattern)) {
          tbody.setId(null);
        }
        for (Tr tmpTr : tbody.getTr()) {
          execute(tmpTr, pattern);
        }
        break;
      case TD:
        Td td = (Td) target;
        if (idMatch(td.getId(), pattern)) {
          td.setId(null);
        }
        unsetAllIdWithinObjectList(td.getContent(), pattern);
        break;
      case TEXTAREA:
        Textarea textarea = (Textarea) target;
        if (idMatch(textarea.getId(), pattern)) {
          textarea.setId(null);
        }
        // textarea has no other element.
        break;
      case TFOOT:
        Tfoot tfoot = (Tfoot) target;
        if (idMatch(tfoot.getId(), pattern)) {
          tfoot.setId(null);
        }
        for (Tr tmpTr : tfoot.getTr()) {
          execute(tmpTr, pattern);
        }
        break;
      case TH:
        Th th = (Th) target;
        if (idMatch(th.getId(), pattern)) {
          th.setId(null);
        }
        unsetAllIdWithinObjectList(th.getContent(), pattern);
        break;
      case THEAD:
        Thead thead = (Thead) target;
        if (idMatch(thead.getId(), pattern)) {
          thead.setId(null);
        }
        for (Tr tmpTr : thead.getTr()) {
          execute(tmpTr, pattern);
        }
        break;
      case TITLE:
        Title title = (Title) target;
        if (idMatch(title.getId(), pattern)) {
          title.setId(null);
        }
        // has no other element.
        break;
      case TR:
        Tr tr = (Tr) target;
        if (idMatch(tr.getId(), pattern)) {
          tr.setId(null);
        }
        for (AbstractJaxb aj : tr.getThOrTd()) {
          execute(aj, pattern);
        }
        break;
      case TT:
        Tt tt = (Tt) target;
        if (idMatch(tt.getId(), pattern)) {
          tt.setId(null);
        }
        unsetAllIdWithinObjectList(tt.getContent(), pattern);
        break;
      case U:
        U u = (U) target;
        if (idMatch(u.getId(), pattern)) {
          u.setId(null);
        }
        unsetAllIdWithinObjectList(u.getContent(), pattern);
        break;
      case UL:
        Ul ul = (Ul) target;
        if (idMatch(ul.getId(), pattern)) {
          ul.setId(null);
        }
        for (Li tmpLi : ul.getLi()) {
          execute(tmpLi, pattern);
        }
        break;
      case VAR:
        Var var = (Var) target;
        if (idMatch(var.getId(), pattern)) {
          var.setId(null);
        }
        unsetAllIdWithinObjectList(var.getContent(), pattern);
        break;
      case ARTICLE:
        Article article = (Article) target;
        if (idMatch(article.getId(), pattern)) {
          article.setId(null);
        }
        unsetAllIdWithinObjectList(article.getContent(), pattern);
        break;
      case ASIDE:
        Aside aside = (Aside) target;
        if (idMatch(aside.getId(), pattern)) {
          aside.setId(null);
        }
        unsetAllIdWithinObjectList(aside.getContent(), pattern);
        break;
      case AUDIO:
        Audio audio = (Audio) target;
        if (idMatch(audio.getId(), pattern)) {
          audio.setId(null);
        }
        unsetAllIdWithinObjectList(audio.getContent(), pattern);
        break;
      case BDI:
        Bdi bdi = (Bdi) target;
        if (idMatch(bdi.getId(), pattern)) {
          bdi.setId(null);
        }
        unsetAllIdWithinObjectList(bdi.getContent(), pattern);
        break;
      case CANVAS:
        Canvas canvas = (Canvas) target;
        if (idMatch(canvas.getId(), pattern)) {
          canvas.setId(null);
        }
        unsetAllIdWithinObjectList(canvas.getContent(), pattern);
        break;
      case COMMAND:
        Command command = (Command) target;
        if (idMatch(command.getId(), pattern)) {
          command.setId(null);
        }
        // empty element
        break;
      case DATALIST:
        Datalist datalist = (Datalist) target;
        if (idMatch(datalist.getId(), pattern)) {
          datalist.setId(null);
        }
        unsetAllIdWithinObjectList(datalist.getContent(), pattern);
        break;
      case DETAILS:
        Details details = (Details) target;
        if (idMatch(details.getId(), pattern)) {
          details.setId(null);
        }
        unsetAllIdWithinObjectList(details.getContent(), pattern);
        break;
      case EMBED:
        Embed embed = (Embed) target;
        if (idMatch(embed.getId(), pattern)) {
          embed.setId(null);
        }
        // empty element
        break;
      case FIGCAPTION:
        Figcaption figcaption = (Figcaption) target;
        if (idMatch(figcaption.getId(), pattern)) {
          figcaption.setId(null);
        }
        unsetAllIdWithinObjectList(figcaption.getContent(), pattern);
        break;
      case FIGURE:
        Figure figure = (Figure) target;
        if (idMatch(figure.getId(), pattern)) {
          figure.setId(null);
        }
        unsetAllIdWithinObjectList(figure.getContent(), pattern);
        break;
      case FOOTER:
        Footer footer = (Footer) target;
        if (idMatch(footer.getId(), pattern)) {
          footer.setId(null);
        }
        unsetAllIdWithinObjectList(footer.getContent(), pattern);
        break;
      case HEADER:
        Header header = (Header) target;
        if (idMatch(header.getId(), pattern)) {
          header.setId(null);
        }
        unsetAllIdWithinObjectList(header.getContent(), pattern);
        break;
      case KEYGEN:
        Keygen keygen = (Keygen) target;
        if (idMatch(keygen.getId(), pattern)) {
          keygen.setId(null);
        }
        // empty element
        break;
      case MARK:
        Mark mark = (Mark) target;
        if (idMatch(mark.getId(), pattern)) {
          mark.setId(null);
        }
        unsetAllIdWithinObjectList(mark.getContent(), pattern);
        break;
      case METER:
        Meter meter = (Meter) target;
        if (idMatch(meter.getId(), pattern)) {
          meter.setId(null);
        }
        unsetAllIdWithinObjectList(meter.getContent(), pattern);
        break;
      case NAV:
        Nav nav = (Nav) target;
        if (idMatch(nav.getId(), pattern)) {
          nav.setId(null);
        }
        unsetAllIdWithinObjectList(nav.getContent(), pattern);
        break;
      case OUTPUT:
        Output output = (Output) target;
        if (idMatch(output.getId(), pattern)) {
          output.setId(null);
        }
        unsetAllIdWithinObjectList(output.getContent(), pattern);
        break;
      case PROGRESS:
        Progress progress = (Progress) target;
        if (idMatch(progress.getId(), pattern)) {
          progress.setId(null);
        }
        unsetAllIdWithinObjectList(progress.getContent(), pattern);
        break;
      case RP:
        Rp rp = (Rp) target;
        if (idMatch(rp.getId(), pattern)) {
          rp.setId(null);
        }
        unsetAllIdWithinObjectList(rp.getContent(), pattern);
        break;
      case RT:
        Rt rt = (Rt) target;
        if (idMatch(rt.getId(), pattern)) {
          rt.setId(null);
        }
        unsetAllIdWithinObjectList(rt.getContent(), pattern);
        break;
      case RUBY:
        Ruby ruby = (Ruby) target;
        if (idMatch(ruby.getId(), pattern)) {
          ruby.setId(null);
        }
        unsetAllIdWithinObjectList(ruby.getContent(), pattern);
        break;
      case SECTION:
        Section section = (Section) target;
        if (idMatch(section.getId(), pattern)) {
          section.setId(null);
        }
        unsetAllIdWithinObjectList(section.getContent(), pattern);
        break;
      case SOURCE:
        Source source = (Source) target;
        if (idMatch(source.getId(), pattern)) {
          source.setId(null);
        }
        break;
      case SUMMARY:
        Summary summary = (Summary) target;
        if (idMatch(summary.getId(), pattern)) {
          summary.setId(null);
        }
        unsetAllIdWithinObjectList(summary.getContent(), pattern);
        break;
      case TIME:
        Time time = (Time) target;
        if (idMatch(time.getId(), pattern)) {
          time.setId(null);
        }
        unsetAllIdWithinObjectList(time.getContent(), pattern);
        break;
      case TRACK:
        Track track = (Track) target;
        if (idMatch(track.getId(), pattern)) {
          track.setId(null);
        }
        // empty element
        break;
      case VIDEO:
        Video video = (Video) target;
        if (idMatch(video.getId(), pattern)) {
          video.setId(null);
        }
        unsetAllIdWithinObjectList(video.getContent(), pattern);
        break;
      case WBR:
        Wbr wbr = (Wbr) target;
        if (idMatch(wbr.getId(), pattern)) {
          wbr.setId(null);
        }
        // empty element
        break;
    }
  }
 /** Sets scale mark to scale */
 @Override
 public void putMark(final Mark mark, final int markPosition) {
   int markY = (this.barHeight - mark.getMarkHeight()) / 2;
   this.absPanel.add(mark, this.startPosition + markPosition + drag.getOffsetWidth() / 2, markY);
 }
예제 #21
0
 public void gameWasWon(Mark mark) {
   Window.alert("Game won by " + mark.toString());
 }
예제 #22
0
  void jbInit() throws Exception {
    //
    pmIcon_ = new PlotMarkIcon(1);
    {
      String[] tempString = new String[3];
      tempString[0] = "NO_HEAD";
      tempString[1] = "HEAD";
      tempString[2] = "SCALED_HEAD";
      for (int i = 0; i < tempString.length; i++) {
        vectorStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[2];
      tempString[0] = "NO_MARK";
      tempString[1] = "MARK";
      for (int i = 0; i < tempString.length; i++) {
        originStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[3];
      tempString[0] = "BUTT";
      tempString[1] = "ROUND";
      tempString[2] = "SQUARE";
      for (int i = 0; i < tempString.length; i++) {
        capStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[3];
      tempString[0] = "MITER";
      tempString[1] = "ROUND";
      tempString[2] = "BEVEL";
      for (int i = 0; i < tempString.length; i++) {
        miterStyleCBM.addElement(tempString[i]);
      }
    }
    getContentPane().setLayout(new BorderLayout(0, 0));
    setSize(500, 490);
    setVisible(false);
    buttonPanel.setBorder(etchedBorder1);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    vectorMaxSizeTextField.setColumns(8);
    vectorScaleTextField.setColumns(8);
    JLabel5.setText("Style:");
    colorPanel.setBorder(etchedBorder1);
    colorPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    JLabel1.setText("Color:");
    offsetAngleTextField.setColumns(8);
    vectorStyleComboBox.setModel(vectorStyleCBM);
    vectorStyleComboBox.addActionListener(
        new VectorAttributeDialog_vectorStyleComboBox_actionAdapter(this));
    jLabel7.setText("Offset Angle:");
    jLabel6.setText("Max Size:");
    jLabel5.setText("Scale:");
    vectorPanel.setLayout(gridBagLayout2);
    jLabel11.setText("Fixed Size:");
    jLabel10.setText("Max Size:");
    headMinSizeTextField.setColumns(8);
    jLabel9.setText("Min Size:");
    jLabel8.setText("Scale:");
    headScaleTextField.setColumns(8);
    headMaxSizeTextField.setColumns(8);
    headFixedSizeTextField.setColumns(8);
    headPanel.setLayout(gridBagLayout4);
    markHeightTextField.setColumns(8);
    originStyleComboBox.setModel(originStyleCBM);
    JLabel12.setText("Color:");
    JLabel7.setText("Mark Height:");
    JLabel6.setText("Mark:");
    markPanel.setLayout(new GridBagLayout());
    markEditor.addActionListener(new VectorAttributeDialog_markEditor_actionAdapter(this));
    markEditor.setActionCommand("...");
    //    markEditor.setMargin(new Insets(0, 0, 0, 0));
    markColorPanel.setBorder(etchedBorder1);
    Mark.setLayout(gridBagLayout3);
    jLabel4.setText("Style:");
    plotMarkIconLabel.setForeground(java.awt.Color.black);
    plotMarkIconLabel.setIcon(pmIcon_);
    miterLimitTextField.setColumns(8);
    JLabel10.setText(" Width:");
    strokePanel.setLayout(gridBagLayout1);
    miterStyleComboBox.setModel(miterStyleCBM);
    jLabel3.setText("Miter Limit:");
    jLabel2.setText("Miter Style:");
    jLabel1.setText("Cap Style:");
    capStyleComboBox.setModel(capStyleCBM);
    widthTextField.setColumns(8);
    getContentPane().add(buttonPanel, "South");
    buttonPanel.setBounds(0, 263, 430, 39);
    okButton.setText("OK");
    okButton.setActionCommand("OK");
    buttonPanel.add(okButton);
    okButton.setBounds(115, 7, 51, 25);
    applyButton.setText("Apply");
    applyButton.setActionCommand("Apply");
    buttonPanel.add(applyButton);
    applyButton.setBounds(171, 7, 65, 25);
    cancelButton.setText("Cancel");
    cancelButton.setActionCommand("Cancel");
    buttonPanel.add(cancelButton);
    cancelButton.setBounds(241, 7, 73, 25);
    // $$ etchedBorder1.move(0,300);
    this.getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
    jTabbedPane1.add(vectorPanel, "Vector");
    vectorPanel.add(
        vectorStyleComboBox,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(15, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        colorPanel,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 15),
            0,
            0));
    vectorPanel.add(
        JLabel1,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    vectorPanel.add(
        jLabel5,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 6, 0, 6),
            0,
            0));
    vectorPanel.add(
        jLabel6,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    vectorPanel.add(
        jLabel7,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 15, 10, 5),
            0,
            0));
    vectorPanel.add(
        vectorScaleTextField,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        vectorMaxSizeTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        offsetAngleTextField,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 15, 5),
            0,
            0));
    vectorPanel.add(
        JLabel5,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(10, 5, 0, 5),
            0,
            0));
    jTabbedPane1.add(headPanel, "Head");
    headPanel.add(
        jLabel8,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headScaleTextField,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        jLabel9,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        jLabel10,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headMinSizeTextField,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        headMaxSizeTextField,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        jLabel11,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headFixedSizeTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    jTabbedPane1.add(Mark, "Mark");
    Mark.add(
        markPanel,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    markPanel.add(
        plotMarkIconLabel,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 5),
            0,
            0));
    markPanel.add(
        markEditor,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            1.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.VERTICAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    Mark.add(
        JLabel6,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    Mark.add(
        JLabel7,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 15, 10, 5),
            0,
            0));
    Mark.add(
        markHeightTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 15, 5),
            0,
            0));
    Mark.add(
        markColorPanel,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 15),
            0,
            0));
    Mark.add(
        JLabel12,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    Mark.add(
        jLabel4,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(10, 5, 0, 5),
            0,
            0));
    Mark.add(
        originStyleComboBox,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(15, 5, 5, 5),
            0,
            0));
    jTabbedPane1.add(strokePanel, "Line Style");
    strokePanel.add(
        JLabel10,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        widthTextField,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        jLabel1,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        jLabel2,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        capStyleComboBox,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        miterStyleComboBox,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        jLabel3,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        miterLimitTextField,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    // $$ stringComboBoxModel1.move(24,300);
    setTitle("VectorAttribute Properties");

    SymWindow aSymWindow = new SymWindow();
    this.addWindowListener(aSymWindow);
    SymAction lSymAction = new SymAction();
    cancelButton.addActionListener(lSymAction);
    okButton.addActionListener(lSymAction);
    applyButton.addActionListener(lSymAction);
  }