[OpenMap Users] OM EDT Mistakes

From: oland <com_at_navicon.dk>
Date: Thu, 3 Apr 2008 00:13:54 -0700 (PDT)

Hi

I just ran OM with the ThreadCheckingRepaintManager installed.

RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());

http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html

I get lots of this

EDT violation detected
javax.swing.JButton[,2,1,11x16,alignmentX=0.0,alignmentY=0.5,border=org.jvnet.substance.button.ClassicButtonShaper$1_at_3a71ed,flags=16777504,maximumSize=,minimumSize=,preferredSize=,defaultIcon=working,disabledIcon=,disabledSelectedIcon=,margin=java.awt.Insets[top=2,left=1,bottom=2,right=1],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=,defaultCapable=false]
        at java.lang.Thread.getStackTrace(Thread.java:1426)
        at
org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager.checkThreadViolations(Unknown
Source)
        at
org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager.addDirtyRegion(Unknown
Source)
        at javax.swing.JComponent.repaint(JComponent.java:4714)
        at java.awt.Component.repaint(Component.java:2924)
        at javax.swing.AbstractButton.setIcon(AbstractButton.java:460)
        at
com.bbn.openmap.gui.StatusLightPanel.setLayerStatus(StatusLightPanel.java:241)
        at
com.bbn.openmap.gui.StatusLightPanel.updateLayerStatus(StatusLightPanel.java:284)
        at com.bbn.openmap.Layer.fireStatusUpdate(Layer.java:959)
        at com.bbn.openmap.Layer.fireStatusUpdate(Layer.java:973)
        at
com.bbn.openmap.layer.location.LocationLayer$LocationWorker.construct(LocationLayer.java:174)
        at com.bbn.openmap.util.SwingWorker$2.run(SwingWorker.java:116)
        at java.lang.Thread.run(Thread.java:619)

and this

EDT violation detected
javax.swing.JTextField[,2,0,86x20,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource_at_1a16b0d,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=212,g=214,b=206],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=107,g=109,b=174],selectionColor=javax.swing.plaf.ColorUIResource[r=212,g=233,b=242],columns=10,columnWidth=8,command=setScale,horizontalAlignment=RIGHT]
        at java.lang.Thread.getStackTrace(Thread.java:1426)
        at
org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager.checkThreadViolations(Unknown
Source)
        at
org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager.addDirtyRegion(Unknown
Source)
        at javax.swing.JComponent.repaint(JComponent.java:4714)
        at java.awt.Component.repaint(Component.java:2967)
        at javax.swing.text.PlainView.damageLineRange(PlainView.java:572)
        at javax.swing.text.PlainView.updateDamage(PlainView.java:533)
        at javax.swing.text.PlainView.removeUpdate(PlainView.java:438)
        at javax.swing.text.FieldView.removeUpdate(FieldView.java:290)
        at
javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(BasicTextUI.java:1603)
        at
javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(BasicTextUI.java:1863)
        at
javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:243)
        at
javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:608)
        at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
        at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:652)
        at javax.swing.text.JTextComponent.setText(JTextComponent.java:1693)
        at
com.bbn.openmap.gui.ScaleTextPanel.setProjection(ScaleTextPanel.java:110)
        at
com.bbn.openmap.gui.ScaleTextPanel.projectionChanged(ScaleTextPanel.java:257)
        at
com.bbn.openmap.event.ProjectionSupport$ProjectionChangedRunnable.run(ProjectionSupport.java:110)
        at java.lang.Thread.run(Thread.java:619)

So are these really EDT violations?

BR
Carsten

-- 
View this message in context: http://www.nabble.com/OM-EDT-Mistakes-tp10303089p10303089.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Apr 03 2008 - 03:16:55 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT