You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/11/24 10:49:02 UTC

[jira] Created: (HARMONY-2297) [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly

[classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly
----------------------------------------------------------------------------------------

                 Key: HARMONY-2297
                 URL: http://issues.apache.org/jira/browse/HARMONY-2297
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


AbstractButton.configurePropertiesFromAction(null) doesn't call revalidate()

============ Test.java ===========

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;

public class Test {
   public static void main(String[] string) throws Exception {
     AbstractButton ab = new AbstractButton() {
         public void revalidate() {
            System.err.println("revalidating....");
         }
     } ;
     ab.setModel(new DefaultButtonModel());
     ab.setText("Hello world!");
     ab.setMnemonic(java.awt.event.KeyEvent.VK_O);
     System.err.println("setting action to null");
     ab.setAction(null);
   }
}

========= RI =============
revalidating....
revalidating....
revalidating....
revalidating....
setting action to null
revalidating....
revalidating....
revalidating....
revalidating....

========= Harmony =========
setting action to null



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2297) [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-2297:
-------------------------------------

    Priority: Minor  (was: Major)

Priority was lowered.

> [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2297
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2297
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>            Priority: Minor
>
> AbstractButton.configurePropertiesFromAction(null) doesn't call revalidate()
> ============ Test.java ===========
> import javax.swing.*;
> import java.awt.*;
> import java.awt.event.*;
> import java.beans.*;
> public class Test {
>    public static void main(String[] string) throws Exception {
>      AbstractButton ab = new AbstractButton() {
>          public void revalidate() {
>             System.err.println("revalidating....");
>          }
>      } ;
>      ab.setModel(new DefaultButtonModel());
>      ab.setText("Hello world!");
>      ab.setMnemonic(java.awt.event.KeyEvent.VK_O);
>      System.err.println("setting action to null");
>      ab.setAction(null);
>    }
> }
> ========= RI =============
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> setting action to null
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> ========= Harmony =========
> setting action to null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2297) [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467339 ] 

Alexey A. Ivanov commented on HARMONY-2297:
-------------------------------------------

configurePropertiesFromAction() is not called directly because it is protected method and it's not allowed to be called from this context.
setAction() calls configurePropertiesFromAction(), however, it does some additional processing.

You can create a new subclass to make configurePropertiesFromAction() accessible via a public method to call it directly. I don't think it matters much here.

> [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2297
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2297
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> AbstractButton.configurePropertiesFromAction(null) doesn't call revalidate()
> ============ Test.java ===========
> import javax.swing.*;
> import java.awt.*;
> import java.awt.event.*;
> import java.beans.*;
> public class Test {
>    public static void main(String[] string) throws Exception {
>      AbstractButton ab = new AbstractButton() {
>          public void revalidate() {
>             System.err.println("revalidating....");
>          }
>      } ;
>      ab.setModel(new DefaultButtonModel());
>      ab.setText("Hello world!");
>      ab.setMnemonic(java.awt.event.KeyEvent.VK_O);
>      System.err.println("setting action to null");
>      ab.setAction(null);
>    }
> }
> ========= RI =============
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> setting action to null
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> ========= Harmony =========
> setting action to null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2297) [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly

Posted by "Sergey Krivenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467050 ] 

Sergey Krivenko commented on HARMONY-2297:
------------------------------------------

I'm confused. Why should configurePropertiesFromAction() method call revalidate()? Why doesn't the test call configurePropertiesFromAction() but setAction() instead?

> [classlib][swing] Swing components do not call 'repaint()' and 'revalidate()' explicitly
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2297
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2297
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> AbstractButton.configurePropertiesFromAction(null) doesn't call revalidate()
> ============ Test.java ===========
> import javax.swing.*;
> import java.awt.*;
> import java.awt.event.*;
> import java.beans.*;
> public class Test {
>    public static void main(String[] string) throws Exception {
>      AbstractButton ab = new AbstractButton() {
>          public void revalidate() {
>             System.err.println("revalidating....");
>          }
>      } ;
>      ab.setModel(new DefaultButtonModel());
>      ab.setText("Hello world!");
>      ab.setMnemonic(java.awt.event.KeyEvent.VK_O);
>      System.err.println("setting action to null");
>      ab.setAction(null);
>    }
> }
> ========= RI =============
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> setting action to null
> revalidating....
> revalidating....
> revalidating....
> revalidating....
> ========= Harmony =========
> setting action to null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.