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

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


                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());
                }
            });
            txtTempDir.setColumns(10);
            btnTmpDirBrowse=new JButton(MenuIcons.OPEN_DIR_ICON);
            btnTmpDirBrowse.addActionListener(new ActionListener(){
        @Override
        public void actionPerformed(ActionEvent arg0) {
          JFileChooser c = new JFileChooser();
          c.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          int rVal = c.showOpenDialog(null);
          if (rVal == JFileChooser.APPROVE_OPTION) {
            txtTempDir.setText(c.getSelectedFile().toString());
            setTempDir(txtTempDir.getText());
          }
        }
            });
            JTextField component = txtTempDir.getSwingComponent();
      tmpDirPath.add(component);
            tmpDirPath.add(btnTmpDirBrowse);
//            tmpDirPath.layout(1, 2, 0, 0);
           
            setupLayoutForBrowse(tmpDirPath, component);


            JLabel lblTemporaryDirectory = new JLabel("Scratch working directory");

            JButton btnAdvance = new JButton("Advanced application configurations...");
            btnAdvance.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    try {
                        ApplicationDescriptionAdvancedOptionDialog serviceDescriptionDialog = new ApplicationDescriptionAdvancedOptionDialog(
                                getRegistry(), getShellApplicationDescription());
                        serviceDescriptionDialog.open();
                    } catch (Exception e1) {
                        e1.printStackTrace();
                        JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
                    }
                }
            });

//            cmbServiceName.setRenderer(new DefaultListCellRenderer());
            cmbHostName = new JComboBox();
            cmbHostName.addActionListener(this);

            XBayaLabel lblHostName = new XBayaLabel("Application host",cmbHostName);
