Package org.apache.airavata.xbaya.ui.widgets

Examples of org.apache.airavata.xbaya.ui.widgets.XBayaTextField


                buttonPane.add(cancelButton);
            }
        }
        {
            JPanel execPath = new JPanel();
            txtExecPath = new XBayaTextField();
            txtExecPath.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setExecutablePath(txtExecPath.getText());
                }
            });
            txtExecPath.getTextField().addFocusListener(new FocusAdapter() {
                @Override
                public void focusLost(FocusEvent e) {
                    super.focusLost(e);
                    updateTempDirWithExecPath(txtExecPath.getText());
                }
            });
            txtExecPath.setColumns(10);
            btnExecBrowse = new JButton(MenuIcons.OPEN_ICON);
            btnExecBrowse.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                    JFileChooser c = new JFileChooser();
                    int rVal = c.showOpenDialog(null);
                    if (rVal == JFileChooser.APPROVE_OPTION) {
                        txtExecPath.setText(c.getSelectedFile().toString());
                        setExecutablePath(txtExecPath.getText());
                    }
                }
            });
            execPath.add(txtExecPath.getSwingComponent());
            execPath.add(btnExecBrowse);

            setupLayoutForBrowse(execPath, txtExecPath.getSwingComponent());

            JLabel lblExecutablePath = new JLabel("Executable path");
            JPanel tmpDirPath = new JPanel();

            txtTempDir = new XBayaTextField();
            txtTempDir.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setTempDir(txtTempDir.getText());
                }
View Full Code Here


                buttonPane.add(cancelButton);
            }
        }
        {
            JPanel execPath = new JPanel();
            txtExecPath = new XBayaTextField();
            txtExecPath.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setExecutablePath(txtExecPath.getText());
                }
            });
            txtExecPath.getTextField().addFocusListener(new FocusAdapter() {
                @Override
                public void focusLost(FocusEvent e) {
                    super.focusLost(e);
                    updateTempDirWithExecPath(txtExecPath.getText());
                }
            });
            txtExecPath.setColumns(10);
            btnExecBrowse = new JButton(MenuIcons.OPEN_ICON);
            btnExecBrowse.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                    JFileChooser c = new JFileChooser();
                    int rVal = c.showOpenDialog(null);
                    if (rVal == JFileChooser.APPROVE_OPTION) {
                        txtExecPath.setText(c.getSelectedFile().toString());
                        setExecutablePath(txtExecPath.getText());
                    }
                }
            });
            execPath.add(txtExecPath.getSwingComponent());
            execPath.add(btnExecBrowse);

            setupLayoutForBrowse(execPath, txtExecPath.getSwingComponent());

            JLabel lblExecutablePath = new JLabel("Executable path");
            JPanel tmpDirPath = new JPanel();

            txtTempDir = new XBayaTextField();
            txtTempDir.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setTempDir(txtTempDir.getText());
                }
