本文整理了Java中com.bc.ceres.swing.TableLayout.createVerticalSpacer()
方法的一些代码示例,展示了TableLayout.createVerticalSpacer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout.createVerticalSpacer()
方法的具体详情如下:
包路径:com.bc.ceres.swing.TableLayout
类名称:TableLayout
方法名:createVerticalSpacer
暂无
代码示例来源:origin: senbox-org/snap-desktop
private void addEmptyRow() {
contentPanel.add(contentLayout.createVerticalSpacer());
currentRow++;
dataAsTextBuilder.append("/n");
}
代码示例来源:origin: senbox-org/snap-desktop
private void showNoInformationAvailableMessage() {
contentPanel.add(new JLabel(DEFAULT_INFORMATION_TEXT));
contentPanel.add(contentLayout.createVerticalSpacer());
dataAsTextBuilder.append(DEFAULT_INFORMATION_TEXT);
}
代码示例来源: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
public JPanel createDefaultPanel() {
final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
subPanel.add(getProductNameComboBox(), BorderLayout.CENTER);
subPanel.add(getProductFileChooserButton(), BorderLayout.EAST);
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
JPanel panel = new JPanel(tableLayout);
panel.setBorder(BorderFactory.createTitledBorder("Source Product"));
panel.add(getProductNameLabel());
panel.add(subPanel);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
代码示例来源:origin: bcdev/beam
private void initUI() {
final JPanel content = new JPanel(new BorderLayout());
initSpectraTable();
JScrollPane spectraScrollPane = new JScrollPane(spectraTable);
final Dimension preferredSize = spectraTable.getPreferredSize();
spectraScrollPane.setPreferredSize(new Dimension(Math.max(preferredSize.width + 20, 550),
Math.max(preferredSize.height + 10, 200)));
content.add(spectraScrollPane, BorderLayout.CENTER);
LoadSaveRasterDataNodesConfigurationsProvider provider = new LoadSaveRasterDataNodesConfigurationsProvider(this);
AbstractButton loadButton = provider.getLoadButton();
AbstractButton saveButton = provider.getSaveButton();
TableLayout layout = new TableLayout(1);
layout.setTablePadding(4, 4);
JPanel buttonPanel = new JPanel(layout);
buttonPanel.add(loadButton);
buttonPanel.add(saveButton);
buttonPanel.add(layout.createVerticalSpacer());
content.add(buttonPanel, BorderLayout.EAST);
setContent(content);
}
代码示例来源:origin: senbox-org/s2tbx
private JPanel createUpdateProductSelectorPanel(final SourceProductSelector selector) {
final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
subPanel.add(selector.getProductNameComboBox(), BorderLayout.CENTER);
subPanel.add(selector.getProductFileChooserButton(), BorderLayout.EAST);
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
JPanel panel = new JPanel(tableLayout);
panel.add(selector.getProductNameLabel());
panel.add(subPanel);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
代码示例来源:origin: bcdev/beam
private JPanel createIOPanel() {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(3, 3);
final JPanel ioPanel = new JPanel(tableLayout);
ioPanel.add(createSourceProductPanel());
ioPanel.add(targetProductSelector.createDefaultPanel());
ioPanel.add(tableLayout.createVerticalSpacer());
return ioPanel;
}
代码示例来源:origin: senbox-org/snap-desktop
private JPanel createUpdateProductSelectorPanel(final SourceProductSelector selector) {
final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
subPanel.add(selector.getProductNameComboBox(), BorderLayout.CENTER);
subPanel.add(selector.getProductFileChooserButton(), BorderLayout.EAST);
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
JPanel panel = new JPanel(tableLayout);
panel.add(selector.getProductNameLabel());
panel.add(subPanel);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
代码示例来源:origin: bcdev/beam
private JPanel createUpdateProductSelectorPanel(final SourceProductSelector selector) {
final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
subPanel.add(selector.getProductNameComboBox(), BorderLayout.CENTER);
subPanel.add(selector.getProductFileChooserButton(), BorderLayout.EAST);
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
JPanel panel = new JPanel(tableLayout);
panel.add(selector.getProductNameLabel());
panel.add(subPanel);
panel.add(tableLayout.createVerticalSpacer());
return panel;
}
代码示例来源:origin: senbox-org/snap-desktop
private JPanel createIOPanel() {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(3, 3);
final JPanel ioPanel = new JPanel(tableLayout);
ioPanel.add(createSourceProductPanel());
ioPanel.add(targetProductSelector.createDefaultPanel());
ioPanel.add(tableLayout.createVerticalSpacer());
return ioPanel;
}
代码示例来源:origin: senbox-org/snap-desktop
public JPanel createDefaultPanel(String borderTitle) {
final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
subPanel.add(getProductNameComboBox(), BorderLayout.CENTER);
subPanel.add(getProductFileChooserButton(), BorderLayout.EAST);
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
JPanel panel = new JPanel(tableLayout);
panel.add(getProductNameLabel());
panel.add(subPanel);
if (StringUtils.isNotNullAndNotEmpty(borderTitle)) {
panel.setBorder(BorderFactory.createTitledBorder(borderTitle));
panel.add(tableLayout.createVerticalSpacer());
}
return panel;
}
代码示例来源:origin: senbox-org/snap-desktop
private void initUI() {
final JPanel content = new JPanel(new BorderLayout());
initSpectraPanel();
final JScrollPane spectraScrollPane = new JScrollPane(spectraPanel);
spectraScrollPane.getHorizontalScrollBar().setUnitIncrement(20);
spectraScrollPane.getVerticalScrollBar().setUnitIncrement(20);
spectraScrollPane.setPreferredSize(new Dimension(spectraScrollPane.getPreferredSize().width, 180));
content.add(spectraScrollPane, BorderLayout.CENTER);
LoadSaveRasterDataNodesConfigurationsProvider provider = new LoadSaveRasterDataNodesConfigurationsProvider(this);
AbstractButton loadButton = provider.getLoadButton();
AbstractButton saveButton = provider.getSaveButton();
TableLayout layout = new TableLayout(1);
layout.setTablePadding(4, 4);
JPanel buttonPanel = new JPanel(layout);
buttonPanel.add(loadButton);
buttonPanel.add(saveButton);
buttonPanel.add(layout.createVerticalSpacer());
content.add(buttonPanel, BorderLayout.EAST);
setContent(content);
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
protected JPanel createPanel(BindingContext context) {
TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTablePadding(new Insets(4, 10, 0, 0));
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setColumnWeightX(0, 1.0);
JPanel pageUI = new JPanel(tableLayout);
PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
Property beepSound = context.getPropertySet().getProperty(GPF.BEEP_AFTER_PROCESSING_PROPERTY);
JComponent[] beepSoundComponent = registry.findPropertyEditor(beepSound.getDescriptor()).createComponents(beepSound.getDescriptor(), context);
pageUI.add(beepSoundComponent[0]);
tableLayout.setTableFill(TableLayout.Fill.VERTICAL);
pageUI.add(tableLayout.createVerticalSpacer());
JPanel parent = new JPanel(new BorderLayout());
parent.add(pageUI, BorderLayout.CENTER);
parent.add(Box.createHorizontalStrut(100), BorderLayout.EAST);
return parent;
}
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
protected JPanel createPanel(BindingContext context) {
TableLayout tableLayout = new TableLayout(2);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTablePadding(new Insets(4, 10, 0, 0));
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setColumnWeightX(1, 1.0);
JPanel pageUI = new JPanel(tableLayout);
PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
Property noDataOverlayColor = context.getPropertySet().getProperty(PROPERTY_KEY_NO_DATA_OVERLAY_COLOR);
Property noDataOverlayTransparency = context.getPropertySet().getProperty(PROPERTY_KEY_NO_DATA_OVERLAY_TRANSPARENCY);
JComponent[] noDataOverlayColorComponents = PreferenceUtils.createColorComponents(noDataOverlayColor);
JComponent[] noDataOverlayTransparencyComponents = registry.findPropertyEditor(noDataOverlayTransparency.getDescriptor()).createComponents(noDataOverlayTransparency.getDescriptor(), context);
pageUI.add(noDataOverlayColorComponents[0]);
pageUI.add(noDataOverlayColorComponents[1]);
pageUI.add(noDataOverlayTransparencyComponents[1]);
pageUI.add(noDataOverlayTransparencyComponents[0]);
pageUI.add(tableLayout.createVerticalSpacer());
JPanel parent = new JPanel(new BorderLayout());
parent.add(pageUI, BorderLayout.CENTER);
parent.add(Box.createHorizontalStrut(100), BorderLayout.EAST);
return parent;
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
protected JPanel createPanel(BindingContext context) {
TableLayout tableLayout = new TableLayout(2);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTablePadding(new Insets(4, 10, 0, 0));
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setColumnWeightX(1, 1.0);
JPanel pageUI = new JPanel(tableLayout);
PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
Property maskOverlayColor = context.getPropertySet().getProperty(PREFERENCE_KEY_MASK_COLOR);
Property maskOverlayTransparency = context.getPropertySet().getProperty(PREFERENCE_KEY_MASK_TRANSPARENCY);
JComponent[] maskOverlayColorComponents = PreferenceUtils.createColorComponents(maskOverlayColor);
JComponent[] maskOverlayTransparencyComponents = registry.findPropertyEditor(maskOverlayTransparency.getDescriptor()).createComponents(maskOverlayTransparency.getDescriptor(), context);
pageUI.add(maskOverlayColorComponents[0]);
pageUI.add(maskOverlayColorComponents[1]);
pageUI.add(maskOverlayTransparencyComponents[1]);
pageUI.add(maskOverlayTransparencyComponents[0]);
pageUI.add(tableLayout.createVerticalSpacer());
JPanel parent = new JPanel(new BorderLayout());
parent.add(pageUI, BorderLayout.CENTER);
parent.add(Box.createHorizontalStrut(100), BorderLayout.EAST);
return parent;
}
代码示例来源:origin: bcdev/beam
private JPanel createButtonPanel() {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTablePadding(4, 4);
tableLayout.setRowPadding(0, new Insets(0, 4, 4, 4));
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
JPanel buttonPanel = new JPanel(tableLayout);
AbstractButton helpButton = ToolButtonFactory.createButton(UIUtils.loadImageIcon("icons/Help22.png"), false);
helpButton.setToolTipText("Help");
buttonPanel.add(matrixSizeSpinner);
buttonPanel.add(tableLayout.createVerticalSpacer());
buttonPanel.add(helpButton);
final PageComponentDescriptor descriptor = getDescriptor();
if (descriptor.getHelpId() != null) {
HelpSys.enableHelpOnButton(helpButton, descriptor.getHelpId());
HelpSys.enableHelpKey(buttonPanel, descriptor.getHelpId());
}
return buttonPanel;
}
代码示例来源:origin: senbox-org/snap-desktop
public SourceProductPanel(final AppContext appContext) {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTablePadding(1, 1);
setLayout(tableLayout);
// Fetch source products
sourceProductSelectorList.add(new SourceProductSelector(appContext));
for (SourceProductSelector selector : sourceProductSelectorList) {
add(selector.createDefaultPanel());
}
add(tableLayout.createVerticalSpacer());
}
代码示例来源:origin: bcdev/beam
public DefaultIOParametersPanel(AppContext appContext, OperatorDescriptor descriptor, TargetProductSelector targetProductSelector) {
this.appContext = appContext;
sourceProductSelectorList = new ArrayList<>(3);
sourceProductSelectorMap = new HashMap<>(3);
// Fetch source products
createSourceProductSelectors(descriptor);
if (!sourceProductSelectorList.isEmpty()) {
setSourceProductSelectorLabels();
setSourceProductSelectorToolTipTexts();
}
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
tableLayout.setTablePadding(3, 3);
setLayout(tableLayout);
for (SourceProductSelector selector : sourceProductSelectorList) {
add(selector.createDefaultPanel());
}
add(targetProductSelector.createDefaultPanel());
add(tableLayout.createVerticalSpacer());
}
代码示例来源:origin: senbox-org/snap-desktop
@Override
protected JPanel createPanel(BindingContext context) {
TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(Anchor.NORTHWEST);
tableLayout.setTablePadding(4, 10);
tableLayout.setTableFill(Fill.BOTH);
tableLayout.setTableWeightX(1.0);
tableLayout.setRowWeightY(4, 1.0);
JPanel pageUI = new JPanel(tableLayout);
PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
Property showNavigationControl = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_IMAGE_NAV_CONTROL_SHOWN);
Property showScrollBars = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_IMAGE_SCROLL_BARS_SHOWN);
Property reverseZoom = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_INVERT_ZOOMING);
JComponent[] showNavigationControlComponents = registry.findPropertyEditor(showNavigationControl.getDescriptor()).createComponents(showNavigationControl.getDescriptor(), context);
JComponent[] showScrollBarsComponents = registry.findPropertyEditor(showScrollBars.getDescriptor()).createComponents(showScrollBars.getDescriptor(), context);
JComponent[] reverseZoomComponents = registry.findPropertyEditor(showScrollBars.getDescriptor()).createComponents(reverseZoom.getDescriptor(), context);
tableLayout.setRowPadding(0, new Insets(10, 80, 10, 4));
pageUI.add(showNavigationControlComponents[0]);
pageUI.add(showScrollBarsComponents[0]);
pageUI.add(reverseZoomComponents[0]);
pageUI.add(tableLayout.createVerticalSpacer());
return pageUI;
}
内容来源于网络,如有侵权,请联系作者删除!