public static DCPanel decorateWithShadow(final JComponent comp) { final boolean outline; if (comp instanceof DCTablePanel) { // table panels has it's own special outline outline = false; } else { outline = true; } return decorateWithShadow(comp, outline, 4); }
panel.setBorder(new EmptyBorder(10, 10, 10, 10)); panel.setLayout(new BorderLayout()); panel.add(WidgetUtils.decorateWithShadow(tablePanel), BorderLayout.CENTER); panel.add(buttonPanel, BorderLayout.SOUTH);
public JComponent renderGroupResult(final ValueCountingAnalyzerResult result) { _valueCounts = result.getReducedValueFrequencies(_preferredSlices); _valueCounts = moveUniqueToEnd(_valueCounts); for (final ValueFrequency valueCount : _valueCounts) { setDataSetValue(valueCount.getName(), valueCount.getCount()); } final ChartPanel chartPanel = createChartPanel(result); logger.info("Rendering with {} slices", getDataSetItemCount()); drillToOverview(result); _backButton.setMargin(new Insets(0, 0, 0, 0)); _backButton.addActionListener(e -> drillToOverview(result)); _rightPanel.setLayout(new VerticalLayout()); _rightPanel.add(_backButton); _rightPanel.add(WidgetUtils.decorateWithShadow(_table.toPanel())); if (chartPanel == null) { return _rightPanel; } else { final DCPanel leftPanel = new DCPanel(); leftPanel.setLayout(new VerticalLayout()); leftPanel.add(WidgetUtils.decorateWithShadow(chartPanel)); final JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); split.setOpaque(false); split.add(leftPanel); split.add(_rightPanel); split.setDividerLocation(550); return split; } }
add(WidgetUtils.decorateWithShadow(_outerPanel), BorderLayout.CENTER);
final DCPanel leftPanel = WidgetUtils.decorateWithShadow(chartPanel); rightPanel.add(WidgetUtils.decorateWithShadow(table.toPanel()));
@Override protected JComponent decorateMainPanel(final DCPanel panel) { final JComponent result = super.decorateMainPanel(panel); final DCPanel bottomButtonPanel = new DCPanel(); bottomButtonPanel.setBorder(WidgetUtils.BORDER_EMPTY); bottomButtonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 4, 0)); bottomButtonPanel.add(_writeDataButton); final ComboButton previewButtonPanel = new ComboButton(); previewButtonPanel.addButton(_previewButton); previewButtonPanel.add(new JLabel("|")); previewButtonPanel.addButton(_previewAlternativesButton); _previewAlternativesButton.setFont(WidgetUtils.FONT_FONTAWESOME); bottomButtonPanel.add(previewButtonPanel); if (!_componentBuilder.getDescriptor().isMultiStreamComponent()) { final DCPanel outputColumnsPanel = new DCPanel(); outputColumnsPanel.setLayout(new BorderLayout()); outputColumnsPanel.add(WidgetUtils.decorateWithShadow(_outputColumnsTable), BorderLayout.CENTER); outputColumnsPanel.add(bottomButtonPanel, BorderLayout.SOUTH); addTaskPane(IconUtils.MODEL_SOURCE, "Output columns", outputColumnsPanel); } return result; }
leftPanel.add(WidgetUtils.decorateWithShadow(chartPanel));
public SimpleTableDefsPanel(final SchemaFactory schemaFactory, final SimpleTableDef[] tableDefs) { super(); _schemaFactory = schemaFactory; _tabbedPane = new CloseableTabbedPane(); _instructionsLabel = DCLabel.bright("Click 'Add table' above to define the first table."); _instructionsLabel.setFont(WidgetUtils.FONT_HEADER1); _instructionsLabel.setHorizontalAlignment(SwingConstants.CENTER); _instructionsLabel.setVerticalAlignment(SwingConstants.CENTER); _tabbedPaneContainer = new DCPanel(CloseableTabbedPane.COLOR_BACKGROUND); _tabbedPaneContainer.setLayout(new BorderLayout()); setLayout(new BorderLayout()); if (tableDefs == null || tableDefs.length == 0) { setTabbedPaneVisible(false); } else { for (final SimpleTableDef tableDef : tableDefs) { addTableDef(tableDef); } } add(WidgetUtils.decorateWithShadow(_tabbedPaneContainer), BorderLayout.CENTER); add(createButtonPanel(), BorderLayout.NORTH); setMinimumSize(new Dimension(400, 300)); _tabbedPane.addTabCloseListener(ev -> { if (_tabbedPane.getTabCount() == 0) { setTabbedPaneVisible(false); } }); }
_centerPanel.setVisible(false); final DCPanel decoratedLimitTextField = WidgetUtils.decorateWithShadow(_limitTextField, false, 0); final DCPanel decoratedTextField = WidgetUtils.decorateWithShadow(scrolledTextArea);
} else { final DCPanel tablePanel = _table.toPanel(); add(WidgetUtils.decorateWithShadow(tablePanel));