List of usage examples for javax.swing ScrollPaneConstants VERTICAL_SCROLLBAR_ALWAYS
int VERTICAL_SCROLLBAR_ALWAYS
To view the source code for javax.swing ScrollPaneConstants VERTICAL_SCROLLBAR_ALWAYS.
Click Source Link
From source file:org.fhcrc.cpl.viewer.gui.MRMDialog.java
private void peaksDataInitializations() { String classElements[] = _ecurveclass.getName().split("\\."); elutionTableLabel.setText("<html><body><center>Elution Data<br><font size='-1'>(" + classElements[classElements.length - 1] + ")</font></center></body></html>"); elutionTableLabel.setHorizontalAlignment(JLabel.CENTER); elutionTableLabel.setHorizontalTextPosition(JLabel.CENTER); if (transDefHeader == null || transDefHeader.getAQUApairs() == null || transDefHeader.getAQUApairs().size() == 0) { buttonFindMate.setVisible(false); } else {/* w w w. ja v a2 s.c om*/ buttonFindMate.setVisible(true); } peaksScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); peaksScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); peaksTable = new JTable(new PeaksTableModel()); //peaksTable.setPreferredScrollableViewportSize(new Dimension(500, 700)); peaksTable.setSelectionModel(new peaksTableSelectionModel()); peaksTable.setAutoscrolls(true); peaksTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); int totalTableRows = 1; for (MRMTransition curTrans : _mrmTransitions) totalTableRows += (1 + curTrans.getDaughters().size()); ((PeaksTableModel) (peaksTable.getModel())).data = new Object[totalTableRows - 1][peaksData.values().length]; for (peaksData pd : EnumSet.allOf(peaksData.class)) { peaksTable.getColumnModel().getColumn(pd.colno).setPreferredWidth(pd.colWidth); } peaksTable.doLayout(); ((DefaultCellEditor) peaksTable.getDefaultEditor(peaksData.Accept.colClass)).setClickCountToStart(1); int i = 0; for (MRMTransition curTrans : _mrmTransitions) { curTrans.setGraphData(makeParentSeries(curTrans)); int curPrecursorIndex = i; curTrans.setTableRow(curPrecursorIndex); for (peaksData pd : EnumSet.allOf(peaksData.class)) { ((PeaksTableModel) (peaksTable.getModel())).data[i][pd.colno] = null; pd.makeVisible(true); } ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Accept.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Precursor.colno] = curTrans; for (MRMDaughter d : curTrans.getDaughters().values()) { i++; d.setGraphData(d.makeDaughterSeries()); d.setContinDaughterData(d.makeDaughterSeries(d, true)); d.setElutionDataTableRow(i); ElutionCurveStrategy bes = ElutionCurveStrategy.getInstance(curTrans, d, _ecurveclass); bes.calculateParentElutionCurves(null); bes.calculateDaughterElutionCurves(null); bes.calculateBestCurves(); d.calculateQuality(); curTrans.getElutionCurves().put(d, bes); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Accept.colno] = new Boolean( !Utils.allYsAre0(d)); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Peptide.colno] = ""; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Precursor.colno] = curTrans; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Daughter.colno] = d; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.CoStart.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.CoEnd.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.CoDelta.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.AUC.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.MaxPeak.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.MidTime.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Quality.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Label.colno] = ""; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Code.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.LHRatio.colno] = null; ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Comment.colno] = ""; if (transDefHeader != null && transDefHeader.getDToTD() != null && transDefHeader.getDToTD().get(d) != null) { TransitionDefinition td = transDefHeader.getDToTD().get(d); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Peptide.colno] = td.getPeptide(); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.Peptide.colno] = td.getPeptide(); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Code.colno] = new Integer( td.getAQUAcode()); } ElutionCurve bestPrecursorCurve = bes.getBestParentCurve(); if (bestPrecursorCurve == null || bestPrecursorCurve.getMinElutionTimeSecs() <= 0.0) { ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.AUC.colno] = new Float(-1); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.MaxPeak.colno] = new Float(-1); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.Quality.colno] = new Float(-1); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.MidTime.colno] = new Float(-1); } else { ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.AUC.colno] = new Float( bestPrecursorCurve.getAUC()); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.MaxPeak.colno] = new Float( bestPrecursorCurve.getHighestPointY()); ((PeaksTableModel) (peaksTable .getModel())).data[curPrecursorIndex][peaksData.Quality.colno] = new Float( curTrans.getQuality()); } ElutionCurve bestDaughterCurve = bes.getBestDaughterCurve(); if (bestDaughterCurve == null || bestDaughterCurve.getMinElutionTimeSecs() <= 0.0) { ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Accept.colno] = new Boolean( false); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.AUC.colno] = new Float(-1); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.MaxPeak.colno] = new Float(-1); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Quality.colno] = new Float(-1); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.MidTime.colno] = new Float(-1); } else { ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.AUC.colno] = new Float( bestDaughterCurve.getAUC()); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.MaxPeak.colno] = new Float( bestDaughterCurve.getHighestPointY()); d.setBestElutionCurve(bestDaughterCurve); ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Quality.colno] = new Float( d.getQuality()); if (_minPeakCutoff > 0 && bestDaughterCurve.getHighestPointY() < _minPeakCutoff) ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Accept.colno] = new Boolean( false); if (_minAreaCutoff > 0 && bestDaughterCurve.getAUC() < _minAreaCutoff) ((PeaksTableModel) (peaksTable.getModel())).data[i][peaksData.Accept.colno] = new Boolean( false); } } curTrans.setElutionRegionStart(curTrans.calculateMinOfAllBestDaughterCurves()); curTrans.setElutionRegionEnd(curTrans.calculateMaxOfAllBestDaughterCurves()); curTrans.calcMaxYofAllDaughters(); for (int j = curPrecursorIndex; j <= i; j++) { ((PeaksTableModel) (peaksTable.getModel())).data[j][peaksData.CoStart.colno] = new Float( curTrans.getElutionRegionStart()); ((PeaksTableModel) (peaksTable.getModel())).data[j][peaksData.CoEnd.colno] = new Float( curTrans.getElutionRegionEnd()); ((PeaksTableModel) (peaksTable.getModel())).data[j][peaksData.CoDelta.colno] = new Float( curTrans.getElutionRegionEnd() - curTrans.getElutionRegionStart()); ((PeaksTableModel) (peaksTable.getModel())).data[j][peaksData.MidTime.colno] = new Float( curTrans.getCalcXatMaxYAllDaughters()); } i++; } peaksTable.setDefaultRenderer(MRMTransition.class, new MRMTransitionTableRenderer(false)); peaksTable.setDefaultRenderer(MRMDaughter.class, new MRMDaughterTableRenderer(false)); peaksTable.setDefaultRenderer(Number.class, new MRMNumberTableRenderer()); peaksTable.setDefaultRenderer(Integer.class, new MRMNumberTableRenderer()); peaksTable.setDefaultRenderer(Boolean.class, new MRMBooleanRenderer()); peaksTable.getColumnModel().getColumn(peaksData.CoStart.colno).setCellEditor(new NumberTableCellEditor()); peaksTable.getColumnModel().getColumn(peaksData.CoEnd.colno).setCellEditor(new NumberTableCellEditor()); peaksTable.getColumnModel().getColumn(peaksData.Code.colno).setCellEditor(new NumberTableCellEditor()); peaksTable.getColumnModel().getColumn(peaksData.LHRatio.colno).setCellEditor(new NumberTableCellEditor()); peaksScrollPane.getViewport().setView(peaksTable); if (transDefHeader == null) { peaksData.Peptide.makeVisible(false); peaksData.Label.makeVisible(false); peaksData.LHRatio.makeVisible(false); peaksData.Code.makeVisible(false); } else { if (transDefHeader.getAQUApairs() == null || transDefHeader.getAQUApairs().isEmpty()) { peaksData.Label.makeVisible(false); peaksData.LHRatio.makeVisible(false); peaksData.Code.makeVisible(false); } } // "Quality" column, currently unused, is invisible unless one or more of its // values is not -1 peaksData.Quality.makeVisible(!Utils.qualColIsEmpty()); peaksScrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent ae) { if (!ae.getValueIsAdjusting()) { peaksTable.repaint(); } } }); peaksTable.getModel().addTableModelListener(new peaksTableListener()); _ptmlsl = new PeaksTableListSelectionListener(); peaksTable.getSelectionModel().addListSelectionListener(_ptmlsl); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingISOCurrencyFinderJPanel.java
public CFAsteriskSwingISOCurrencyFinderJPanel(ICFAsteriskSwingSchema argSchema) { super();/*from www . java2s . 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.CFAsteriskSwingISOLanguagePickerJPanel.java
public CFAsteriskSwingISOLanguagePickerJPanel(ICFAsteriskSwingSchema argSchema, ICFSecurityISOLanguageObj argFocus, ICFLibAnyObj argContainer, Collection<ICFSecurityISOLanguageObj> argDataCollection, ICFAsteriskSwingISOLanguageChosen whenChosen) { super();/*w ww. j av a 2 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 ActionChooseSelectedISOLanguage(); 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(); setSwingFocusAsISOLanguage(argFocus); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingURLProtocolPickerJPanel.java
public CFAsteriskSwingURLProtocolPickerJPanel(ICFAsteriskSwingSchema argSchema, ICFInternetURLProtocolObj argFocus, ICFLibAnyObj argContainer, Collection<ICFInternetURLProtocolObj> argDataCollection, ICFAsteriskSwingURLProtocolChosen whenChosen) { super();/*www .ja va2 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 ActionChooseSelectedURLProtocol(); 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(); setSwingFocusAsURLProtocol(argFocus); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAccountFinderJPanel.java
public CFAccSwingAccountFinderJPanel(ICFAccSwingSchema argSchema) { super();/*from www. j av 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"); } 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.cfacc.v2_0.CFAccSwing.CFAccSwingContactURLPickerJPanel.java
public CFAccSwingContactURLPickerJPanel(ICFAccSwingSchema argSchema, ICFAccContactURLObj argFocus, ICFAccContactObj argContainer, Collection<ICFAccContactURLObj> argDataCollection, ICFAccSwingContactURLChosen whenChosen) { super();//w ww .ja va 2 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 ActionChooseSelectedContactURL(); 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(); setSwingFocusAsContactURL(argFocus); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchSwing.CFFreeSwitchSwingPbxIvrMenuEntryPickerJPanel.java
public CFFreeSwitchSwingPbxIvrMenuEntryPickerJPanel(ICFFreeSwitchSwingSchema argSchema, ICFFreeSwitchPbxIvrMenuEntryObj argFocus, ICFFreeSwitchPbxIvrMenuObj argContainer, Collection<ICFFreeSwitchPbxIvrMenuEntryObj> argDataCollection, ICFFreeSwitchSwingPbxIvrMenuEntryChosen whenChosen) { super();/* 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"); } 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 ActionChooseSelectedPbxIvrMenuEntry(); 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(); setSwingFocusAsPbxIvrMenuEntry(argFocus); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswSwing.CFFswSwingISOCurrencyFinderJPanel.java
public CFFswSwingISOCurrencyFinderJPanel(ICFFswSwingSchema argSchema) { super();/*www . 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"); } 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_1.CFAstSwing.CFAstSwingISOLanguagePickerJPanel.java
public CFAstSwingISOLanguagePickerJPanel(ICFAstSwingSchema argSchema, ICFAstISOLanguageObj argFocus, ICFLibAnyObj argContainer, Collection<ICFAstISOLanguageObj> argDataCollection, ICFAstSwingISOLanguageChosen 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 ActionChooseSelectedISOLanguage(); 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(); setSwingFocusAsISOLanguage(argFocus); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingISOLanguagePickerJPanel.java
public CFAccSwingISOLanguagePickerJPanel(ICFAccSwingSchema argSchema, ICFAccISOLanguageObj argFocus, ICFLibAnyObj2 argContainer, Collection<ICFAccISOLanguageObj> argDataCollection, ICFAccSwingISOLanguageChosen whenChosen) { super();/* w w 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"); } 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 ActionChooseSelectedISOLanguage(); 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(); setSwingFocusAsISOLanguage(argFocus); }