Example usage for javax.swing JScrollPane validate

List of usage examples for javax.swing JScrollPane validate

Introduction

In this page you can find the example usage for javax.swing JScrollPane validate.

Prototype

public void validate() 

Source Link

Document

Validates this container and all of its subcomponents.

Usage

From source file:com.nvinayshetty.DTOnator.FeedValidator.JsonFeedValidator.java

private void showAlert(JScrollPane exceptionLoggerPane, JLabel exceptionLabel, JSONException ex1) {
    exceptionLoggerPane.setVisible(true);
    exceptionLabel.setVisible(true);/*ww  w .  j a va  2 s .  c o m*/
    new ExceptionLogger(exceptionLabel).Log(ex1);
    exceptionLoggerPane.invalidate();
    exceptionLoggerPane.validate();
    exceptionLoggerPane.repaint();
}

From source file:edu.ucla.stat.SOCR.chart.demo.DotChart.java

protected void setMixPanel() {
    dataPanel2.removeAll();/*from www  .  j ava  2s  .  co  m*/
    graphPanel2.removeAll();

    graphPanel2.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, CHART_SIZE_Y * 2 / 3));
    graphPanel2.setLayout(new BoxLayout(graphPanel2, BoxLayout.Y_AXIS));
    if (chartPanel1 != null)
        graphPanel2.add(chartPanel1);
    if (chartPanel2 != null)
        graphPanel2.add(chartPanel2);
    graphPanel2.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Data"));
    JScrollPane dt = new JScrollPane(dataTable);
    dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));

    dataPanel2.add(dt);
    JScrollPane st = new JScrollPane(summaryPanel);
    st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
    dataPanel2.add(st);
    st.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Mapping"));
    mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
    dataPanel2.add(mapPanel);

    dataPanel2.validate();

    mixPanel.removeAll();
    mixPanel.add(graphPanel2, BorderLayout.WEST);
    mixPanel.add(new JScrollPane(dataPanel2), BorderLayout.CENTER);
    mixPanel.validate();
}

From source file:edu.ucla.stat.SOCR.chart.demo.PowerTransformQQNormalPlotChart.java

protected void setTable(XYDataset ds) {

    convertor.data2Table(raw_y, transformed_x, "Data", "Transformed Data", row_count);
    //convertor.dataset2Table(dataset);            
    JTable tempDataTable = convertor.getTable();

    resetTableRows(tempDataTable.getRowCount());
    resetTableColumns(tempDataTable.getColumnCount());

    for (int i = 0; i < tempDataTable.getColumnCount(); i++) {
        columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
        //  System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
    }//from   w w w  .j  av  a  2 s .  c o  m

    columnModel = dataTable.getColumnModel();
    dataTable.setTableHeader(new EditableHeader(columnModel));

    for (int i = 0; i < tempDataTable.getRowCount(); i++)
        for (int j = 0; j < tempDataTable.getColumnCount(); j++) {
            dataTable.setValueAt(tempDataTable.getValueAt(i, j), i, j);
        }

    dataPanel.removeAll();
    JScrollPane dt = new JScrollPane(dataTable);
    dataPanel.add(dt);
    dt.setRowHeaderView(headerTable);
    dataTable.setGridColor(Color.gray);
    dataTable.setShowGrid(true);
    dataTable.doLayout();
    // this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
    try {
        dataTable.setDragEnabled(true);
    } catch (Exception e) {
    }

    dataPanel.validate();

    // don't bring graph to the front
    if (tabbedPanelContainer.getTitleAt(tabbedPanelContainer.getSelectedIndex()) != ALL) {
        //   tabbedPanelContainer.setSelectedIndex(tabbedPanelContainer.indexOfComponent(graphPanel));
    } else {
        dataPanel2.removeAll();
        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Data"));
        JScrollPane dt2 = new JScrollPane(dataTable);
        dt2.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));
        dt2.setRowHeaderView(headerTable);
        dataPanel2.add(dt2);
        JScrollPane st = new JScrollPane(summaryPanel);
        st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
        dataPanel2.add(st);
        st.validate();

        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Mapping"));
        mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
        dataPanel2.add(mapPanel);

        dataPanel2.validate();
    }
}