View Full Code Here

        }
        {
//            JPanel panel = new JPanel();
//            getContentPane().add(panel, BorderLayout.CENTER);
          JPanel execPath=new JPanel();
            txtExecPath = new XBayaTextField();
            txtExecPath.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setExecutablePath(txtExecPath.getText());
                }
            });
            txtExecPath.getTextField().addFocusListener(new FocusAdapter() {
              @Override
              public void focusLost(FocusEvent e) {
                super.focusLost(e);
                updateTempDirWithExecPath(txtExecPath.getText());
              }
      });
            txtExecPath.setColumns(10);
            btnExecBrowse=new JButton(MenuIcons.OPEN_ICON);
            btnExecBrowse.addActionListener(new ActionListener(){
        @Override
        public void actionPerformed(ActionEvent arg0) {
          JFileChooser c = new JFileChooser();
          int rVal = c.showOpenDialog(null);
          if (rVal == JFileChooser.APPROVE_OPTION) {
            txtExecPath.setText(c.getSelectedFile().toString());
            setExecutablePath(txtExecPath.getText());
          }
        }
            });
            execPath.add(txtExecPath.getSwingComponent());
            execPath.add(btnExecBrowse);
            JButton btnIOParameters = new JButton("IO Parameters...");
            btnIOParameters.addActionListener(new ActionListener(){
        @Override
        public void actionPerformed(ActionEvent event) {
          try {
                        ServiceDescriptionDialog serviceDescriptionDialog = new ServiceDescriptionDialog(getRegistry(),getServiceDescription()==null,getServiceDescription(),false,getApplicationName());
                        serviceDescriptionDialog.setLocationRelativeTo(getContentPane());
                        serviceDescriptionDialog.open();
                        if (serviceDescriptionDialog.isServiceCreated()) {
                          setServiceDescription(serviceDescriptionDialog.getServiceDescription());
                        }
                    } catch (Exception e1) {
                        e1.printStackTrace();
                        JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
                    }
        }
            });
            execPath.add(new JLabel("   "));
            execPath.add(btnIOParameters);
           
            setupLayoutForBrowse(execPath,txtExecPath.getSwingComponent());

            txtAppName = new XBayaTextField();
            txtAppName.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent arg0) {
                    setApplicationName(txtAppName.getText());
                }
            });
            txtAppName.setColumns(10);
            XBayaLabel lblApplicationName = new XBayaLabel("Application name",txtAppName);
            JLabel lblExecutablePath = new JLabel("Executable path");
          JPanel tmpDirPath=new JPanel();

            txtTempDir = new XBayaTextField();
            txtTempDir.getTextField().addKeyListener(new KeyAdapter() {
                @Override
                public void keyReleased(KeyEvent e) {
                    setTempDir(txtTempDir.getText());
                }
View Full Code Here

    /**
     * Initializes the GUI.
     */
    private void initGUI() {
        this.usernameTextField = new XBayaTextField();
        this.caFileTextField = new XBayaTextField();
        this.certFileTextField = new XBayaTextField();
        this.keyFileTextField = new XBayaTextField();
        this.sourceEndpointTextField = new XBayaTextField();
        this.sourceFilePathTextField = new XBayaTextField();
        this.destEndpointTextField = new XBayaTextField();
        this.destFilePathTextField = new XBayaTextField();

        // Setting some sample values when the Window is loaded
        /*this.usernameTextField.setText("heshan");
        this.caFileTextField
                .setText("/home/heshan/Dev/globusonline/transfer-api-client-java.git/trunk/ca/gd-bundle_ca.cert");
View Full Code Here

                }
            }
        });
        JScrollPane pane = new JScrollPane(editorPane);
        GridPanel gridPanel = new GridPanel();
        XBayaTextField txtKey=new XBayaTextField(key);
        txtKey.getTextField().setEditable(false);
        gridPanel.add(txtKey);
        gridPanel.add(pane);
        gridPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder());
        gridPanel.layout(2, 1, 1, 0);
       
View Full Code Here

        this.owner = owner;
        initGUI();
    }

    protected void initGUI() {
        this.accessKeyIDTextField = new XBayaTextField();
        XBayaLabel accessKeyIDLabel = new XBayaLabel("Access Key", this.accessKeyIDTextField);

        this.secretAccessKeyTextField = new XBayaTextField();
        XBayaLabel secretAccessKeyLabel = new XBayaLabel("Secret Key", this.secretAccessKeyTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(accessKeyIDLabel);
        infoPanel.add(this.accessKeyIDTextField);
View Full Code Here

        for (InputNode node : inputNodes) {
            String id = node.getID();
            QName parameterType = node.getParameterType();
            JLabel nameLabel = new JLabel(id);
            JLabel typeField = new JLabel(parameterType.getLocalPart());
            XBayaTextField paramField = new XBayaTextField();
            Object value = node.getDefaultValue();

            String valueString;
            if (value == null) {
                valueString = "";
            } else {
                if (value instanceof XmlElement) {
                    XmlElement valueElement = (XmlElement) value;
                    valueString = XMLUtil.xmlElementToString(valueElement);
                } else {
                    // Only string comes here for now.
                    valueString = value.toString();
                }
            }
            paramField.setText(valueString);
            this.parameterPanel.add(nameLabel);
            this.parameterPanel.add(typeField);
            this.parameterPanel.add(paramField);
            this.parameterTextFields.add(paramField);
        }
View Full Code Here

    }

    private void initGUI() {
        this.parameterPanel = new GridPanel(true);

        this.instanceNameTextField = new XBayaTextField();
        XBayaLabel instanceNameLabel = new XBayaLabel("Experiment name", this.instanceNameTextField);
       
        this.topicTextField = new XBayaTextField();
        XBayaLabel topicLabel = new XBayaLabel("Notification topic", this.topicTextField);
        this.workflowInterpreterTextField = new XBayaTextField();
        XBayaLabel workflowInterpreterLabel = new XBayaLabel("Workflow Interpreter URL",
                this.workflowInterpreterTextField);
        this.RegistryTextField = new XBayaTextField();
        XBayaLabel RegistryLabel = new XBayaLabel("Registry URL", this.RegistryTextField);
        this.gfacTextField = new XBayaTextField();
        XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(instanceNameLabel);
        infoPanel.add(this.instanceNameTextField);
View Full Code Here

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
View Full Code Here

        if (isNewHost()) {
      setTitle("Register Host");
    }else{
      setTitle("Update Host: "+getOriginalHostDescription().getType().getHostName());
    }
    this.hostIdTextField = new XBayaTextField();
        this.hostAddressTextField = new XBayaTextField();

        XBayaLabel hostIdLabel = new XBayaLabel("Host ID", this.hostIdTextField);
        XBayaLabel hostAddressLabel = new XBayaLabel("Host Address", this.hostAddressTextField);
        cmbResourceProtocol = new JComboBox(new String[]{REMOTE_PROTOCOL_STR_LOCAL,REMOTE_PROTOCOL_STR_SSH,REMOTE_PROTOCOL_STR_GLOBUS,REMOTE_PROTOCOL_STR_UNICORE,REMOTE_PROTOCOL_STR_AMAZON_EC2, REMOTE_PROTOCOL_STR_HADOOP});
        JLabel lblResourceProtocol = new JLabel("Resource Protocol");
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.ui.widgets.XBayaTextField

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.