Examples of ModelWriter


Examples of org.slim3.datastore.json.ModelWriter

    public String modelsToJson(final Object[] models, int maxDepth) {
        int n = models.length;
        if (n == 0)
            return "[]";
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.slim3.datastore.json.ModelWriter

     *
     * @return JSON string
     */
    public String modelsToJson(final Iterable<?> models, int maxDepth) {
        StringBuilder b = new StringBuilder();
        JsonWriter w = new JsonWriter(b, new ModelWriter() {
            @Override
            public void write(JsonWriter writer, Object model, int maxDepth,
                    int currentDepth) {
                invokeModelToJson(
                    Datastore.getModelMeta(model.getClass()),
View Full Code Here

Examples of org.tinyuml.ui.commands.ModelWriter

  private void saveAs() {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setDialogTitle(getResourceString("dialog.saveas.title"));
    if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
      try {
        ModelWriter modelwriter = new ModelWriter();
        modelwriter.writeFile(fileChooser.getSelectedFile(), umlModel,
          getCurrentEditor().getDiagram());
      } catch (IOException ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage(),
          getResourceString("error.savefile.title"), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

Examples of org.tinyuml.ui.commands.ModelWriter

  private void saveAs() {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setDialogTitle(getResourceString("dialog.saveas.title"));
    if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
      try {
        ModelWriter modelwriter = new ModelWriter();
        modelwriter.writeFile(fileChooser.getSelectedFile(), umlModel,
          getCurrentEditor().getDiagram());
      } catch (IOException ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage(),
          getResourceString("error.savefile.title"), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

Examples of org.tinyuml.ui.commands.ModelWriter

  private void saveAs() {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setDialogTitle(getResourceString("dialog.saveas.title"));
    if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
      try {
        ModelWriter modelwriter = new ModelWriter();
        modelwriter.writeFile(fileChooser.getSelectedFile(), umlModel,
          getCurrentEditor().getDiagram());
      } catch (IOException ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage(),
          getResourceString("error.savefile.title"), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

Examples of org.tinyuml.ui.commands.ModelWriter

  private void saveAs() {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setDialogTitle(getResourceString("dialog.saveas.title"));
    if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
      try {
        ModelWriter modelwriter = new ModelWriter();
        modelwriter.writeFile(fileChooser.getSelectedFile(), umlModel,
          getCurrentEditor().getDiagram());
      } catch (IOException ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage(),
          getResourceString("error.savefile.title"), JOptionPane.ERROR_MESSAGE);
      }
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.