Examples of LatexFieldFormatter


Examples of net.sf.jabref.export.LatexFieldFormatter

  if (flavor.equals(entryFlavor))
      return data;
  else if (flavor.equals(DataFlavor.stringFlavor)) {
      try {
    StringWriter sw = new StringWriter();
    LatexFieldFormatter ff = new LatexFieldFormatter();
    for (int i=0; i<data.length; i++)
        data[i].write(sw, ff, false);
    return sw.toString();
      } catch (IOException ex) {
    JOptionPane.showMessageDialog
View Full Code Here

Examples of net.sf.jabref.export.LatexFieldFormatter

    // Change content of string.
    BibtexString subject = (BibtexString)strings[row];

    if (!((String)value).equals(subject.getContent())) {
                    try {
                        (new LatexFieldFormatter()).format((String)value, "__dummy");
                    } catch (IllegalArgumentException ex) {
                        return;
                    }
        // Store undo information.
        panel.undoManager.addEdit
View Full Code Here

Examples of net.sf.jabref.export.LatexFieldFormatter

    public void updateSource() {
        if (updateSource) {
            StringWriter sw = new StringWriter(200);

            try {
                LatexFieldFormatter formatter = new LatexFieldFormatter();
                formatter.setNeverFailOnHashes(true);
                entry.write(sw, formatter, false);

                String srcString = sw.getBuffer().toString();
                source.setText(srcString);
                lastSourceStringAccepted = srcString;
View Full Code Here

Examples of net.sf.jabref.export.LatexFieldFormatter

            for (String field : nu.getAllFields()){
                if (entry.getField(field.toString()) != nu.getField(field.toString())) {
                    String toSet = nu.getField(field.toString());

                    // Test if the field is legally set.
                    (new LatexFieldFormatter()).format(toSet, field.toString());

                    compound.addEdit(new UndoableFieldChange(entry, field.toString(), entry
                        .getField(field.toString()), toSet));
                    entry.setField(field.toString(), toSet);
                    anyChanged = true;
View Full Code Here

Examples of net.sf.jabref.export.LatexFieldFormatter

                        // new contents into a StringWriter, and this will
                        // cause an IOException if the field is not
                        // properly formatted. If that happens, the field
                        // is not stored and the textarea turns red.
                        if (toSet != null)
                            (new LatexFieldFormatter()).format(toSet, fe.getFieldName());

                        String oldValue = entry.getField(fe.getFieldName());

                        if (toSet != null)
                            entry.setField(fe.getFieldName(), toSet);
View Full Code Here

Examples of net.sf.jabref.export.LatexFieldFormatter

  }

  private void setSourceView(BibtexEntry one, BibtexEntry two) {
    try {
      StringWriter sw = new StringWriter();
      one.write(sw, new LatexFieldFormatter(), false);
      ta1.setText(sw.getBuffer().toString());
      sw = new StringWriter();
      two.write(sw, new LatexFieldFormatter(), false);
      ta2.setText(sw.getBuffer().toString());
    }
    catch (IOException ex) {
    }
  }
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.