Java Code Examples for java.awt.Container#revalidate()
The following examples show how to use
java.awt.Container#revalidate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataView.java From netbeans with Apache License 2.0 | 6 votes |
public void activateSearch() { JComponent panel = getBottomPanel(); if (searchPanel == null) { SearchUtils.TreeHelper searchHelper = getSearchHelper(); if (searchHelper == null) searchPanel = SearchUtils.createSearchPanel(getResultsComponent(), getSearchOptions()); else searchPanel = SearchUtils.createSearchPanel((ProfilerTreeTable)getResultsComponent(), searchHelper, getSearchOptions()); panel.add(searchPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); searchPanel.setVisible(true); searchPanel.requestFocusInWindow(); }
Example 2
Source File: ColorPick.java From Spark with Apache License 2.0 | 6 votes |
@Override public void stateChanged(ChangeEvent e) { _preview.setBackground(new Color(_sliderarray[0].getValue(), _sliderarray[1].getValue(), _sliderarray[2] .getValue(), _sliderarray[3].getValue())); _preview.setForeground(new Color(_sliderarray[0].getValue(), _sliderarray[1].getValue(), _sliderarray[2] .getValue(), _sliderarray[3].getValue())); _preview.invalidate(); _preview.repaint(); _preview.revalidate(); Container c = _preview.getParent(); if (c instanceof JPanel) { c.repaint(); c.revalidate(); } }
Example 3
Source File: MemoryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(table, null); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 4
Source File: ThreadsCPUView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateSearch() { JComponent panel = getBottomPanel(); if (searchPanel == null) { searchPanel = SearchUtils.createSearchPanel(table); panel.add(searchPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); searchPanel.setVisible(true); searchPanel.requestFocusInWindow(); }
Example 5
Source File: ThreadsCPUView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(table, null); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 6
Source File: MemoryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateSearch() { JComponent panel = getBottomPanel(); if (searchPanel == null) { searchPanel = SearchUtils.createSearchPanel(table); panel.add(searchPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); searchPanel.setVisible(true); searchPanel.requestFocusInWindow(); }
Example 7
Source File: MemoryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(table, null); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 8
Source File: ThreadsMemoryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(table, null); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 9
Source File: DataView.java From visualvm with GNU General Public License v2.0 | 6 votes |
public void activateSearch() { JComponent panel = getBottomPanel(); if (searchPanel == null) { SearchUtils.TreeHelper searchHelper = getSearchHelper(); if (searchHelper == null) searchPanel = SearchUtils.createSearchPanel(getResultsComponent(), getSearchOptions()); else searchPanel = SearchUtils.createSearchPanel((ProfilerTreeTable)getResultsComponent(), searchHelper, getSearchOptions()); panel.add(searchPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); searchPanel.setVisible(true); searchPanel.requestFocusInWindow(); }
Example 10
Source File: DataView.java From visualvm with GNU General Public License v2.0 | 6 votes |
public void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(getResultsComponent(), getExcludesFilter(), getFilterOptions()); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 11
Source File: TruffleSummaryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
void setRealModel(TableModel model) { if (table == null) { BorderLayout bl = (BorderLayout)getLayout(); Component c = bl.getLayoutComponent(BorderLayout.CENTER); if (c != null) remove(c); table = createTable(model); add(table, BorderLayout.CENTER); Container parent = getParent(); if (parent != null) { parent.invalidate(); parent.revalidate(); parent.repaint(); } } else { table.setModel(model); } setupTable(table); enableTableEvents(table); link.setEnabled(true); }
Example 12
Source File: MemorySamplerViewSupport.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateSearch() { JComponent panel = getBottomPanel(); if (searchPanel == null) { searchPanel = SearchUtils.createSearchPanel(table); panel.add(searchPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); searchPanel.setVisible(true); searchPanel.requestFocusInWindow(); }
Example 13
Source File: MemorySamplerViewSupport.java From visualvm with GNU General Public License v2.0 | 6 votes |
private void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(table, null); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 14
Source File: DataView.java From netbeans with Apache License 2.0 | 6 votes |
public void activateFilter() { JComponent panel = getBottomPanel(); if (filterPanel == null) { filterPanel = FilterUtils.createFilterPanel(getResultsComponent(), getExcludesFilter(), getFilterOptions()); panel.add(filterPanel); Container parent = panel.getParent(); parent.invalidate(); parent.revalidate(); parent.repaint(); } panel.setVisible(true); filterPanel.setVisible(true); filterPanel.requestFocusInWindow(); }
Example 15
Source File: MainFrame.java From netbeans-mmd-plugin with Apache License 2.0 | 5 votes |
@Override public void hideFindTextPane() { final FindTextPanel panel = this.currentFindTextPanel.getAndSet(null); if (panel != null) { final Container parent = panel.getParent(); if (parent != null) { parent.remove(panel); parent.revalidate(); parent.repaint(); } } }
Example 16
Source File: HeapViewerComponent.java From visualvm with GNU General Public License v2.0 | 5 votes |
void selectFeature(HeapContext context, HeapViewerFeature feature) { if (selectedFeature != null) selectedFeature.hidden(); selectedContext = context; selectedFeature = feature; selectedFeature.showing(); featureChooser.setText(getName()); featureChooser.setToolTipText(getDescription()); featureChooser.setIcon(getIcon()); featureChooser.invalidate(); Container parent = featureChooser.getParent(); if (parent != null) { parent.revalidate(); parent.repaint(); } component.removeAll(); component.add(feature.getComponent(), BorderLayout.CENTER); component.invalidate(); parent = component.getParent(); if (parent != null) { parent.revalidate(); parent.repaint(); } while (toolbar.getComponentCount() > 1) toolbar.remove(1); ProfilerToolbar featureToolbar = feature.getToolbar(); if (featureToolbar != null) toolbar.add(featureToolbar); // viewSelected(this); updateViewTab(this); }
Example 17
Source File: SplayedLayout.java From pumpernickel with MIT License | 5 votes |
/** * Set the orientation of this layout. * * @param container * this optional Container will be revalidated. * @param orientation * the new orientation (SwingConstants.HORIZONTAL or * SwingConstants.VERTICAL) */ public void setOrientation(Container container, int orientation) { if (!(orientation == SwingConstants.HORIZONTAL || orientation == SwingConstants.VERTICAL)) throw new IllegalArgumentException( "Orientation must be SwingConstants.HORIZONTAL or SwingConstants.VERTICAL."); boolean h = orientation == SwingConstants.HORIZONTAL; if (horizontal != h) { horizontal = h; if (container != null) container.revalidate(); } }
Example 18
Source File: SplayedLayout.java From pumpernickel with MIT License | 5 votes |
@Override public void focusGained(FocusEvent e) { Component c = e.getComponent(); Container splayedAncestor = getSplayedAncestor(c); if (splayedAncestor == null) { c.removeFocusListener(this); } else if (prioritizeFocus) { splayedAncestor.revalidate(); } }
Example 19
Source File: MainFrame.java From netbeans-mmd-plugin with Apache License 2.0 | 5 votes |
@Override public void showFindTextPane(@Nullable final String text) { final TabTitle current = getFocusedTab(); if (current != null && this.tabPane.getCurrentTitle().getProvider().doesSupportPatternSearch()) { FindTextPanel panel = this.currentFindTextPanel.get(); if (panel == null) { panel = new FindTextPanel(this, text); panel.updateUI(current); } this.currentFindTextPanel.set(panel); final Container currentParent = panel.getParent(); if (currentParent != null) { currentParent.remove(panel); currentParent.revalidate(); currentParent.repaint(); } final boolean mmdEditor = current.getProvider().getEditor().getEditorContentType() == EditorContentType.MINDMAP; panel.setEnableSearchFile(mmdEditor); panel.setEnableSearchNote(mmdEditor); panel.setEnableSearchURI(mmdEditor); panel.setEnableSearchTopicText(mmdEditor); if (!this.tabPane.getCurrentTitle().getProvider().showSearchPane(panel)) { this.mainPanel.add(panel, BorderLayout.SOUTH); } this.mainPanel.revalidate(); this.mainPanel.repaint(); panel.requestFocus(); } }
Example 20
Source File: MessagePanel.java From netbeans-mmd-plugin with Apache License 2.0 | 5 votes |
@Override public void actionPerformed(@Nonnull final ActionEvent e) { final Container parent = this.getParent(); if (parent != null) { parent.remove(this); if (ACTIVE_MESSAGES.decrementAndGet()<=0){ Main.getApplicationFrame().getGlassPane().setVisible(false); } parent.revalidate(); } }