Package org.latexlab.docs.client.commands

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


    public void onSuccess() {
      callback.onSuccess(new ExtendedMenuItem[] {
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "New", new NewDocumentStartCommand()),
      null,
      new ExtendedMenuItem(Icons.editorIcons.OpenDocument(), "Open", new SystemShowDialogCommand(DynamicFileListDialog.class)),
      new ExtendedMenuItem(Icons.editorIcons.Save(), "Save", new CurrentDocumentSaveCommand(false)),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Save as new copy", new CurrentDocumentCopyCommand()),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Rename...", new CurrentDocumentRenameCommand()),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Delete...", new CurrentDocumentDeleteCommand()),
      new ExtendedMenuItem(Icons.editorIcons.Blank(), "Revision History", new CurrentDocumentRevisionHistoryCommand()),
      null,
View Full Code Here


    titlePanel.add(info);
    HorizontalPanel actionsPanel = new HorizontalPanel();
    actionsPanel.setHeight("30px");
    actionsPanel.setStylePrimaryName("lab-Header-Actions");
    MenuBar menu = new MenuBar(false);
    saveMenuItem = addMenuItem(menu, null, "Save Now", new CurrentDocumentSaveCommand(false));
    menu.addSeparator();
    saveAndCloseMenuItem = addMenuItem(menu, null, "Save & Close", new CurrentDocumentSaveAndCloseCommand());
    saveAndCloseMenuItem.setStylePrimaryName("lab-HighlightedMenuItem");
    actionsPanel.add(menu);
    table.setWidget(0, 0, titlePanel);
View Full Code Here

  private HorizontalPanel buildToolBar() {
    HorizontalPanel toolbarPanel = new HorizontalPanel();
    toolbarPanel.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
    toolbarPanel.setStyleName("lab-Toolbar");
    toolbarPanel.add(buildButton(Icons.editorIcons.OpenDocument(), "Open Document", false, new SystemShowDialogCommand(DynamicFileListDialog.class)));
    toolbarPanel.add(buildButton(Icons.editorIcons.Save(), "Save", false, new CurrentDocumentSaveCommand(false)));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.ItemList(), "Project resources", false, new SystemShowDialogCommand(DynamicResourcesDialog.class)));
    toolbarPanel.add(buildButton(Icons.editorIcons.Compile(), "Compile", false, new CurrentDocumentCompileCommand()));
    toolbarPanel.add(buildSeparator());
    return toolbarPanel;
View Full Code Here

    menu = new MenuBarExt(false);
    MenuBarExt fileMenu = new MenuBarExt(true);
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "New", new NewDocumentStartCommand());
    fileMenu.addSeparator();
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "Open", new SystemShowDialogCommand(DynamicFileListDialog.class));
    addMenuItem(fileMenu, Icons.editorIcons.Save(), "Save", new CurrentDocumentSaveCommand(false));
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "Save as new copy", new CurrentDocumentCopyCommand());
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "Rename...", new CurrentDocumentRenameCommand());
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "Delete...", new CurrentDocumentDeleteCommand());
    addMenuItem(fileMenu, Icons.editorIcons.Blank(), "Revision History", new CurrentDocumentRevisionHistoryCommand());
    fileMenu.addSeparator();
View Full Code Here

  private HorizontalPanel buildToolBar() {
    HorizontalPanel toolbarPanel = new HorizontalPanel();
    toolbarPanel.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
    toolbarPanel.setStyleName("lab-Toolbar");
    toolbarPanel.add(buildButton(Icons.editorIcons.OpenDocument(), "Open Document", false, new SystemShowDialogCommand(DynamicFileListDialog.class)));
    toolbarPanel.add(buildButton(Icons.editorIcons.Save(), "Save", false, new CurrentDocumentSaveCommand(false)));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(Icons.editorIcons.Undo(), "Undo", false, new SystemUndoCommand()));
    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)));
View Full Code Here

    public void run(int i) {
        Event e = Event.getCurrentEvent();
        switch(i) {
        case 83: //CTRL+S
        if (e != null) e.preventDefault();
        CommandEvent.fire(new CurrentDocumentSaveCommand(false));
      break;
      case 79: //CTRL+O
        if (e != null) e.preventDefault();
        CommandEvent.fire(new SystemShowDialogCommand(DynamicFileListDialog.class));
      break;
View Full Code Here

          loadDocument();
          scheduler = new Scheduler();
          scheduler.addCommandHandler(DocsAdvancedEditorController.this);
        if (settings.isUseAutoSave()) {
            scheduler.scheduleRepeating("AutoSave", settings.getAutoSaveInterval(),
                new CurrentDocumentSaveCommand(true));
        }
      }
    }
  );
  }
View Full Code Here

  private void execute(final SystemApplyPreferencesCommand cmd) {
  settings.setUseAutoSave(cmd.isUseAutoSave());
  settings.setAutoSaveInterval(cmd.getAutoSaveIntervalMillisecs());
  if (settings.isUseAutoSave()) {
      scheduler.scheduleRepeating("AutoSave", settings.getAutoSaveInterval(),
        new CurrentDocumentSaveCommand(true));
  } else {
    scheduler.cancelRepeating("AutoSave");
  }
  }
View Full Code Here

TOP

Related Classes of org.latexlab.docs.client.commands.CurrentDocumentSaveCommand

Copyright © 2018 www.massapicom. 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.