//            lblHostName.getSwingComponent().setFont(new Font("Tahoma", Font.ITALIC, 11));
            XBayaLinkButton lnkNewHost = new XBayaLinkButton("New button");
            lnkNewHost.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    try {
View Full Code Here


    private void initGUI() {
        this.urlTextField = new XBayaTextField();
        this.usernameTextField = new XBayaTextField();
        this.passwordTextField = new JPasswordField();
        this.confirmPasswordTextField = new JPasswordField();
        XBayaLabel urlLabel = new XBayaLabel("URL", this.urlTextField);
        XBayaLabel userLabel = new XBayaLabel("Username", this.usernameTextField);
        XBayaLabel passLabel = new XBayaLabel("Password", this.passwordTextField);
        XBayaLabel confirmPassLabel = new XBayaLabel("Confirm Password", this.confirmPasswordTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(urlLabel);
        infoPanel.add(this.urlTextField);
        infoPanel.add(userLabel);
View Full Code Here

        this.usernameTextField = new XBayaTextField();
        this.passwordTextField = new JPasswordField();
        this.urlTextField.setText(engine.getConfiguration().getRegistryURL().toASCIIString());
        this.usernameTextField.setText(engine.getConfiguration().getRegistryUserName());
        this.passwordTextField.setText(engine.getConfiguration().getRegistryPassphrase());
        XBayaLabel urlLabel = new XBayaLabel("URL", this.urlTextField);
        XBayaLabel nameLabel = new XBayaLabel("Username", this.usernameTextField);
        XBayaLabel passLabel = new XBayaLabel("Password", this.usernameTextField);
        this.newUserButton = new XBayaLinkButton("Create new user...");
        newUserButton.setHorizontalAlignment(XBayaLinkButton.RIGHT);
        JLabel emptyLabel = new JLabel("");

        newUserButton.addActionListener(new AbstractAction() {
View Full Code Here

        this.sourceEndpointTextField.setText("xsede#ranger");
        this.sourceFilePathTextField.setText("~/tmp.log");
        this.destEndpointTextField.setText("xsede#trestles");
        this.destFilePathTextField.setText("~/tmp.log.copy");*/

        XBayaLabel nameLabel = new XBayaLabel("Username", this.usernameTextField);
        XBayaLabel caFileLabel = new XBayaLabel("CA File", this.caFileTextField);
        XBayaLabel certFileLabel = new XBayaLabel("Certificate File", this.certFileTextField);
        XBayaLabel keyFileLabel = new XBayaLabel("Key File", this.keyFileTextField);
        XBayaLabel sourceEprLabel = new XBayaLabel("Source Endpoint", this.sourceEndpointTextField);
        XBayaLabel sourceFilePathLabel = new XBayaLabel("Source File Path", this.sourceFilePathTextField);
        XBayaLabel destEprLabel = new XBayaLabel("Destination Endpoint", this.destEndpointTextField);
        XBayaLabel destFilePathLabel = new XBayaLabel("Destination FIle path", this.destFilePathTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(nameLabel);
        infoPanel.add(this.usernameTextField);
        infoPanel.add(caFileLabel);
View Full Code Here

    private void initGUI() {
        /*
         * Main Panel
         */
        this.amiTextField = new XBayaTextField();
        XBayaLabel amiLabel = new XBayaLabel("AMI ID", this.amiTextField);

        this.numberOfInstanceSpinner = new JSpinner(new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1));
        XBayaLabel nInstanceLabel = new XBayaLabel("Number Of Instances", this.numberOfInstanceSpinner);

        this.instanceTypeComboBox = new XBayaComboBox(new DefaultComboBoxModel(AmazonUtil.INSTANCE_TYPE));
        this.instanceTypeComboBox.setSelectedItem(AmazonUtil.INSTANCE_TYPE[1]);
        XBayaLabel instanceTypeLabel = new XBayaLabel("Instance Type", this.instanceTypeComboBox);

        this.noKeyButton = new JRadioButton("No Key Pair");
        this.noKeyButton.setSelected(true);
        this.noKeyButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent paramActionEvent) {
                EC2LaunchWindow.this.keyComboBox.getJComboBox().setEnabled(false);
            }
        });

        this.existKeyButton = new JRadioButton("Exist Key Pairs");
        this.existKeyButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent paramActionEvent) {
                if (EC2LaunchWindow.this.keyComboBoxModel == null) {
                    EC2LaunchWindow.this.keyComboBoxModel = new DefaultComboBoxModel(AmazonUtil.loadKeypairs()
                            .toArray());
                    EC2LaunchWindow.this.keyComboBox.setModel(EC2LaunchWindow.this.keyComboBoxModel);
                }
                EC2LaunchWindow.this.keyComboBox.getJComboBox().setEnabled(true);
            }
        });

        ButtonGroup serviceTypeButtonGroup = new ButtonGroup();
        serviceTypeButtonGroup.add(this.noKeyButton);
        serviceTypeButtonGroup.add(this.existKeyButton);

        this.keyComboBox = new XBayaComboBox(new DefaultComboBoxModel());
        this.keyComboBox.getJComboBox().setEnabled(false);

        GridPanel radioPanel = new GridPanel();
        radioPanel.add(this.noKeyButton);
        radioPanel.add(new JPanel());
        radioPanel.add(this.existKeyButton);
        radioPanel.add(this.keyComboBox);
        radioPanel.layout(2, 2, 0, 1);

        XBayaLabel keyLabel = new XBayaLabel("Key Pair", radioPanel);

        GridPanel mainPanel = new GridPanel(true);
        mainPanel.add(amiLabel);
        mainPanel.add(this.amiTextField);
        mainPanel.add(nInstanceLabel);