From source file:edu.ucla.stat.SOCR.chart.demo.PowerTransformHistogramChart.java

protected void setMixPanel() {

    dataPanel2.removeAll();//  w w  w. j ava  2  s . c  o  m
    graphPanel2.removeAll();

    chartPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, CHART_SIZE_Y * 2 / 3));
    graphPanel2.add(chartPanel);
    graphPanel2.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Data"));
    JScrollPane dt = new JScrollPane(dataTable);
    dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));

    dataPanel2.add(dt);
    JScrollPane st = new JScrollPane(summaryPanel);
    st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
    dataPanel2.add(st);
    st.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Mapping"));
    mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
    dataPanel2.add(mapPanel);

    dataPanel2.validate();

    mixPanel.removeAll();
    mixPanel.add(graphPanel2, BorderLayout.WEST);
    mixPanel.add(new JScrollPane(dataPanel2), BorderLayout.CENTER);
    mixPanel.validate();
}

From source file:edu.ucla.stat.SOCR.chart.demo.PowerTransformHistogramChart.java

protected void setTable(IntervalXYDataset ds, boolean binChanged) {

    convertor.data2Table(raw_x, transformed_x, "Data", "Transformed Data", row_count);
    JTable tempDataTable = convertor.getTable();

    resetTableRows(tempDataTable.getRowCount());
    resetTableColumns(tempDataTable.getColumnCount());

    for (int i = 0; i < tempDataTable.getColumnCount(); i++) {
        columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
        //  System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
    }/*from  w w  w.  j  ava  2  s  . c  o  m*/

    columnModel = dataTable.getColumnModel();
    dataTable.setTableHeader(new EditableHeader(columnModel));

    for (int i = 0; i < tempDataTable.getRowCount(); i++)
        for (int j = 0; j < tempDataTable.getColumnCount(); j++) {
            dataTable.setValueAt(tempDataTable.getValueAt(i, j), i, j);
        }

    dataPanel.removeAll();
    JScrollPane dt = new JScrollPane(dataTable);
    dataPanel.add(dt);
    dt.setRowHeaderView(headerTable);
    dataTable.setGridColor(Color.gray);
    dataTable.setShowGrid(true);
    dataTable.doLayout();
    // this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
    try {
        dataTable.setDragEnabled(true);
    } catch (Exception e) {
    }

    dataPanel.validate();

    // don't bring graph to the front if the bin Size is not changed
    if (tabbedPanelContainer.getTitleAt(tabbedPanelContainer.getSelectedIndex()) != ALL) {
        if (binChanged)
            tabbedPanelContainer.setSelectedIndex(tabbedPanelContainer.indexOfComponent(graphPanel));
    } else {
        dataPanel2.removeAll();
        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Data"));
        JScrollPane dt2 = new JScrollPane(dataTable);
        dt2.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));
        dt2.setRowHeaderView(headerTable);
        dataPanel2.add(dt2);
        JScrollPane st = new JScrollPane(summaryPanel);
        st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
        dataPanel2.add(st);
        st.validate();

        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Mapping"));
        mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
        dataPanel2.add(mapPanel);

        dataPanel2.validate();
    }
}

From source file:edu.ucla.stat.SOCR.chart.demo.PowerTransformationFamilyChart.java

