Examples of VkEventTextArea


Examples of com.vk.gwt.designer.client.designer.VkEventTextArea

      public void run() {
        VkDesignerUtil.centerDialog(dialog);
        nameTextArea.setFocus(true);
      }
    }.schedule(100);
    final VkEventTextArea jsTextArea = new VkEventTextArea();
    if(menuBar.getCommandJs().containsKey(index)) {
      HorizontalPanel jsHp = new HorizontalPanel();
      jsHp.setWidth("100%");
      dialog.add(jsHp);
      jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
      jsHp.add(new Label("Command Js:"));
      jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
      jsHp.setCellWidth(jsHp.getWidget(0), "35%");
      jsTextArea.setSize("250px","80px");
      jsHp.add(jsTextArea);
      jsTextArea.setText(menuBar.getCommandJs().get(index));
    }
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    dialog.add(buttonsPanel);
    Button saveButton = new Button("Save");
    buttonsPanel.add(saveButton);
    saveButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        origDialog.hide();
        MenuItem item = menuBar.getMenuItem(index);
        item.setHTML(nameTextArea.getText());
        if(menuBar.getCommandJs().containsKey(index))
        {
          menuBar.getCommandJs().put(index, jsTextArea.getText());
          item.setCommand(new Command() {
            @Override
            public void execute() {
              VkStateHelper.getInstance().getEventHelper().executeEvent(jsTextArea.getText(), (Map<String, String>)null);
            }
          });
        }
      }
    });
View Full Code Here

Examples of com.vk.gwt.designer.client.designer.VkEventTextArea

    dialog.add(jsHp);
    jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    jsHp.add(new Label("Command Js:"));
    jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
    jsHp.setCellWidth(jsHp.getWidget(0), "35%");
    final VkEventTextArea jsTextArea = new VkEventTextArea();
    jsTextArea.setSize("300px","100px");
    jsHp.add(jsTextArea);
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    dialog.add(buttonsPanel);
    Button saveButton = new Button("Save");
    buttonsPanel.add(saveButton);
    saveButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        menuBar.getCommandJs().put(menuBar.getItemCount(), jsTextArea.getText());
        addMenuItem(menuBar, nameTextArea.getText(), jsTextArea.getText());
        origDialog.hide();
      }
    });
    Button cancelButton = new Button("Cancel");
    buttonsPanel.add(cancelButton);
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.