View Full Code Here

        /*
         * Upload Panel
         */
        this.fileTextField = new XBayaTextField();
        XBayaLabel fileLabel = new XBayaLabel("Upload File Path", this.fileTextField);

        this.uploadBucketTextField = new XBayaTextField();
        XBayaLabel uploadBucketLabel = new XBayaLabel("Bucket Name", this.uploadBucketTextField);

        GridPanel uploadPanel = new GridPanel();
        uploadPanel.getSwingComponent().setBorder(BorderFactory.createTitledBorder("Upload"));
        uploadPanel.add(fileLabel);
        uploadPanel.add(this.fileTextField);
        uploadPanel.add(uploadBucketLabel);
        uploadPanel.add(this.uploadBucketTextField);
        uploadPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);

        /*
         * Download Panel
         */if (AmazonCredential.getInstance().getAwsAccessKeyId().equals("AKIAI3GNMQVYA5LSQNEQ")) { // Avoid to use
                                                                                                    // default Aws
                                                                                                    // Access Key
            JOptionPane.showMessageDialog(AmazonS3UtilsWindow.this.dialog.getDialog(), "Aws Access Key not set!",
                    "Error", JOptionPane.ERROR_MESSAGE);
            return;
        }
        this.downloadBucketTextField = new XBayaTextField();
        XBayaLabel downloadBucketLabel = new XBayaLabel("Bucket Name", this.downloadBucketTextField);

        this.keyTextField = new XBayaTextField();
        XBayaLabel keyLabel = new XBayaLabel("Key Name", this.keyTextField);

        this.folderTextField = new XBayaTextField();
        XBayaLabel folderLabel = new XBayaLabel("Download Location", this.folderTextField);

        GridPanel downloadPanel = new GridPanel();
        downloadPanel.getSwingComponent().setBorder(BorderFactory.createTitledBorder("Download"));
        downloadPanel.add(downloadBucketLabel);
        downloadPanel.add(this.downloadBucketTextField);
View Full Code Here

    }

    protected void initGUI() {

        this.accessKeyIDTextField = new XBayaTextField();
        XBayaLabel accessKeyIDLabel = new XBayaLabel("Access Key", this.accessKeyIDTextField);

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

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

    @SuppressWarnings("serial")
  protected void initGUI() {

        this.accessKeyIDTextField = new XBayaTextField();
        XBayaLabel accessKeyIDLabel = new XBayaLabel("Access Key", this.accessKeyIDTextField);

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

        this.keyPairNameTextField = new XBayaTextField();
        XBayaLabel keyPairNameLabel = new XBayaLabel("Key Pair Name", this.keyPairNameTextField);

        this.numOfInstancesTextField = new XBayaTextField();
        XBayaLabel numOfInstancesLabel = new XBayaLabel("Number of Instances", this.numOfInstancesTextField);

        this.jobFlowNameTextField = new XBayaTextField();
        XBayaLabel jobFlowNameLabel = new XBayaLabel("Job Flow Name", this.jobFlowNameTextField);

        this.logLocationOnS3TextField = new XBayaTextField();
        XBayaLabel logLocationOnS3Label = new XBayaLabel("Log Location(S3)", this.logLocationOnS3TextField);

        this.inputLocationOnS3TextField = new XBayaTextField();
        XBayaLabel inputLocationOnS3Label = new XBayaLabel("Input Location(S3)", this.inputLocationOnS3TextField);

        this.outputLocationOnS3TextField = new XBayaTextField();
        XBayaLabel outputLocationOnS3Label = new XBayaLabel("Output Location(S3)", this.outputLocationOnS3TextField);

        this.jarFilePathOnS3TextField = new XBayaTextField();
        XBayaLabel jarFilePathOnS3Label = new XBayaLabel("Jar File Location(S3)", this.jarFilePathOnS3TextField);

        this.mainClassNameTextField = new XBayaTextField();
        XBayaLabel mainClassNameLabel = new XBayaLabel("Main Class Name", this.mainClassNameTextField);

        this.accessKeyIDTextField.setText("AKIAI3GNMQVYA5LSQNEQ");
        this.secretAccessKeyTextField.setText("CcdJtCELevu03nIsyho6bb0pZv6aRi034OoXFYWl");
        this.keyPairNameTextField.setText("XbayaHadoopTest");
        this.numOfInstancesTextField.setText("4");
View Full Code Here

            });

            cmbHostName = new JComboBox();
            cmbHostName.addActionListener(this);

            XBayaLabel lblHostName = new XBayaLabel("Application host",cmbHostName);
            XBayaLinkButton lnkNewHost = new XBayaLinkButton("New button");
            lnkNewHost.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    try {
                        HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(getRegistry());
View Full Code Here

     * Intialize UI
     */
    private void initGUI() {

        this.nameTextField = new XBayaTextField();
        XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);

        this.descriptionTextArea = new XBayaTextArea();
        XBayaLabel descriptionLabel = new XBayaLabel("Description", this.descriptionTextArea);

        JPanel buttonPanel = new JPanel();
        this.okButton = new JButton("OK");
        this.okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

TOP

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

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.