本文整理了Java中com.bc.ceres.swing.TableLayout.setCellColspan()
方法的一些代码示例,展示了TableLayout.setCellColspan()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout.setCellColspan()
方法的具体详情如下:
包路径:com.bc.ceres.swing.TableLayout
类名称:TableLayout
方法名:setCellColspan
暂无
代码示例来源:origin: senbox-org/snap-desktop
private void addRow(String content) {
contentLayout.setCellColspan(currentRow++, 0, 6);
contentPanel.add(getCorrectlyColouredLabel(content));
dataAsTextBuilder.append(content).append("/n");
}
代码示例来源:origin: senbox-org/snap-desktop
private void addHeaderRow(String content) {
StringBuilder b = new StringBuilder();
for (int i = 0; i < content.length(); i++) {
b.append('=');
}
contentLayout.setCellColspan(currentRow++, 0, 6);
contentPanel.add(getCorrectlyColouredLabel(b.toString()));
contentLayout.setCellColspan(currentRow++, 0, 6);
contentPanel.add(getCorrectlyColouredLabel(content));
contentLayout.setCellColspan(currentRow++, 0, 6);
contentPanel.add(getCorrectlyColouredLabel(b.toString()));
dataAsTextBuilder.append(b.toString()).append("/n").append(content).append("/n").append(b.toString()).append("/n");
}
代码示例来源:origin: senbox-org/snap-desktop
private void addRowWithTextField(String name, String value) {
contentLayout.setCellColspan(currentRow++, 1, 5);
contentPanel.add(getCorrectlyColouredLabel(name));
final JTextArea textArea = new JTextArea(value);
textArea.setBackground(getBackgroundColor());
textArea.setEditable(false);
contentPanel.add(textArea);
dataAsTextBuilder.append(name).append("/t").append(value).append("/n");
}
代码示例来源:origin: senbox-org/snap-desktop
private void addRow(String name, String value) {
contentLayout.setCellColspan(currentRow++, 1, 5);
contentPanel.add(getCorrectlyColouredLabel(name));
contentPanel.add(getCorrectlyColouredLabel(value));
dataAsTextBuilder.append(name).append("/t").append(value).append("/n");
}
代码示例来源:origin: senbox-org/snap-desktop
private JPanel createSubParametersPanel() {
final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTablePadding(3, 3);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
tableLayout.setColumnWeightX(1, 1.0);
tableLayout.setCellColspan(4, 0, 2);
JPanel panel = new JPanel(tableLayout);
panel.add(new JLabel("Abundance band name suffix: "));
panel.add(abundanceBandNameSuffix);
panel.add(new JLabel("Error band name suffix: "));
panel.add(errorBandNameSuffix);
panel.add(new JLabel("Spectral unmixing model: "));
panel.add(unmixingModelName);
panel.add(new JLabel("Minimum spectral bandwidth: "));
panel.add(minBandwidth);
panel.add(computeErrorBands);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
}
代码示例来源:origin: bcdev/beam
private JPanel createSubParametersPanel() {
final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTablePadding(3, 3);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
tableLayout.setColumnWeightX(1, 1.0);
tableLayout.setCellColspan(4, 0, 2);
JPanel panel = new JPanel(tableLayout);
panel.add(new JLabel("Abundance band name suffix: "));
panel.add(abundanceBandNameSuffix);
panel.add(new JLabel("Error band name suffix: "));
panel.add(errorBandNameSuffix);
panel.add(new JLabel("Spectral unmixing model: "));
panel.add(unmixingModelName);
panel.add(new JLabel("Minimum spectral bandwidth: "));
panel.add(minBandwidth);
panel.add(computeErrorBands);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
}
代码示例来源:origin: bcdev/beam
layout.setTableWeightY(0.0);
layout.setTableFill(TableLayout.Fill.HORIZONTAL);
layout.setCellColspan(0, 0, 2);
代码示例来源:origin: senbox-org/snap-desktop
private void initSpectraPanel() {
spectraPanelLayout = new TableLayout(7);
spectraPanelLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
spectraPanelLayout.setTableWeightY(0.0);
spectraPanelLayout.setTableWeightX(1.0);
spectraPanelLayout.setColumnWeightX(0, 0.0);
spectraPanelLayout.setColumnWeightX(1, 0.0);
spectraPanelLayout.setTablePadding(3, 3);
spectraPanel = new JPanel(spectraPanelLayout);
spectraPanel.add(new JLabel(""));
spectraPanel.add(new JLabel(""));
spectraPanel.add(new JLabel("Spectrum Name"));
spectraPanel.add(new JLabel("Unit"));
spectraPanel.add(new JLabel("Line Style"));
spectraPanel.add(new JLabel("Symbol"));
spectraPanel.add(new JLabel("Symbol Size"));
for (int i = 0; i < spectra.length; i++) {
selectionAdmin.evaluateSpectrumSelections(spectra[i]);
addSpectrumComponentsToSpectraPanel(i);
spectraPanelLayout.setCellColspan((i * 2) + 2, 1, 6);
spectraPanel.add(new JLabel());
bandTablePanels[i] = new JPanel(new BorderLayout());
bandTablePanels[i].setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
spectraPanel.add(bandTablePanels[i]);
bandTables[i] = createBandsTable(i);
}
spectraPanel.add(spectraPanelLayout.createVerticalSpacer());
spectraPanel.updateUI();
}
代码示例来源:origin: senbox-org/snap-desktop
tableLayout.setColumnWeightX(1, 0.0);
tableLayout.setColumnWeightX(2, 1.0);
tableLayout.setCellColspan(0, 1, 2);
tableLayout.setCellPadding(1, 0, new Insets(4, 24, 4, 20));
代码示例来源:origin: bcdev/beam
private JPanel createParametersPanel() {
final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTableAnchor(TableLayout.Anchor.CENTER);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(3, 3);
tableLayout.setCellPadding(0, 0, new Insets(0, 0, 10, 10));
tableLayout.setCellColspan(1, 0, 2);
tableLayout.setCellColspan(2, 0, 2);
tableLayout.setRowWeightY(0, 0.5);
tableLayout.setRowWeightY(1, 0.0);
tableLayout.setRowWeightY(2, 0.5);
tableLayout.setColumnWeightX(0, 1.0);
tableLayout.setColumnWeightX(1, 1.0);
JPanel panel = new JPanel(tableLayout);
panel.setBorder(BorderFactory.createTitledBorder("Parameters"));
panel.add(createSourceBandsPanel());
panel.add(createSubParametersPanel());
panel.add(new JLabel("Endmembers:"));
panel.add(endmemberForm);
return panel;
}
代码示例来源:origin: senbox-org/snap-desktop
private JPanel createParametersPanel() {
final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTableAnchor(TableLayout.Anchor.CENTER);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(3, 3);
tableLayout.setCellPadding(0, 0, new Insets(0, 0, 10, 10));
tableLayout.setCellColspan(1, 0, 2);
tableLayout.setCellColspan(2, 0, 2);
tableLayout.setRowWeightY(0, 0.5);
tableLayout.setRowWeightY(1, 0.0);
tableLayout.setRowWeightY(2, 0.5);
tableLayout.setColumnWeightX(0, 1.0);
tableLayout.setColumnWeightX(1, 1.0);
JPanel panel = new JPanel(tableLayout);
panel.setBorder(BorderFactory.createTitledBorder("Parameters"));
panel.add(createSourceBandsPanel());
panel.add(createSubParametersPanel());
panel.add(new JLabel("Endmembers:"));
panel.add(endmemberForm);
return panel;
}
代码示例来源:origin: senbox-org/s2tbx
private JPanel createOrthorectifyPanel() {
final TableLayout layout = new TableLayout(2);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.HORIZONTAL);
layout.setTableWeightX(1.0);
layout.setTableWeightY(1.0);
layout.setTablePadding(3, 3);
final JPanel panel = new JPanel(layout);
panel.setBorder(BorderFactory.createTitledBorder("Orthorectification"));
final JCheckBox orthoCheckBox = new JCheckBox("Orthorectify input products");
bindingCtx.bind(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY, orthoCheckBox);
bindingCtx.bindEnabledState(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY, false, S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE, true);
final JComboBox<String> demComboBox = new JComboBox<>(new DefaultComboBoxModel<>(demValueSet));
bindingCtx.bind(S2tbxMosaicFormModel.PROPERTY_ELEVATION_MODEL_NAME, demComboBox);
bindingCtx.addPropertyChangeListener(
(PropertyChangeEvent evt) ->{if (S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY.equals(evt.getPropertyName()) ||
S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE.equals(evt.getPropertyName())) {
final PropertySet propertySet = bindingCtx.getPropertySet();
boolean updateMode = Boolean.TRUE.equals(propertySet.getValue(S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE));
boolean orthorectify = Boolean.TRUE.equals(propertySet.getValue(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY));
demComboBox.setEnabled(orthorectify && !updateMode);
}});
layout.setCellColspan(0, 0, 2);
panel.add(orthoCheckBox);
layout.setCellWeightX(1, 0, 0.0);
panel.add(new JLabel("Elevation model:"));
layout.setCellWeightX(1, 1, 1.0);
panel.add(demComboBox);
return panel;
}
代码示例来源:origin: bcdev/beam
layout.setCellColspan(row, 0, 3);
panel.add(createHelpPanel());
return panel;
代码示例来源:origin: senbox-org/snap-desktop
layout.setCellColspan(0, 0, 2);
panel.add(orthoCheckBox);
代码示例来源:origin: bcdev/beam
private void createUserInterface() {
boolean isAutoAdjustingTimeCoding = timeSeries.isAutoAdjustingTimeCoding();
final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(4, 4);
tableLayout.setCellColspan(0, 0, 2);
JPanel content = new JPanel(tableLayout);
autoAdjustBox = createAutoAdjustBox(isAutoAdjustingTimeCoding);
startTimeLabel = new JLabel("Start time:");
startTimeBox = createDateComboBox();
final TimeCoding timeCoding = timeSeries.getTimeCoding();
startTimeBox.setCalendar(timeCoding.getStartTime().getAsCalendar());
endTimeLabel = new JLabel("End time:");
endTimeBox = createDateComboBox();
endTimeBox.setCalendar(timeCoding.getEndTime().getAsCalendar());
content.add(autoAdjustBox);
content.add(startTimeLabel);
content.add(startTimeBox);
content.add(endTimeLabel);
content.add(endTimeBox);
setUiEnabled(!isAutoAdjustingTimeCoding);
setContent(content);
}
代码示例来源:origin: bcdev/beam
buttonGroup.add(crsRadioButton);
if (crsForm.wrapAfterButton()) {
tableLayout.setCellColspan(rowCount, 0, 2);
rowCount++;
tableLayout.setCellColspan(rowCount, 0, 2);
tableLayout.setCellPadding(rowCount, 0, new Insets(4, 24, 4, 4));
rowCount++;
代码示例来源:origin: bcdev/beam
tableLayout.setColumnWeightX(0, 1.0);
tableLayout.setRowWeightY(1, 1.0);
tableLayout.setCellColspan(0, 0, 2);
代码示例来源:origin: senbox-org/snap-desktop
tableLayout.setCellColspan(2, 0, 2);
tableLayout.setCellAnchor(2, 0, TableLayout.Anchor.EAST);
tableLayout.setCellFill(2, 0, TableLayout.Fill.NONE);
代码示例来源:origin: bcdev/beam
layout.setCellFill(0, 0, TableLayout.Fill.HORIZONTAL);
layout.setCellRowspan(0, 3, 2);
layout.setCellColspan(1, 0, 3);
代码示例来源:origin: senbox-org/s2tbx
public void populate(List<JComponent[]> componentsList) {
TableLayout layout = (TableLayout)getLayout();
int rowIndex = 0;
for (JComponent[] components : componentsList) {
if (components.length == 2) {
layout.setCellWeightX(rowIndex, 0, 0.0);
add(components[1], cell(rowIndex, 0));
layout.setCellWeightX(rowIndex, 1, 1.0);
if(components[0] instanceof JScrollPane) {
layout.setRowWeightY(rowIndex, 1.0);
layout.setRowFill(rowIndex, TableLayout.Fill.BOTH);
}
add(components[0], cell(rowIndex, 1));
} else {
layout.setCellColspan(rowIndex, 0, 2);
layout.setCellWeightX(rowIndex, 0, 1.0);
add(components[0], cell(rowIndex, 0));
}
rowIndex++;
}
layout.setCellColspan(rowIndex, 0, 2);
layout.setCellWeightX(rowIndex, 0, 1.0);
layout.setCellWeightY(rowIndex, 0, 0.5);
}
内容来源于网络,如有侵权,请联系作者删除!