Examples of SystemPasteCommand


Examples of org.latexlab.docs.client.commands.SystemPasteCommand

      LatexCommandSet set = SetConstructs.get();
      LatexCommand[] cmds = set.getCommands();
      ExtendedMenuItem[] items = new ExtendedMenuItem[cmds.length];
      for (int i=0; i<cmds.length; i++) {
      LatexCommand cmd = cmds[i];
      items[i] = new ExtendedMenuItem(cmd.getIcon(), cmd.getTitle(), new SystemPasteCommand(cmd.getText()));
      }
      callback.onSuccess(items);
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    public void onSuccess() {
      ToolbarWindowContents contents = new ToolbarWindowContents();
      SetSubscriptAndSuperscript commandSet = SetSubscriptAndSuperscript.get();
      for (LatexCommand cmd : commandSet.getCommands()) {
        contents.addButton(cmd.getIcon(), cmd.getTitle(), false,
          new SystemPasteCommand(cmd.getText()));
      }
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    public void onSuccess() {
      ToolbarWindowContents contents = new ToolbarWindowContents();
      SetSets commandSet = SetSets.get();
      for (LatexCommand cmd : commandSet.getCommands()) {
        contents.addButton(cmd.getIcon(), cmd.getTitle(), false,
          new SystemPasteCommand(cmd.getText()));
      }
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    public void onSuccess() {
      ToolbarWindowContents contents = new ToolbarWindowContents();
      SetGreekLowercase commandSet = SetGreekLowercase.get();
      for (LatexCommand cmd : commandSet.getCommands()) {
        contents.addButton(cmd.getIcon(), cmd.getTitle(), false,
          new SystemPasteCommand(cmd.getText()));
      }
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

      LatexCommandSet set = SetBinaryOperators.get();
      LatexCommand[] cmds = set.getCommands();
      ExtendedMenuItem[] items = new ExtendedMenuItem[cmds.length];
      for (int i=0; i<cmds.length; i++) {
      LatexCommand cmd = cmds[i];
      items[i] = new ExtendedMenuItem(cmd.getIcon(), cmd.getTitle(), new SystemPasteCommand(cmd.getText()));
      }
      callback.onSuccess(items);
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    toolbarPanel.add(buildButton(Icons.editorIcons.Redo(), "Redo", false, new SystemRedoCommand()));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.Resources(), "Project resources", false, new SystemShowDialogCommand(DynamicResourcesDialog.class)));
    toolbarPanel.add(buildButton(Icons.editorIcons.Compile(), "Compile", false, new CurrentDocumentCompileCommand()));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.Bold(), "Bold", false, new SystemPasteCommand("\\textbf{ <text here> }")));
    toolbarPanel.add(buildButton(Icons.editorIcons.Italic(), "Italic", false, new SystemPasteCommand("\\textit{ <text here> }")));
    toolbarPanel.add(buildButton(Icons.editorIcons.Underline(), "Underline", false, new SystemPasteCommand("\\underline{ <text here> }")));
    toolbarPanel.add(buildButton(Icons.editorIcons.FontColor(), "Color", false, new com.google.gwt.user.client.Command() {
    @Override
    public void execute() {
      DynamicColorSelectionDialog.get(new ColorSelectionHandler() {
      @Override
      public void onSelection(ColorSelectionEvent event) {
          String color = event.getSelectedItem().substring(1);
          int r = Integer.valueOf(color.substring(0, 2), 16);
          int g = Integer.valueOf(color.substring(2, 4), 16);
          int b = Integer.valueOf(color.substring(4, 6), 16);
          String texLabel = "c" + color;
        CommandEvent.fire(new SystemPasteCommand("\\textcolor{" + texLabel + "}{ <text here> }",
                new String[] { "\\usepackage{color}",
                "\\definecolor{" + texLabel + "}{RGB}{" + r + "," + g + "," + b + "}" }));
      }
      }).center();
    }
    }));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.AlignLeft(), "Align Left", false, new SystemPasteCommand("\\begin{flushleft} <text here> \\end{flushleft}")));
    toolbarPanel.add(buildButton(Icons.editorIcons.AlignMiddle(), "Align Middle", false, new SystemPasteCommand("\\begin{center} <text here> \\end{center}")));
    toolbarPanel.add(buildButton(Icons.editorIcons.AlignRight(), "Align Right", false, new SystemPasteCommand("\\begin{flushright} <text here> \\end{flushright}")));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.UnorderedList(), "Insert List", false, new SystemPasteCommand("\\begin{itemize}\n  \\item \n\\end{itemize}")));
    //toolbarPanel.add(buildButton(Icons.editorIcons.Hyperlink(), "Insert Link", true, new SystemPasteCommand("\\url{ <text here> }")));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.latexGroupsIcons.AboveAndBelow(), SetAboveAndBelow.TITLE, true, new SystemToggleLatexToolbarCommand(SetAboveAndBelow.TITLE)));
    toolbarPanel.add(buildButton(Icons.latexGroupsIcons.Accents(), SetAccents.TITLE, true, new SystemToggleLatexToolbarCommand(SetAccents.TITLE)));
    toolbarPanel.add(buildButton(Icons.latexGroupsIcons.Arrows(), SetArrows.TITLE, true, new SystemToggleLatexToolbarCommand(SetArrows.TITLE)));
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    public void onSuccess() {
      ToolbarWindowContents contents = new ToolbarWindowContents();
      SetBoundaries commandSet = SetBoundaries.get();
      for (LatexCommand cmd : commandSet.getCommands()) {
        contents.addButton(cmd.getIcon(), cmd.getTitle(), false,
          new SystemPasteCommand(cmd.getText()));
      }
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    }
    @Override
    public void onSuccess() {
      callback.onSuccess(new ExtendedMenuItem[] {
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Header...", new SystemShowDialogCommand(DynamicInsertHeaderDialog.class)),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Footnote", new SystemPasteCommand("\\footnote{}")),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Tabular...", new SystemShowDialogCommand(DynamicInsertTableDialog.class)),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Picture...", new SystemShowDialogCommand(DynamicInsertImageDialog.class)),
      new ExtendedMenuItem(Icons.editorIcons.Hyperlink(), "Hyperlink...", new SystemShowDialogCommand(DynamicInsertHyperlinkDialog.class)),
      null,
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Enumerations", DynamicEnumerationMenu.get()),
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

    public void onSuccess() {
      ToolbarWindowContents contents = new ToolbarWindowContents();
      SetLogical commandSet = SetLogical.get();
      for (LatexCommand cmd : commandSet.getCommands()) {
        contents.addButton(cmd.getIcon(), cmd.getTitle(), false,
          new SystemPasteCommand(cmd.getText()));
      }
    }
    });
  }
View Full Code Here

Examples of org.latexlab.docs.client.commands.SystemPasteCommand

      LatexCommandSet set = SetAboveAndBelow.get();
      LatexCommand[] cmds = set.getCommands();
      ExtendedMenuItem[] items = new ExtendedMenuItem[cmds.length];
      for (int i=0; i<cmds.length; i++) {
      LatexCommand cmd = cmds[i];
      items[i] = new ExtendedMenuItem(cmd.getIcon(), cmd.getTitle(), new SystemPasteCommand(cmd.getText()));
      }
      callback.onSuccess(items);
    }
    });
  }
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.