[Mc4j-cvs] mc4j/src/org/mc4j/console/swing/graph AbstractGraphPanel.java,1.3,1.4
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-03-31 04:09:50
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/swing/graph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31541/src/org/mc4j/console/swing/graph Modified Files: AbstractGraphPanel.java Log Message: Tweaked background and corrected NPE possibility in some usages. Index: AbstractGraphPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/swing/graph/AbstractGraphPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractGraphPanel.java 3 Mar 2004 23:32:50 -0000 1.3 --- AbstractGraphPanel.java 31 Mar 2004 03:58:06 -0000 1.4 *************** *** 178,181 **** --- 178,182 ---- JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); northPanel.add(this.controlsButton); + northPanel.setOpaque(false); add(northPanel,BorderLayout.NORTH); this.controlsPanel.setLocation(5,5); *************** *** 207,210 **** --- 208,212 ---- public ControlsPopupButton() { setIcon(descendingIcon); + setOpaque(false); init(); } *************** *** 229,232 **** --- 231,241 ---- + public long getUpdateDelay() { + if (sleepSlider != null) + return sleepSlider.getValue(); + else + return 1000L; + } + /** * Cancels any existing scheduled task and reschedules for the *************** *** 244,249 **** this.dataGeneratorTimer.schedule( this.dataGeneratorTimerTask = getDataGeneratorTask(), ! sleepSlider.getValue(), ! sleepSlider.getValue()); } --- 253,258 ---- this.dataGeneratorTimer.schedule( this.dataGeneratorTimerTask = getDataGeneratorTask(), ! getUpdateDelay(), ! getUpdateDelay()); } *************** *** 274,278 **** public void removeNotify() { super.removeNotify(); ! this.dataGeneratorTimer.cancel(); this.dataGeneratorTimer = null; this.removed = true; --- 283,288 ---- public void removeNotify() { super.removeNotify(); ! if (this.dataGeneratorTimer != null) ! this.dataGeneratorTimer.cancel(); this.dataGeneratorTimer = null; this.removed = true; |