changeset 1688:f1daf6d1812f

Repaint components after revalidating PR2337 Reviewed-by: neugens Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-May/013650.html
author Jie Kang <jkang@redhat.com>
date Thu, 07 May 2015 09:07:23 -0400
parents 17fbcd8c00ac
children a1dd52f5f6dd
files client/swing/src/main/java/com/redhat/thermostat/client/swing/MenuHelper.java client/swing/src/main/java/com/redhat/thermostat/client/swing/components/ThermostatTable.java client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/Accordion.java client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/TitledPane.java host-cpu/client-swing/src/main/java/com/redhat/thermostat/host/cpu/client/swing/internal/HostCpuPanel.java notes/client-swing/src/main/java/com/redhat/thermostat/notes/client/swing/internal/NotesView.java thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadTimelineView.java vm-gc/client-swing/src/main/java/com/redhat/thermostat/vm/gc/client/swing/internal/VmGcPanel.java vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapSwingView.java vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/SwingHeapDumpListView.java vm-memory/client-swing/src/main/java/com/redhat/thermostat/vm/memory/client/swing/internal/MemoryStatsViewImpl.java
diffstat 12 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/MenuHelper.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/MenuHelper.java	Thu May 07 09:07:23 2015 -0400
@@ -104,6 +104,7 @@
                     parent.add(new Menu(menu));
 
                     menuBar.revalidate();
+                    menuBar.repaint();
                 }
             });
         } catch (InvocationTargetException ite) {
@@ -135,6 +136,7 @@
                     Menu parent = findMenuParent(menuBar, path, false);
                     parent.remove(path[path.length - 1].getContents());
                     menuBar.revalidate();
+                    menuBar.repaint();
                 }
             });
         } catch (InterruptedException ie) {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/ThermostatTable.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/ThermostatTable.java	Thu May 07 09:07:23 2015 -0400
@@ -85,6 +85,7 @@
     public void repackCells() {
         resizer.resize();
         revalidate();
+        repaint();
     }
     
     public JScrollPane wrap() {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java	Thu May 07 09:07:23 2015 -0400
@@ -467,6 +467,7 @@
                     Component toAdd = swingComp.getUiComponent();
                     contentArea.add(toAdd);
                     contentArea.revalidate();
+                    contentArea.repaint();
                 }
             });
         } else {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/Accordion.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/Accordion.java	Thu May 07 09:07:23 2015 -0400
@@ -166,6 +166,7 @@
             
             Accordion.this.contentPane.add(pane);
             Accordion.this.contentPane.revalidate();
+            Accordion.this.contentPane.repaint();
         }
 
         @Override
@@ -187,6 +188,7 @@
             
             content.add(contentUnit);
             content.revalidate();
+            content.repaint();
             
             Map<C, AccordionComponent> componentsMap = components.get(header);
             if (componentsMap == null) {
@@ -212,10 +214,12 @@
             JComponent content = pane.getContent();
             content.remove(contentUnit.getUiComponent());
             content.revalidate();
+            content.repaint();
 
             componentFactory.removeComponent(contentUnit, header, component);
             
             Accordion.this.contentPane.revalidate();
+            Accordion.this.contentPane.repaint();
         }
 
         @Override
@@ -234,6 +238,7 @@
             }
             
             Accordion.this.contentPane.revalidate();
+            Accordion.this.contentPane.repaint();
         }
     }
     
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/TitledPane.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/accordion/TitledPane.java	Thu May 07 09:07:23 2015 -0400
@@ -239,6 +239,7 @@
                     remove(content);
                 }
                 revalidate();
+                repaint();
                 firePropertyChange(EXPANDED_PROPERTY, oldExpaned, expanded);
             }
         }
@@ -267,6 +268,7 @@
         remove(content);
         expanded = false;
         revalidate();
+        repaint();
     }
     
     public void setContent(JComponent content) {
--- a/host-cpu/client-swing/src/main/java/com/redhat/thermostat/host/cpu/client/swing/internal/HostCpuPanel.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/host-cpu/client-swing/src/main/java/com/redhat/thermostat/host/cpu/client/swing/internal/HostCpuPanel.java	Thu May 07 09:07:23 2015 -0400
@@ -155,6 +155,7 @@
 
                 legendPanel.add(label);
                 legendPanel.revalidate();
+                legendPanel.repaint();
             }
         });
     }
--- a/notes/client-swing/src/main/java/com/redhat/thermostat/notes/client/swing/internal/NotesView.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/notes/client-swing/src/main/java/com/redhat/thermostat/notes/client/swing/internal/NotesView.java	Thu May 07 09:07:23 2015 -0400
@@ -207,6 +207,7 @@
                 }
                 tagToPanel.clear();
                 notesAndToolsContainer.revalidate();
+                notesAndToolsContainer.repaint();
             }
         });
     }
@@ -219,6 +220,7 @@
                 tagToPanel.put(note.getId(), widget);
                 notesContainer.add(widget);
                 notesAndToolsContainer.revalidate();
+                notesAndToolsContainer.repaint();
             }
         });
     }
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadTimelineView.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadTimelineView.java	Thu May 07 09:07:23 2015 -0400
@@ -120,6 +120,7 @@
                 contentPane.removeAll();
                 contentPane.initComponents();
                 contentPane.revalidate();
+                contentPane.repaint();
             }
         });
     }
@@ -146,6 +147,7 @@
                     }
                 }
                 timelineContainer.revalidate();
+                timelineContainer.repaint();
             }
         });
     }
--- a/vm-gc/client-swing/src/main/java/com/redhat/thermostat/vm/gc/client/swing/internal/VmGcPanel.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/vm-gc/client-swing/src/main/java/com/redhat/thermostat/vm/gc/client/swing/internal/VmGcPanel.java	Thu May 07 09:07:23 2015 -0400
@@ -282,6 +282,7 @@
                 chartPanelContainer.add(subPanel, gcPanelConstraints);
                 gcPanelConstraints.gridy++;
                 containerPanel.revalidate();
+                containerPanel.repaint();
             }
         });
     }
@@ -298,6 +299,7 @@
                 chartPanelContainer.remove(subPanel);
                 gcPanelConstraints.gridy--;
                 containerPanel.revalidate();
+                containerPanel.repaint();
             }
         });
     }
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapSwingView.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapSwingView.java	Thu May 07 09:07:23 2015 -0400
@@ -295,6 +295,7 @@
 
                 visiblePane.add(heapDetailPanel);
                 visiblePane.revalidate();
+                visiblePane.repaint();
             }
         });
     }
@@ -308,6 +309,7 @@
                 public void run() {
                     heapDetailPanel.setBottom(view.getUiComponent());
                     visiblePane.revalidate();
+                    visiblePane.repaint();
                 }
             });
         }
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/SwingHeapDumpListView.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/SwingHeapDumpListView.java	Thu May 07 09:07:23 2015 -0400
@@ -124,6 +124,7 @@
                     table.add(item);
                 }
                 container.revalidate();
+                container.repaint();
             }
         });
     }
--- a/vm-memory/client-swing/src/main/java/com/redhat/thermostat/vm/memory/client/swing/internal/MemoryStatsViewImpl.java	Wed Mar 25 12:27:37 2015 -0400
+++ b/vm-memory/client-swing/src/main/java/com/redhat/thermostat/vm/memory/client/swing/internal/MemoryStatsViewImpl.java	Thu May 07 09:07:23 2015 -0400
@@ -188,6 +188,7 @@
 
                 updateRegion(region);
                 graphPanel.revalidate();
+                graphPanel.repaint();
             }
         });
     }