Example usage for javax.swing JTable AUTO_RESIZE_OFF

List of usage examples for javax.swing JTable AUTO_RESIZE_OFF

Introduction

In this page you can find the example usage for javax.swing JTable AUTO_RESIZE_OFF.

Prototype

int AUTO_RESIZE_OFF

To view the source code for javax.swing JTable AUTO_RESIZE_OFF.

Click Source Link

Document

Do not adjust column widths automatically; use a horizontal scrollbar instead.

Usage

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingContactTagListJPanel.java

public CFAccSwingContactTagListJPanel(ICFAccSwingSchema argSchema, ICFAccContactObj argContainer,
        ICFAccContactTagObj argFocus, Collection<ICFAccContactTagObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from  w  w w .  ja  v  a2s .c  om
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAddressTagListJPanel.java

public CFAccSwingAddressTagListJPanel(ICFAccSwingSchema argSchema, ICFAccAddressObj argContainer,
        ICFAccAddressTagObj argFocus, Collection<ICFAccAddressTagObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();//www  .j  a  va  2 s.c  o  m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:org.drugis.addis.gui.builder.NetworkMetaAnalysisView.java

private void setColumnWidths(final JTable table) {
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    for (final TableColumn c : Collections.list(table.getColumnModel().getColumns())) {
        c.setMinWidth(170);/*  w w w . j  av  a  2 s.  c om*/
        c.setPreferredWidth(170);
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_1.CFEnSyntaxSwing.CFEnSyntaxSwingTSecGroupListJPanel.java

public CFEnSyntaxSwingTSecGroupListJPanel(ICFEnSyntaxSwingSchema argSchema, ICFEnSyntaxTenantObj argContainer,
        ICFEnSyntaxTSecGroupObj argFocus, Collection<ICFEnSyntaxTSecGroupObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();/*from  w ww.  j  a v  a  2  s .  c om*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingMimeTypeListJPanel.java

public CFAsteriskSwingMimeTypeListJPanel(ICFAsteriskSwingSchema argSchema, ICFLibAnyObj argContainer,
        ICFInternetMimeTypeObj argFocus, Collection<ICFInternetMimeTypeObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();/*from   ww  w. j a v  a 2  s  .c  o  m*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingISOCountryListJPanel.java

public CFAsteriskSwingISOCountryListJPanel(ICFAsteriskSwingSchema argSchema, ICFLibAnyObj argContainer,
        ICFSecurityISOCountryObj argFocus, Collection<ICFSecurityISOCountryObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from w w  w  .j  av  a  2  s.  co m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:com.clough.android.adbv.view.MainFrame.java

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jButton2 = new javax.swing.JButton();
    splitPane0 = new javax.swing.JSplitPane();
    queryHistoryContainerPanel = new javax.swing.JPanel();
    jTabbedPane4 = new javax.swing.JTabbedPane();
    jScrollPane3 = new javax.swing.JScrollPane();
    tableInfoTree = new javax.swing.JTree();
    jPanel4 = new javax.swing.JPanel();
    splitPane1 = new javax.swing.JSplitPane();
    splitPane2 = new javax.swing.JSplitPane();
    jPanel1 = new javax.swing.JPanel();
    queryRootConatinerPanel = new javax.swing.JPanel();
    jTabbedPane3 = new javax.swing.JTabbedPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    queryingTextArea = new javax.swing.JTextArea();
    tableContainerPanel = new javax.swing.JPanel();
    jTabbedPane2 = new javax.swing.JTabbedPane();
    jScrollPane2 = new javax.swing.JScrollPane();
    resultTable = new javax.swing.JTable();
    jPanel2 = new javax.swing.JPanel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    historyScrollPane = new javax.swing.JScrollPane();
    jPanel5 = new javax.swing.JPanel();
    historyContainingPanel = new javax.swing.JPanel();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu3 = new javax.swing.JMenu();
    exitMenuItem = new javax.swing.JMenuItem();
    queryMenu = new javax.swing.JMenu();
    runQueryMenuItem = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jsonTextMenuItem = new javax.swing.JMenuItem();
    tableTextMenuItem = new javax.swing.JMenuItem();
    jMenu4 = new javax.swing.JMenu();
    refreshDatabaseMenuItem = new javax.swing.JMenuItem();

    jButton2.setText("jButton2");

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    queryHistoryContainerPanel.setBackground(new java.awt.Color(254, 254, 254));

    jTabbedPane4.setOpaque(true);//from   w w  w.j  av  a2 s. c  om

    javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
    tableInfoTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
    jScrollPane3.setViewportView(tableInfoTree);

    jTabbedPane4.addTab("Structure", jScrollPane3);

    javax.swing.GroupLayout queryHistoryContainerPanelLayout = new javax.swing.GroupLayout(
            queryHistoryContainerPanel);
    queryHistoryContainerPanel.setLayout(queryHistoryContainerPanelLayout);
    queryHistoryContainerPanelLayout.setHorizontalGroup(queryHistoryContainerPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane4));
    queryHistoryContainerPanelLayout.setVerticalGroup(
            queryHistoryContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE));

    splitPane0.setLeftComponent(queryHistoryContainerPanel);

    splitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

    jPanel1.setBackground(new java.awt.Color(254, 254, 254));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    splitPane2.setTopComponent(jPanel1);

    queryingTextArea.setColumns(20);
    queryingTextArea.setFont(new java.awt.Font("DialogInput", 0, 12)); // NOI18N
    queryingTextArea.setRows(5);
    jScrollPane1.setViewportView(queryingTextArea);

    jTabbedPane3.addTab("Query", jScrollPane1);

    javax.swing.GroupLayout queryRootConatinerPanelLayout = new javax.swing.GroupLayout(
            queryRootConatinerPanel);
    queryRootConatinerPanel.setLayout(queryRootConatinerPanelLayout);
    queryRootConatinerPanelLayout.setHorizontalGroup(
            queryRootConatinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE));
    queryRootConatinerPanelLayout.setVerticalGroup(
            queryRootConatinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE));

    splitPane2.setTopComponent(queryRootConatinerPanel);

    resultTable.setAutoCreateRowSorter(true);
    resultTable.setFont(new java.awt.Font("Consolas", 0, 11)); // NOI18N
    resultTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {

    }, new String[] {

    }));
    resultTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    jScrollPane2.setViewportView(resultTable);

    jTabbedPane2.addTab("Result table", jScrollPane2);

    javax.swing.GroupLayout tableContainerPanelLayout = new javax.swing.GroupLayout(tableContainerPanel);
    tableContainerPanel.setLayout(tableContainerPanelLayout);
    tableContainerPanelLayout.setHorizontalGroup(
            tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE));
    tableContainerPanelLayout.setVerticalGroup(
            tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE));

    splitPane2.setRightComponent(tableContainerPanel);

    splitPane1.setLeftComponent(splitPane2);

    historyContainingPanel.setAutoscrolls(true);

    javax.swing.GroupLayout historyContainingPanelLayout = new javax.swing.GroupLayout(historyContainingPanel);
    historyContainingPanel.setLayout(historyContainingPanelLayout);
    historyContainingPanelLayout.setHorizontalGroup(historyContainingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 415, Short.MAX_VALUE));
    historyContainingPanelLayout.setVerticalGroup(historyContainingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 416, Short.MAX_VALUE));

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout
            .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(historyContainingPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                    .addComponent(historyContainingPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 39, Short.MAX_VALUE)));

    historyScrollPane.setViewportView(jPanel5);

    jTabbedPane1.addTab("History", historyScrollPane);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1));

    splitPane1.setRightComponent(jPanel2);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(splitPane1, javax.swing.GroupLayout.Alignment.TRAILING));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(splitPane1));

    splitPane0.setRightComponent(jPanel4);

    jMenu3.setText("File");

    exitMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F,
            java.awt.event.InputEvent.ALT_MASK));
    exitMenuItem.setText("Exit");
    exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitMenuItemActionPerformed(evt);
        }
    });
    jMenu3.add(exitMenuItem);

    jMenuBar1.add(jMenu3);

    queryMenu.setText("Query");

    runQueryMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F12,
            java.awt.event.InputEvent.SHIFT_MASK));
    runQueryMenuItem.setText("Run");
    runQueryMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runQueryMenuItemActionPerformed(evt);
        }
    });
    queryMenu.add(runQueryMenuItem);

    jMenuBar1.add(queryMenu);

    jMenu2.setText("Result");

    jsonTextMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J,
            java.awt.event.InputEvent.CTRL_MASK));
    jsonTextMenuItem.setText("JSON text view");
    jsonTextMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jsonTextMenuItemActionPerformed(evt);
        }
    });
    jMenu2.add(jsonTextMenuItem);

    tableTextMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T,
            java.awt.event.InputEvent.CTRL_MASK));
    tableTextMenuItem.setText("Table text view");
    tableTextMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            tableTextMenuItemActionPerformed(evt);
        }
    });
    jMenu2.add(tableTextMenuItem);

    jMenuBar1.add(jMenu2);

    jMenu4.setText("Database");

    refreshDatabaseMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R,
            java.awt.event.InputEvent.SHIFT_MASK));
    refreshDatabaseMenuItem.setText("Refresh");
    refreshDatabaseMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            refreshDatabaseMenuItemActionPerformed(evt);
        }
    });
    jMenu4.add(refreshDatabaseMenuItem);

    jMenuBar1.add(jMenu4);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(splitPane0));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(splitPane0));

    pack();
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchSwing.CFFreeSwitchSwingISOCountryListJPanel.java

public CFFreeSwitchSwingISOCountryListJPanel(ICFFreeSwitchSwingSchema argSchema, ICFLibAnyObj argContainer,
        ICFSecurityISOCountryObj argFocus, Collection<ICFSecurityISOCountryObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();/*from ww w .j  a va  2 s.c o m*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAttachmentTagListJPanel.java

public CFAccSwingAttachmentTagListJPanel(ICFAccSwingSchema argSchema, ICFAccAttachmentObj argContainer,
        ICFAccAttachmentTagObj argFocus, Collection<ICFAccAttachmentTagObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();/*from ww  w  .ja  v  a2  s .  com*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAccountContactListJPanel.java

public CFAccSwingAccountContactListJPanel(ICFAccSwingSchema argSchema, ICFAccAccountObj argContainer,
        ICFAccAccountContactObj argFocus, Collection<ICFAccAccountContactObj> argDataCollection,
        ICFJRefreshCallback refreshCallback, boolean sortByChain) {
    super();//from w ww.ja  va 2 s  .c  om
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    swingRefreshCallback = refreshCallback;
    swingSortByChain = sortByChain;
    setSwingDataCollection(argDataCollection);
    dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel());
    dataTable.addMouseListener(getDataListMouseAdapter());
    dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    dataTable.setUpdateSelectionOnSort(true);
    dataTable.setRowHeight(25);
    getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener());
    dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    dataScrollPane.setColumnHeader(new JViewport() {
        @Override
        public Dimension getPreferredSize() {
            Dimension sz = super.getPreferredSize();
            sz.height = 25;
            return (sz);
        }
    });
    dataTable.setFillsViewportHeight(true);
    // Do initial layout
    setSize(1024, 480);
    JMenuBar menuBar = getPanelMenuBar();
    add(menuBar);
    menuBar.setBounds(0, 0, 1024, 25);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 25, 1024, 455);
    adjustListMenuBar();
    doLayout();
    swingIsInitializing = false;
}