Package java.awt

Examples of java.awt.BorderLayout


    }
    if (firstFilter != null)
      m_fileChooser.setFileFilter(firstFilter);
    JPanel about = m_LoaderEditor.getAboutPanel();
    JPanel northPanel = new JPanel();
    northPanel.setLayout(new BorderLayout());
    if (about != null) {
      northPanel.add(about, BorderLayout.NORTH);
    }
    add(northPanel, BorderLayout.NORTH);
   
    final EnvironmentField ef = new EnvironmentField();
    JPanel efHolder = new JPanel();
    efHolder.setLayout(new BorderLayout());

    ef.setEnvironment(m_env);
    /*int width = ef.getPreferredSize().width;
    int height = ef.getPreferredSize().height;
//    ef.setMinimumSize(new Dimension(width * 2, height));
    ef.setPreferredSize(new Dimension(width * 2, height)); */
    m_fileText = ef;
   
    // only set the text on the EnvironmentField if the current file is not a directory
    if (!currentFileIsDir) {
      ef.setText(tmp.toString());
    }
   
    efHolder.add(ef, BorderLayout.CENTER);
    JButton browseBut = new JButton("Browse...");
    browseBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          //final JFrame jf = new JFrame("Choose file");
          final JDialog jf = new JDialog((JDialog)LoaderCustomizer.this.getTopLevelAncestor(),
              "Choose file", true);
          jf.setLayout(new BorderLayout());
          //jf.getContentPane().setLayout(new BorderLayout());
          jf.getContentPane().add(m_fileChooser, BorderLayout.CENTER);
          m_fileChooserFrame = jf;
          jf.pack();
          jf.setVisible(true);
        } catch (Exception ex) {
          ex.printStackTrace();
        }
      }
    });
   
    JPanel bP = new JPanel(); bP.setLayout(new BorderLayout());
    bP.setBorder(BorderFactory.createEmptyBorder(5,0,5,5));
    bP.add(browseBut, BorderLayout.CENTER);
    efHolder.add(bP, BorderLayout.EAST);
    JPanel alignedP = new JPanel();
    alignedP.setBorder(BorderFactory.createTitledBorder("File"));
    alignedP.setLayout(new BorderLayout());
    JLabel efLab = new JLabel("Filename", SwingConstants.RIGHT);
    efLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
    alignedP.add(efLab, BorderLayout.WEST);   
    alignedP.add(efHolder, BorderLayout.CENTER);
   
    northPanel.add(alignedP, BorderLayout.SOUTH);
       
    JPanel butHolder = new JPanel();
    //butHolder.setLayout(new GridLayout(1,2));
    butHolder.setLayout(new FlowLayout());
    JButton OKBut = new JButton("OK");
    OKBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          ((FileSourcedConverter)m_dsLoader.getLoader()).
          setFile(new File(ef.getText()));
          // tell the loader that a new file has been selected so
          // that it can attempt to load the header
          //m_dsLoader.setLoader(m_dsLoader.getLoader());
          m_dsLoader.newFileSelected();
        } catch (Exception ex) {
          ex.printStackTrace();
        }
        if (m_modifyListener != null) {
          m_modifyListener.setModifiedStatus(LoaderCustomizer.this, true);
        }
        m_parentWindow.dispose();
      }
    });

    JButton CancelBut = new JButton("Cancel");
    CancelBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {               
        if (m_modifyListener != null) {
          m_modifyListener.setModifiedStatus(LoaderCustomizer.this, false);
        }
       
        if (m_backup != null) {
          m_dsLoader.setLoader(m_backup);
        }
       
        m_parentWindow.dispose();
      }
    });
   
    butHolder.add(OKBut);
    butHolder.add(CancelBut);
   
    JPanel optionsHolder = new JPanel();
    optionsHolder.setLayout(new BorderLayout());
    optionsHolder.setBorder(BorderFactory.createTitledBorder("Other options"));

    optionsHolder.add(m_LoaderEditor, BorderLayout.SOUTH);
    JScrollPane scroller = new JScrollPane(optionsHolder);
   
