xref: /AOO41X/main/accessibility/bridge/org/openoffice/java/accessibility/Alert.java (revision 47148b3bc50811ceb41802e4cc50a5db21535900)
18622218dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
38622218dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
48622218dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
58622218dSAndrew Rist  * distributed with this work for additional information
68622218dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
78622218dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
88622218dSAndrew Rist  * "License"); you may not use this file except in compliance
98622218dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
118622218dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
138622218dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
148622218dSAndrew Rist  * software distributed under the License is distributed on an
158622218dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
168622218dSAndrew Rist  * KIND, either express or implied.  See the License for the
178622218dSAndrew Rist  * specific language governing permissions and limitations
188622218dSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
208622218dSAndrew Rist  *************************************************************/
218622218dSAndrew Rist 
228622218dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir package org.openoffice.java.accessibility;
25cdf0e10cSrcweir 
26cdf0e10cSrcweir import javax.accessibility.AccessibleRole;
27cdf0e10cSrcweir import com.sun.star.accessibility.*;
28cdf0e10cSrcweir 
29cdf0e10cSrcweir public class Alert extends Dialog {
30cdf0e10cSrcweir 
Alert(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent)31cdf0e10cSrcweir     protected Alert(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent) {
32cdf0e10cSrcweir         super(owner, xAccessibleComponent);
33cdf0e10cSrcweir     }
34cdf0e10cSrcweir 
Alert(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent)35cdf0e10cSrcweir     protected Alert(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent) {
36cdf0e10cSrcweir         super(owner, name, xAccessibleComponent);
37cdf0e10cSrcweir     }
38cdf0e10cSrcweir 
Alert(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent)39cdf0e10cSrcweir     protected Alert(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent) {
40cdf0e10cSrcweir         super(owner, name, modal, xAccessibleComponent);
41cdf0e10cSrcweir     }
42cdf0e10cSrcweir 
43cdf0e10cSrcweir     /** Returns the AccessibleContext associated with this object */
getAccessibleContext()44cdf0e10cSrcweir     public javax.accessibility.AccessibleContext getAccessibleContext() {
45cdf0e10cSrcweir         if (accessibleContext == null) {
46cdf0e10cSrcweir             accessibleContext = new AccessibleAlert();
47cdf0e10cSrcweir             accessibleContext.setAccessibleName(getTitle());
48cdf0e10cSrcweir         }
49cdf0e10cSrcweir         return accessibleContext;
50cdf0e10cSrcweir     }
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     protected class AccessibleAlert extends AccessibleDialog {
53cdf0e10cSrcweir 
AccessibleAlert()54cdf0e10cSrcweir         protected AccessibleAlert() {
55cdf0e10cSrcweir             super();
56cdf0e10cSrcweir         }
57cdf0e10cSrcweir 
getAccessibleRole()58cdf0e10cSrcweir         public AccessibleRole getAccessibleRole() {
59cdf0e10cSrcweir             return AccessibleRole.ALERT;
60cdf0e10cSrcweir         }
61*170fb961SPedro Giffuni     }
62cdf0e10cSrcweir }
63