protected void setTable(XYDataset ds) {

    //System.out.println("setTable get Called");
    convertor.Power2Table(ds);//from  w  ww .  ja  v a 2  s.co  m
    //convertor.dataset2Table(dataset);            
    JTable tempDataTable = convertor.getTable();

    resetTableRows(tempDataTable.getRowCount());
    resetTableColumns(tempDataTable.getColumnCount());

    //System.out.println(tempDataTable.getRowCount());

    for (int i = 0; i < tempDataTable.getColumnCount(); i++) {
        columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
        //  System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
    }

    columnModel = dataTable.getColumnModel();
    dataTable.setTableHeader(new EditableHeader(columnModel));

    for (int i = 0; i < tempDataTable.getRowCount(); i++)
        for (int j = 0; j < tempDataTable.getColumnCount(); j++) {
            dataTable.setValueAt(tempDataTable.getValueAt(i, j), i, j);
        }

    dataPanel.removeAll();
    JScrollPane dt = new JScrollPane(dataTable);
    dataPanel.add(dt);
    dt.setRowHeaderView(headerTable);
    dataTable.setGridColor(Color.gray);
    dataTable.setShowGrid(true);
    dataTable.doLayout();
    // this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
    try {
        dataTable.setDragEnabled(true);
    } catch (Exception e) {
    }

    dataPanel.validate();

    // don't bring graph to the front
    if (tabbedPanelContainer.getTitleAt(tabbedPanelContainer.getSelectedIndex()) != ALL) {
        //   tabbedPanelContainer.setSelectedIndex(tabbedPanelContainer.indexOfComponent(graphPanel));
    } else {
        dataPanel2.removeAll();
        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Data"));
        JScrollPane dt2 = new JScrollPane(dataTable);
        dt2.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));
        dt2.setRowHeaderView(headerTable);
        dataPanel2.add(dt2);
        JScrollPane st = new JScrollPane(summaryPanel);
        st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
        dataPanel2.add(st);
        st.validate();

        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Mapping"));
        mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
        dataPanel2.add(mapPanel);

        dataPanel2.validate();
    }
}

From source file:edu.ucla.stat.SOCR.chart.demo.PowerTransformXYScatterChart.java

protected void setTable(XYDataset ds) {

    convertor.Y2Table(raw_x, raw_y, transformed_x, transformed_y, row_count);
    JTable tempDataTable = convertor.getTable();

    resetTableRows(tempDataTable.getRowCount() + 1);
    resetTableColumns(tempDataTable.getColumnCount());

    for (int i = 0; i < tempDataTable.getColumnCount(); i++) {
        columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
        //  System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
    }//from www  .ja va2s. co  m

    columnModel = dataTable.getColumnModel();
    dataTable.setTableHeader(new EditableHeader(columnModel));

    for (int i = 0; i < tempDataTable.getRowCount(); i++)
        for (int j = 0; j < tempDataTable.getColumnCount(); j++) {
            dataTable.setValueAt(tempDataTable.getValueAt(i, j), i, j);
        }

    dataPanel.removeAll();
    JScrollPane dt = new JScrollPane(dataTable);
    dataPanel.add(dt);
    dt.setRowHeaderView(headerTable);
    dataTable.setGridColor(Color.gray);
    dataTable.setShowGrid(true);
    dataTable.doLayout();
    // this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
    try {
        dataTable.setDragEnabled(true);
    } catch (Exception e) {
    }

    dataPanel.validate();

    // don't bring graph to the front
    if (tabbedPanelContainer.getTitleAt(tabbedPanelContainer.getSelectedIndex()) != ALL) {
        //   tabbedPanelContainer.setSelectedIndex(tabbedPanelContainer.indexOfComponent(graphPanel));
    } else {
        dataPanel2.removeAll();
        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Data"));
        JScrollPane dt2 = new JScrollPane(dataTable);
        dt2.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));
        dt2.setRowHeaderView(headerTable);
        dataPanel2.add(dt2);
        JScrollPane st = new JScrollPane(summaryPanel);
        st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
        dataPanel2.add(st);
        st.validate();

        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Mapping"));
        mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
        dataPanel2.add(mapPanel);

        dataPanel2.validate();
    }
}

From source file:edu.ucla.stat.SOCR.chart.SuperXYZChart.java

protected void setMixPanel() {
    /*super.setMixPanel();
    return;*///from   w w  w. java  2 s . c  o m

    dataPanel2.removeAll();
    graphPanel2.removeAll();

    chartPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, CHART_SIZE_Y * 2 / 3));
    graphPanel2.add(chartPanel);
    sliderPanel.removeAll();
    /*   sliderPanel.add(new JLabel("Bin Size"));
         sliderPanel.add(this.binSlider);
         sliderPanel.add(new JLabel(":"+this.binSlider.getValue()));*/
    zSlider.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, 100));
    sliderPanel.add(this.zSlider);
    sliderPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, 100));
    graphPanel2.add(sliderPanel); // the slider
    graphPanel2.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Data"));
    JScrollPane dt = new JScrollPane(dataTable);
    dt.setRowHeaderView(headerTable);
    dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));

    dataPanel2.add(dt);
    JScrollPane st = new JScrollPane(summaryPanel);
    st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
    dataPanel2.add(st);
    st.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Mapping"));
    mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
    dataPanel2.add(mapPanel);

    dataPanel2.validate();

    mixPanel.removeAll();
    mixPanel.add(graphPanel2, BorderLayout.WEST);
    mixPanel.add(new JScrollPane(dataPanel2), BorderLayout.CENTER);
    mixPanel.validate();
}