View Full Code Here


    removeAll();
    m_visual =
      new BeanVisual("AttributeSummarizer",
         BeanVisual.ICON_PATH+"AttributeSummarizer.gif",
         BeanVisual.ICON_PATH+"AttributeSummarizer_animated.gif");
    setLayout(new BorderLayout());
    add(m_visual, BorderLayout.CENTER);
  }
View Full Code Here

    add(m_visual, BorderLayout.CENTER);
  }

  protected void appearanceFinal() {
    removeAll();
    setLayout(new BorderLayout());
  }
View Full Code Here

          m_plots.get(i).setColoringIndex(classCombo.getSelectedIndex());
        }
      }
     
      JPanel comboHolder = new JPanel();
      comboHolder.setLayout(new BorderLayout());
      JPanel tempHolder = new JPanel();
      tempHolder.setLayout(new BorderLayout());
      tempHolder.add(new JLabel("Class: "), BorderLayout.WEST);
      tempHolder.add(classCombo, BorderLayout.EAST);
      comboHolder.add(tempHolder, BorderLayout.WEST);
      add(comboHolder, BorderLayout.NORTH);
           
View Full Code Here

   
    m_plots = new ArrayList<AttributeVisualizationPanel>();     
   
    for (int i = 0; i < numPlots; i++) {
      JPanel temp = new JPanel();
      temp.setLayout(new BorderLayout());
      temp.setBorder(BorderFactory.createTitledBorder(m_visualizeDataSet.
                  attribute(i).name()));

      AttributeVisualizationPanel ap = new AttributeVisualizationPanel();
      m_plots.add(ap);
View Full Code Here

    final JScrollPane holderP = makePanel();

    final javax.swing.JFrame jf =
      new javax.swing.JFrame("Visualize");
    jf.setSize(800,600);
    jf.getContentPane().setLayout(new BorderLayout());
    jf.getContentPane().add(holderP, BorderLayout.CENTER);
    jf.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
    jf.dispose();
    m_framePoppedUp = false;
View Full Code Here

      private JPanel m_percentageP;
     
      protected double m_percentage = 0;
     
      public ConfusionCell() {
        setLayout(new BorderLayout());
        setBorder(BorderFactory.createEtchedBorder());
       
        add(m_conf_cell, BorderLayout.NORTH);
       
        m_percentageP = new JPanel() {
          public void paintComponent(Graphics gx) {
            super.paintComponent(gx);
           
            if (m_percentage > 0) {
              gx.setColor(Color.BLUE);
              int height = this.getHeight();
              double width = this.getWidth();
              int barWidth = (int)(m_percentage * width);
              gx.fillRect(0, 0, barWidth, height);
            }
          }
        };
       
        Dimension d = new Dimension(30,5);
        m_percentageP.setMinimumSize(d);
        m_percentageP.setPreferredSize(d);
        JPanel percHolder = new JPanel();
        percHolder.setLayout(new BorderLayout());
        percHolder.add(m_percentageP, BorderLayout.CENTER);
        percHolder.add(m_conf_perc, BorderLayout.EAST);
       
        add(percHolder, BorderLayout.SOUTH);
      }
View Full Code Here

    removeAll();
    m_visual = new BeanVisual("ModelPerformanceChart",
            BeanVisual.ICON_PATH+"ModelPerformanceChart.gif",
            BeanVisual.ICON_PATH
            +"ModelPerformanceChart_animated.gif");
    setLayout(new BorderLayout());
    add(m_visual, BorderLayout.CENTER);
  }
View Full Code Here

    add(m_visual, BorderLayout.CENTER);
  }

  protected void appearanceFinal() {
    removeAll();
    setLayout(new BorderLayout());
    setUpFinal();
  }
View Full Code Here

    m_framePoppedUp = true;

    final javax.swing.JFrame jf =
      new javax.swing.JFrame("Model Performance Chart");
    jf.setSize(800,600);
    jf.getContentPane().setLayout(new BorderLayout());
    jf.getContentPane().add(m_visPanel, BorderLayout.CENTER);
    jf.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
    jf.dispose();
    m_framePoppedUp = false;
View Full Code Here

TOP

Related Classes of java.awt.BorderLayout

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.