Examples of formatObject()


Examples of com.dci.intellij.dbn.common.locale.Formatter.formatObject()

    @Override
    public String getFormattedUserValue() {
        if (formattedUserValue == null && userValue != null) {
            RegionalSettings regionalSettings = RegionalSettings.getInstance(getProject());
            Formatter formatter = regionalSettings.getFormatter();
            formattedUserValue = formatter.formatObject(userValue);
        }
        return formattedUserValue;
    }

    public String getName() {
View Full Code Here

Examples of com.dci.intellij.dbn.common.locale.Formatter.formatObject()

                userValue = userValue.replace('\n', ' ');
            } else {
            }
            valueTextField.setText(userValue);
        } else {
            String formattedUserValue = formatter.formatObject(cell.getUserValue());
            valueTextField.setText(formattedUserValue);
        }
    }

    public ResultSetDataModelCell getCell() {
View Full Code Here

Examples of com.dci.intellij.dbn.common.locale.Formatter.formatObject()

                userValue = userValue.replace('\n', ' ');
            } else {
            }
            valueTextField.setText(userValue);
        } else {
            String formattedUserValue = formatter.formatObject(value);
            valueTextField.setText(formattedUserValue);
        }
    }

    public DBColumn getColumn() {
View Full Code Here

Examples of com.dci.intellij.dbn.common.locale.Formatter.formatObject()

            }
            editorComponent.setText(userValue);
        } else {
            editable = editable && !(cell.getUserValue() instanceof LazyLoadedValue);
            editorComponent.setEditable(editable);
            String formattedUserValue = formatter.formatObject(cell.getUserValue());
            editorComponent.setText(formattedUserValue);
        }
        JTextField valueTextField = editorComponent.getTextField();
        valueTextField.setBackground(UIUtil.getTextFieldBackground());
    }
View Full Code Here

Examples of org.freeplane.features.format.PatternFormat.formatObject()

  private void testOnePattern(String pattern) {
    final PatternFormat formatter = PatternFormat.guessPatternFormat(pattern);
    assertNotNull("could not create a formatter for pattern " + pattern, formatter);
    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }
View Full Code Here

Examples of org.freeplane.features.format.PatternFormat.formatObject()

    final PatternFormat formatter = PatternFormat.guessPatternFormat(pattern);
    assertNotNull("could not create a formatter for pattern " + pattern, formatter);
    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }

  private void assertMatches(final Pattern pattern, String string) {
View Full Code Here

Examples of org.freeplane.features.format.PatternFormat.formatObject()

    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }

  private void assertMatches(final Pattern pattern, String string) {
    final Matcher m = pattern.matcher(string);
    final boolean matches = m.find();
View Full Code Here

Examples of org.nutz.mongo.entity.MongoEntity.formatObject()

    // 获得集合
    String collName = moe.getCollectionName(q);
    if (db.collectionExists(collName)) {
      DBCollection coll = db.getCollection(collName);
      // 将 ref 对象转换成 DBObject
      DBObject dbRef = moe.formatObject(q);

      // 执行删除
      return coll.remove(dbRef);
    }
    return null;
View Full Code Here

Examples of org.nutz.mongo.entity.MongoEntity.formatObject()

  public WriteResult update(Object enref, Object q, Object o) {
    MongoEntity moe = (MongoEntity) Mongos.entity(enref);
    String collName = moe.getCollectionName(q);
    if (db.collectionExists(collName)) {
      DBCollection coll = db.getCollection(collName);
      DBObject dbq = moe.formatObject(q);
      DBObject dbo = moe.formatObject(o);
      return coll.updateMulti(dbq, dbo);
    }
    return null;
  }
View Full Code Here

Examples of org.nutz.mongo.entity.MongoEntity.formatObject()

    MongoEntity moe = (MongoEntity) Mongos.entity(enref);
    String collName = moe.getCollectionName(q);
    if (db.collectionExists(collName)) {
      DBCollection coll = db.getCollection(collName);
      DBObject dbq = moe.formatObject(q);
      DBObject dbo = moe.formatObject(o);
      return coll.updateMulti(dbq, dbo);
    }
    return null;
  }
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.