Examples of GridPanel


Examples of edu.indiana.extreme.xbaya.gui.GridPanel

        XBayaLabel brokerLabel = new XBayaLabel("Karma URL", this.urlTextField);
        this.idTextField = new XBayaTextField();
        XBayaLabel idLabel = new XBayaLabel("Workflow Instance ID",
                this.idTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(brokerLabel);
        infoPanel.add(this.urlTextField);
        infoPanel.add(idLabel);
        infoPanel.add(this.idTextField);
        infoPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);

        this.originalButton = new JRadioButton("Original");
        this.originalButton.setSelected(true);
        this.periodicButton = new JRadioButton("Periodic");
        this.batchButton = new JRadioButton("Batch");
        ButtonGroup serviceTypeButtonGroup = new ButtonGroup();
        serviceTypeButtonGroup.add(this.originalButton);
        serviceTypeButtonGroup.add(this.periodicButton);
        serviceTypeButtonGroup.add(this.batchButton);

        GridPanel radioButtonPanel = new GridPanel();
        radioButtonPanel.add(this.originalButton);
        radioButtonPanel.add(this.periodicButton);
        radioButtonPanel.add(this.batchButton);
        radioButtonPanel.layout(1, 3, 0, GridPanel.WEIGHT_NONE);

        GridPanel mainPaenl = new GridPanel();
        mainPaenl.add(infoPanel);
        mainPaenl.add(radioButtonPanel);
        mainPaenl.layout(2, 1, GridPanel.WEIGHT_NONE, 0);

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

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

  /**
   *
   */
  private void initGUI() {
    GridPanel infoPanel = new GridPanel();
    this.docTypeComboBox = new XBayaComboBox(
        new javax.swing.DefaultComboBoxModel(new String[] { "Host",
            "Application", "Service" }));
    XBayaLabel docTypeLabel = new XBayaLabel("Document Type",
        this.docTypeComboBox);
    this.fileLocationField = new XBayaTextField();
    XBayaLabel fileLocationLabel = new XBayaLabel("File Location",
        this.fileLocationField);
    JLabel dummyLabel = new JLabel("");
    this.fileChooserButton = new JButton("Choose File...");
    this.fileChooserButton.addActionListener(new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent e) {
        JFileChooser jf = new JFileChooser();
        int returnVal = jf
            .showOpenDialog(RegisterThroughFileWindow.this.dialog
                .getDialog());
        if (returnVal == JFileChooser.APPROVE_OPTION) {
          RegisterThroughFileWindow.this.fileLocationField.setText(jf
              .getSelectedFile().getAbsolutePath());
        }
      }
    });

    infoPanel.add(docTypeLabel);
    infoPanel.add(this.docTypeComboBox);
    infoPanel.add(fileLocationLabel);
    infoPanel.add(this.fileLocationField);
    infoPanel.add(dummyLabel);
    infoPanel.add(this.fileChooserButton);
    infoPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);

    JPanel buttonPanel = new JPanel();
    this.registerButton = new JButton("Register");
    this.registerButton.addActionListener(new AbstractAction() {
      @Override
View Full Code Here

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    this.parameterPanel.getContentPanel().removeAll();
    this.parameterTextFields.clear();
  }

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

    this.topicTextField = new XBayaTextField();
    XBayaLabel topicLabel = new XBayaLabel("Notification topic",
        this.topicTextField);

    this.gfacTextField = new XBayaTextField();
    XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);
   
    /*
     * extend
     */
    this.gridchemBridgeTextField = new XBayaTextField();
    this.usernameTextField = new XBayaTextField();
    XBayaLabel gridchemBridgeLabel = new XBayaLabel("GridChem Bridge URL", this.gridchemBridgeTextField);
    XBayaLabel usernameLabel = new XBayaLabel("Username", this.usernameTextField);
   
    //default value
    gridchemBridgeTextField.setText("http://129.79.49.227:8080/ogce-gridchem-bridge/");
   

    GridPanel infoPanel = new GridPanel();
    infoPanel.add(topicLabel);
    infoPanel.add(this.topicTextField);
    infoPanel.add(gfacLabel);
    infoPanel.add(this.gfacTextField);
   
    /*
     * extend
     */
    infoPanel.add(gridchemBridgeLabel);
    infoPanel.add(this.gridchemBridgeTextField);   
    infoPanel.add(usernameLabel);
    infoPanel.add(this.usernameTextField);
    infoPanel.layout(4, 2, GridPanel.WEIGHT_NONE, 1);   
   

    GridPanel mainPanel = new GridPanel();
    mainPanel.add(this.parameterPanel);
    mainPanel.add(infoPanel);
    mainPanel.layout(2, 1, 0, 0);

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

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

            }

        };
        this.list.getList().setCellRenderer(renderer);

        GridPanel mainPanel = new GridPanel();
        TitledBorder border = new TitledBorder(new EtchedBorder(),
                "Select a workflow to load");
        mainPanel.getSwingComponent().setBorder(border);
        mainPanel.add(this.list);
        mainPanel.layout(1, 1, 0, 0);

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

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    this.parameterPanel.getContentPanel().removeAll();
    this.parameterTextFields.clear();
  }

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

    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.xRegistryTextField = new XBayaTextField();
    XBayaLabel xRegistryLabel = new XBayaLabel("XRegistry URL",
        this.xRegistryTextField);
    this.gfacTextField = new XBayaTextField();
    XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);

    GridPanel infoPanel = new GridPanel();
    infoPanel.add(topicLabel);
    infoPanel.add(this.topicTextField);
    infoPanel.add(workflowInterpreterLabel);
    infoPanel.add(this.workflowInterpreterTextField);
    infoPanel.add(xRegistryLabel);
    infoPanel.add(this.xRegistryTextField);
    infoPanel.add(gfacLabel);
    infoPanel.add(this.gfacTextField);

    infoPanel.layout(4, 2, GridPanel.WEIGHT_NONE, 1);

    GridPanel mainPanel = new GridPanel();
    mainPanel.add(this.parameterPanel);
    mainPanel.add(infoPanel);
    mainPanel.layout(2, 1, 0, 0);

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

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    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);
    downloadPanel.add(keyLabel);
    downloadPanel.add(this.keyTextField);
    downloadPanel.add(folderLabel);
    downloadPanel.add(this.folderTextField);
    downloadPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);

    /*
     * Button Panel
     */ 
    JButton refreshButton = new JButton("Connect/Refresh");
    refreshButton.addActionListener(new AbstractAction() {

      private ChangeCredentialWindow credentialWindow;
     
      @Override
      public void actionPerformed(ActionEvent e) {
        System.out.println(AmazonCredential.getInstance().getAwsAccessKeyId());
        if (AmazonCredential.getInstance().getAwsAccessKeyId().isEmpty() || AmazonCredential.getInstance().getAwsSecretAccessKey().isEmpty()) {
          JOptionPane.showMessageDialog(AmazonS3UtilsWindow.this.dialog.getDialog(),
              "Aws Access Key not set!",
              "Error",
              JOptionPane.ERROR_MESSAGE);
         
          if (this.credentialWindow == null) {
            this.credentialWindow = new ChangeCredentialWindow(AmazonS3UtilsWindow.this.dialog.getDialog());
          }
          try {
            this.credentialWindow.show();
          } catch (Exception e1) {
            xBayaEngine.getErrorWindow().error(e1);
          }
         
          return;
        }
        AmazonS3UtilsWindow.this.s3Tree.clean();
        BucketsLoader bucketsLoader = new BucketsLoader(xBayaEngine, window.dialog.getDialog());
        bucketsLoader.load(getS3Service(), AmazonS3UtilsWindow.this.s3Tree);                     
      }
    });

    JButton uploadButton = new JButton("Upload");
    uploadButton.addActionListener(new AbstractAction() {

      @Override
      public void actionPerformed(ActionEvent e) {
        if ((window.fileTextField.getText().length() != 0) && (window.uploadBucketTextField.getText().length() != 0)) {
          S3Uploader s3Uploader = new S3Uploader(xBayaEngine, window.dialog.getDialog());
          s3Uploader.upload(getS3Service(), AmazonS3UtilsWindow.this.s3Tree, window.uploadBucketTextField.getText(), window.fileTextField.getText());
         
          window.fileTextField.setText("");
          window.folderTextField.setText("");                   
        } else {
          xBayaEngine.getErrorWindow().error(window.dialog.getDialog(), "Please give input to every upload fields");
        }
      }
    });

    JButton downloadButton = new JButton("Download");
    downloadButton.addActionListener(new AbstractAction() {

      @Override
      public void actionPerformed(ActionEvent e) {
        if ((window.downloadBucketTextField.getText().length() != 0) && (window.keyTextField.getText().length() != 0) && (window.folderTextField.getText().length() != 0)) {
          S3Downloader s3Downloader = new S3Downloader(xBayaEngine, window.dialog.getDialog());
          s3Downloader.download(getS3Service(), window.downloadBucketTextField.getText(), window.keyTextField.getText(), window.folderTextField.getText());
         
          window.downloadBucketTextField.setText("");
          window.keyTextField.setText("");
          window.folderTextField.setText("");
                     
        } else {
          xBayaEngine.getErrorWindow().error(window.dialog.getDialog(), "Please give input to every download fields");
        }
      }
    });

    JButton fileButton = new JButton("Choose File & Flolder");
    fileButton.addActionListener(new AbstractAction() {

      @Override
      public void actionPerformed(ActionEvent e) {
        final JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        int returnVal = fc.showOpenDialog(AmazonS3UtilsWindow.this.dialog.getDialog());

        if (returnVal == JFileChooser.APPROVE_OPTION) {
          String filePath = fc.getSelectedFile().getAbsolutePath();
          File file = fc.getSelectedFile();
          if (file.isFile()) {
            window.fileTextField.setText(filePath);
            window.folderTextField.setText("");
          } else if (file.isDirectory()) {
            window.folderTextField.setText(filePath);
            window.fileTextField.setText("");
          }
        }
      }
    });

    JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(new AbstractAction() {

      @Override
      public void actionPerformed(ActionEvent e) {
        hide();
      }
    });

    JPanel buttonPanel = new JPanel();
    buttonPanel.add(refreshButton);
    buttonPanel.add(uploadButton);
    buttonPanel.add(downloadButton);
    buttonPanel.add(fileButton);
    buttonPanel.add(cancelButton);

    /*
     * Main Panel
     */
    GridPanel mainPanel = new GridPanel(true);
    this.s3Tree = new S3Tree();
    mainPanel.add(new JScrollPane(this.s3Tree));
    mainPanel.add(uploadPanel);
    mainPanel.add(downloadPanel);
    mainPanel.layout(3, 1, 0, GridPanel.WEIGHT_EQUALLY);
   
   
    this.s3Tree.addTreeSelectionListener(new TreeSelectionListener() {     
      @Override
      public void valueChanged(TreeSelectionEvent e) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    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);
    infoPanel.add(this.secretAccessKeyTextField);

    infoPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);

    GridPanel mainPanel = new GridPanel();
    mainPanel.add(infoPanel);
    mainPanel.layout(1, 1, GridPanel.WEIGHT_EQUALLY, GridPanel.WEIGHT_EQUALLY);

    JButton okButton = new JButton("Ok");
    okButton.addActionListener(new AbstractAction() {

      @Override
View Full Code Here

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    this.inputLocationOnS3TextField.setText("s3n://xbaya-ec2-test/input/");
    this.outputLocationOnS3TextField.setText("s3n://xbaya-ec2-test/output/");
    this.jarFilePathOnS3TextField.setText("s3n://xbaya-ec2-test/jars/Hadoopv400.jar");
    this.mainClassNameTextField.setText("edu.indiana.extreme.HadoopRayTracer");
   
    GridPanel infoPanel = new GridPanel();
    infoPanel.add(accessKeyIDLabel);
    infoPanel.add(this.accessKeyIDTextField);
    infoPanel.add(secretAccessKeyLabel);
    infoPanel.add(this.secretAccessKeyTextField);
    infoPanel.add(keyPairNameLabel);
    infoPanel.add(this.keyPairNameTextField);
    infoPanel.add(numOfInstancesLabel);
    infoPanel.add(this.numOfInstancesTextField);
    infoPanel.add(jobFlowNameLabel);
    infoPanel.add(this.jobFlowNameTextField);
    infoPanel.add(logLocationOnS3Label);
    infoPanel.add(this.logLocationOnS3TextField);
    infoPanel.add(inputLocationOnS3Label);
    infoPanel.add(this.inputLocationOnS3TextField);
    infoPanel.add(outputLocationOnS3Label);
    infoPanel.add(this.outputLocationOnS3TextField);
    infoPanel.add(jarFilePathOnS3Label);
    infoPanel.add(this.jarFilePathOnS3TextField);
    infoPanel.add(mainClassNameLabel);
    infoPanel.add(this.mainClassNameTextField);
   
    infoPanel.layout(10, 2, GridPanel.WEIGHT_NONE, 1);
   
    GridPanel mainPanel = new GridPanel();
    mainPanel.add(infoPanel);
    mainPanel.layout(1, 1, 0, 0);
   
    this.invokeButton = new JButton("Invoke");
    this.invokeButton.addActionListener(new AbstractAction() {
      public void actionPerformed(ActionEvent e) {
        execute();
View Full Code Here

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

    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);
    mainPanel.add(this.numberOfInstanceSpinner);
    mainPanel.add(instanceTypeLabel);
    mainPanel.add(this.instanceTypeComboBox);
    mainPanel.add(keyLabel);
    mainPanel.add(radioPanel);
    mainPanel.layout(4, 2, 0, GridPanel.WEIGHT_EQUALLY);

    /*
     * Button Panel
     */
    JButton lunchButton = new JButton("Launch");
View Full Code Here

Examples of edu.indiana.extreme.xbaya.gui.GridPanel

  }

  private void initGUI() {
    this.list = new XbayaEnhancedList<EC2InstanceResult>();

    GridPanel mainPanel = new GridPanel();
    TitledBorder border = new TitledBorder(new EtchedBorder(), "My Instances");
    mainPanel.getSwingComponent().setBorder(border);
    mainPanel.add(this.list);
    mainPanel.layout(1, 1, 0, 0);

    /*
     * Connect/Refresh Button
     */
    JButton refreshButton = new JButton("Refresh");
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.