From source file:edu.ucla.stat.SOCR.chart.SuperPowerChart.java

/**
* make the show_all panel/* www . j  a v a2s.  c  o  m*/
*/
protected void setMixPanel() {
    /*super.setMixPanel();
    return;*/

    dataPanel2.removeAll();
    graphPanel2.removeAll();

    chartPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, CHART_SIZE_Y * 2 / 3));
    graphPanel2.add(chartPanel);
    //   sliderPanel.removeAll();
    /*   sliderPanel.add(new JLabel("Bin Size"));
         sliderPanel.add(this.binSlider);
         sliderPanel.add(new JLabel(":"+this.binSlider.getValue()));*/
    /*   powerSlider.setPreferredSize(new Dimension(CHART_SIZE_X*2/3,100));
         sliderPanel.add(this.powerSlider);
        sliderPanel.setPreferredSize(new Dimension(CHART_SIZE_X*2/3,100));*/
    //   graphPanel2.add(sliderPanel); // the slider
    graphPanel2.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Data"));
    JScrollPane dt = new JScrollPane(dataTable);
    dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));

    dataPanel2.add(dt);
    JScrollPane st = new JScrollPane(summaryPanel);
    st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
    dataPanel2.add(st);
    st.validate();

    dataPanel2.add(new JLabel(" "));
    dataPanel2.add(new JLabel("Mapping"));
    mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
    dataPanel2.add(mapPanel);

    dataPanel2.validate();

    mixPanel.removeAll();
    mixPanel.add(graphPanel2, BorderLayout.WEST);
    mixPanel.add(new JScrollPane(dataPanel2), BorderLayout.CENTER);
    mixPanel.validate();
}

From source file:edu.ucla.stat.SOCR.chart.SuperPowerChart.java

protected void setTable(XYDataset ds) {

    convertor.Power2Table(ds);//  w  w  w  .j  a  va 2 s . c  o m
    //convertor.dataset2Table(dataset);            
    JTable tempDataTable = convertor.getTable();

    resetTableRows(tempDataTable.getRowCount() + 1);
    resetTableColumns(tempDataTable.getColumnCount());

    for (int i = 0; i < tempDataTable.getColumnCount(); i++) {
        columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
        //  System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
    }

    columnModel = dataTable.getColumnModel();
    dataTable.setTableHeader(new EditableHeader(columnModel));

    for (int i = 0; i < tempDataTable.getRowCount(); i++)
        for (int j = 0; j < tempDataTable.getColumnCount(); j++) {
            dataTable.setValueAt(tempDataTable.getValueAt(i, j), i, j);
        }

    dataPanel.removeAll();
    dataPanel.add(new JScrollPane(dataTable));
    dataTable.setGridColor(Color.gray);
    dataTable.setShowGrid(true);
    dataTable.doLayout();
    // this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
    try {
        dataTable.setDragEnabled(true);
    } catch (Exception e) {
    }

    dataPanel.validate();

    // don't bring graph to the front
    if (tabbedPanelContainer.getTitleAt(tabbedPanelContainer.getSelectedIndex()) != ALL) {
        //   tabbedPanelContainer.setSelectedIndex(tabbedPanelContainer.indexOfComponent(graphPanel));
    } else {
        dataPanel2.removeAll();
        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Data"));
        JScrollPane dt = new JScrollPane(dataTable);
        dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8));

        dataPanel2.add(dt);
        JScrollPane st = new JScrollPane(summaryPanel);
        st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6));
        dataPanel2.add(st);
        st.validate();

        dataPanel2.add(new JLabel(" "));
        dataPanel2.add(new JLabel("Mapping"));
        mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2));
        dataPanel2.add(mapPanel);

        dataPanel2.validate();
    }
}