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.cfinternet.v2_0.CFInternetSwing.null.java

public CFInternetSwingSecFormPickerJPanel(ICFInternetSwingSchema argSchema, ICFInternetSecFormObj argFocus,
        ICFInternetSecAppObj argContainer, Collection<ICFInternetSecFormObj> argDataCollection,
        ICFInternetSwingSecFormChosen whenChosen) {
    super();// w  ww.  j av  a 2s.  c o  m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedSecForm();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsSecForm(argFocus);
}

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

public CFAsteriskSwingSecGroupPickerJPanel(ICFAsteriskSwingSchema argSchema, ICFSecuritySecGroupObj argFocus,
        ICFSecurityClusterObj argContainer, Collection<ICFSecuritySecGroupObj> argDataCollection,
        ICFAsteriskSwingSecGroupChosen whenChosen) {
    super();//  w  w w .jav a 2s.c o  m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedSecGroup();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsSecGroup(argFocus);
}

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

public CFAsteriskSwingDomainBasePickerJPanel(ICFAsteriskSwingSchema argSchema,
        ICFInternetDomainBaseObj argFocus, ICFLibAnyObj argContainer,
        Collection<ICFInternetDomainBaseObj> argDataCollection, ICFAsteriskSwingDomainBaseChosen whenChosen) {
    super();//  ww w.  ja  va2  s .  com
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedDomainBase();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsDomainBase(argFocus);
}

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

public CFAsteriskSwingSecAppPickerJPanel(ICFAsteriskSwingSchema argSchema, ICFSecuritySecAppObj argFocus,
        ICFSecurityClusterObj argContainer, Collection<ICFSecuritySecAppObj> argDataCollection,
        ICFAsteriskSwingSecAppChosen whenChosen) {
    super();/*from  w w  w.ja v a2  s . c om*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedSecApp();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsSecApp(argFocus);
}

From source file:net.sourceforge.msscodefactory.cfinternet.v2_0.CFInternetSwing.CFInternetSwingISOLanguageFinderJPanel.java

public CFInternetSwingISOLanguageFinderJPanel(ICFInternetSwingSchema argSchema) {
    super();/*ww w  .j  a v a 2  s .co  m*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    swingSchema = argSchema;
    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);
    add(dataScrollPane);
    loadData(true);
    doLayout();
    swingIsInitializing = false;
}

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

public CFAsteriskSwingProjectBasePickerJPanel(ICFAsteriskSwingSchema argSchema,
        ICFInternetProjectBaseObj argFocus, ICFLibAnyObj argContainer,
        Collection<ICFInternetProjectBaseObj> argDataCollection, ICFAsteriskSwingProjectBaseChosen whenChosen) {
    super();//from  w ww  . j  av a2  s  .  co  m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedProjectBase();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsProjectBase(argFocus);
}

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

public CFAsteriskSwingRealProjectPickerJPanel(ICFAsteriskSwingSchema argSchema,
        ICFInternetRealProjectObj argFocus, ICFLibAnyObj argContainer,
        Collection<ICFInternetRealProjectObj> argDataCollection, ICFAsteriskSwingRealProjectChosen whenChosen) {
    super();//from w  w w . ja v  a2 s  .  c  o m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedRealProject();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsRealProject(argFocus);
}

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

public CFAsteriskSwingTSecGroupPickerJPanel(ICFAsteriskSwingSchema argSchema, ICFSecurityTSecGroupObj argFocus,
        ICFSecurityTenantObj argContainer, Collection<ICFSecurityTSecGroupObj> argDataCollection,
        ICFAsteriskSwingTSecGroupChosen whenChosen) {
    super();//from ww w. jav a 2  s . co  m
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedTSecGroup();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsTSecGroup(argFocus);
}

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

public CFAsteriskSwingSecFormPickerJPanel(ICFAsteriskSwingSchema argSchema, ICFSecuritySecFormObj argFocus,
        ICFSecuritySecAppObj argContainer, Collection<ICFSecuritySecFormObj> argDataCollection,
        ICFAsteriskSwingSecFormChosen whenChosen) {
    super();/* w ww  .j av a2s . c  om*/
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedSecForm();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsSecForm(argFocus);
}

From source file:net.sourceforge.msscodefactory.cfinternet.v2_0.CFInternetSwing.CFInternetSwingSecGroupMemberPickerJPanel.java

public CFInternetSwingSecGroupMemberPickerJPanel(ICFInternetSwingSchema argSchema,
        ICFInternetSecGroupMemberObj argFocus, ICFInternetSecGroupObj argContainer,
        Collection<ICFInternetSecGroupMemberObj> argDataCollection,
        ICFInternetSwingSecGroupMemberChosen whenChosen) {
    super();//  w  w  w . ja  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");
    }
    if (whenChosen == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 5,
                "whenChosen");
    }
    invokeWhenChosen = whenChosen;
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    swingFocus = argFocus;
    swingContainer = argContainer;
    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);
    actionCancel = new ActionCancel();
    buttonCancel = new JButton(actionCancel);
    actionChooseNone = new ActionChooseNone();
    buttonChooseNone = new JButton(actionChooseNone);
    actionChooseSelected = new ActionChooseSelectedSecGroupMember();
    buttonChooseSelected = new JButton(actionChooseSelected);
    // Do initial layout
    setSize(1024, 480);
    add(buttonChooseNone);
    add(buttonChooseSelected);
    add(buttonCancel);
    add(dataScrollPane);
    dataScrollPane.setBounds(0, 35, 1024, 455);
    doLayout();
    setSwingFocusAsSecGroupMember(argFocus);
}