Author: jsc
Date: Tue Jul  9 07:55:12 2013
New Revision: 1501121

URL: http://svn.apache.org/r1501121
Log:
#121510# apply patch to handle new focus check in Java 7

Patch By: David Ostrovsky
Reviewed By: jsc

Modified:
    
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
    
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
    
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
    
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Window.java

Modified: 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java?rev=1501121&r1=1501120&r2=1501121&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
 (original)
+++ 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
 Tue Jul  9 07:55:12 2013
@@ -110,4 +110,16 @@ public class ComboBox extends Container 
             return 1;
         }
     }
+
+    /**
+     * Returns whether this Component can be focused.
+     *
+     * @return <code>true</code> if this Component is focusable;
+     *         <code>false</code> otherwise.
+     * @see #setFocusable
+     * @since 1.4
+     */
+    public boolean isFocusable() {
+        return true;
+    }
 }

Modified: 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java?rev=1501121&r1=1501120&r2=1501121&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
 (original)
+++ 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
 Tue Jul  9 07:55:12 2013
@@ -118,18 +118,39 @@ public class Dialog extends java.awt.Dia
     public void removeNotify() {
     }
     
-        /**
-         * Determines if the object is visible.  Note: this means that the
-         * object intends to be visible; however, it may not in fact be
-         * showing on the screen because one of the objects that this object
-         * is contained by is not visible.  To determine if an object is
-         * showing on the screen, use <code>isShowing</code>.
-         *
-         * @return true if object is visible; otherwise, false
-         */
+    /**
+     * Determines if the object is visible.  Note: this means that the
+     * object intends to be visible; however, it may not in fact be
+     * showing on the screen because one of the objects that this object
+     * is contained by is not visible.  To determine if an object is
+     * showing on the screen, use <code>isShowing</code>.
+     *
+     * @return true if object is visible; otherwise, false
+     */
     public boolean isVisible(){
         return visible;
     }
+
+    /**
+     * Determines whether this component is displayable. A component is
+     * displayable when it is connected to a native screen resource.
+     * <p>
+     * A component is made displayable either when it is added to
+     * a displayable containment hierarchy or when its containment
+     * hierarchy is made displayable.
+     * A containment hierarchy is made displayable when its ancestor
+     * window is either packed or made visible.
+     * <p>
+     * A component is made undisplayable either when it is removed from
+     * a displayable containment hierarchy or when its containment hierarchy
+     * is made undisplayable.  A containment hierarchy is made
+     * undisplayable when its ancestor window is disposed.
+     *
+     * @return <code>true</code> if the component is displayable
+     */
+    public boolean isDisplayable() {
+        return true;
+    }
     
     /**
     * Shows or hides this component depending on the value of parameter

Modified: 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Frame.java?rev=1501121&r1=1501120&r2=1501121&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
 (original)
+++ 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
 Tue Jul  9 07:55:12 2013
@@ -638,5 +638,28 @@ public class Frame extends java.awt.Fram
             unoAccessibleComponent.grabFocus();
         }
     }
+
+    /**
+     * Determines whether this component is displayable. A component is
+     * displayable when it is connected to a native screen resource.
+     * <p>
+     * A component is made displayable either when it is added to
+     * a displayable containment hierarchy or when its containment
+     * hierarchy is made displayable.
+     * A containment hierarchy is made displayable when its ancestor
+     * window is either packed or made visible.
+     * <p>
+     * A component is made undisplayable either when it is removed from
+     * a displayable containment hierarchy or when its containment hierarchy
+     * is made undisplayable.  A containment hierarchy is made
+     * undisplayable when its ancestor window is disposed.
+     *
+     * @return <code>true</code> if the component is displayable
+     */
+    @Override
+    public boolean isDisplayable() {
+        return true;
+    }
+
 }
 

Modified: 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Window.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Window.java?rev=1501121&r1=1501120&r2=1501121&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Window.java
 (original)
+++ 
openoffice/trunk/main/accessibility/bridge/org/openoffice/java/accessibility/Window.java
 Tue Jul  9 07:55:12 2013
@@ -543,5 +543,28 @@ public class Window extends java.awt.Win
             unoAccessibleComponent.grabFocus();
         }
     }
+
+    /**
+     * Determines whether this component is displayable. A component is
+     * displayable when it is connected to a native screen resource.
+     * <p>
+     * A component is made displayable either when it is added to
+     * a displayable containment hierarchy or when its containment
+     * hierarchy is made displayable.
+     * A containment hierarchy is made displayable when its ancestor
+     * window is either packed or made visible.
+     * <p>
+     * A component is made undisplayable either when it is removed from
+     * a displayable containment hierarchy or when its containment hierarchy
+     * is made undisplayable.  A containment hierarchy is made
+     * undisplayable when its ancestor window is disposed.
+     *
+     * @return <code>true</code> if the component is displayable
+     */
+    @Override
+    public boolean isDisplayable() {
+        return true;
+    }
+
 }
 


Reply via email to