< prev index next >
src/java.desktop/share/classes/java/awt/MenuComponent.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 20,44 ****
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.awt;
- import java.awt.peer.MenuComponentPeer;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.io.ObjectInputStream;
- import sun.awt.AppContext;
- import sun.awt.AWTAccessor;
- import sun.awt.ComponentFactory;
-
- import javax.accessibility.*;
-
import java.security.AccessControlContext;
import java.security.AccessController;
/**
* The abstract class {@code MenuComponent} is the superclass
* of all menu-related components. In this respect, the class
* {@code MenuComponent} is analogous to the abstract superclass
* {@code Component} for AWT components.
--- 20,51 ----
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
package java.awt;
import java.awt.event.ActionEvent;
+ import java.awt.peer.MenuComponentPeer;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.security.AccessControlContext;
import java.security.AccessController;
+ import javax.accessibility.Accessible;
+ import javax.accessibility.AccessibleComponent;
+ import javax.accessibility.AccessibleContext;
+ import javax.accessibility.AccessibleRole;
+ import javax.accessibility.AccessibleSelection;
+ import javax.accessibility.AccessibleState;
+ import javax.accessibility.AccessibleStateSet;
+
+ import sun.awt.AWTAccessor;
+ import sun.awt.AppContext;
+ import sun.awt.ComponentFactory;
+
/**
* The abstract class {@code MenuComponent} is the superclass
* of all menu-related components. In this respect, the class
* {@code MenuComponent} is analogous to the abstract superclass
* {@code Component} for AWT components.
*** 58,109 ****
initIDs();
}
}
transient volatile MenuComponentPeer peer;
! transient MenuContainer parent;
/**
* The {@code AppContext} of the {@code MenuComponent}.
* This is set in the constructor and never changes.
*/
! transient AppContext appContext;
/**
* The menu component's font. This value can be
* {@code null} at which point a default will be used.
* This defaults to {@code null}.
*
* @serial
* @see #setFont(Font)
* @see #getFont()
*/
! volatile Font font;
/**
* The menu component's name, which defaults to {@code null}.
* @serial
* @see #getName()
* @see #setName(String)
*/
! private String name;
/**
* A variable to indicate whether a name is explicitly set.
* If {@code true} the name will be set explicitly.
* This defaults to {@code false}.
* @serial
* @see #setName(String)
*/
! private boolean nameExplicitlySet = false;
/**
* Defaults to {@code false}.
* @serial
* @see #dispatchEvent(AWTEvent)
*/
! boolean newEventsOnly = false;
/*
* The menu's AccessControlContext.
*/
private transient volatile AccessControlContext acc =
--- 65,116 ----
initIDs();
}
}
transient volatile MenuComponentPeer peer;
! transient volatile MenuContainer parent;
/**
* The {@code AppContext} of the {@code MenuComponent}.
* This is set in the constructor and never changes.
*/
! private transient volatile AppContext appContext;
/**
* The menu component's font. This value can be
* {@code null} at which point a default will be used.
* This defaults to {@code null}.
*
* @serial
* @see #setFont(Font)
* @see #getFont()
*/
! private volatile Font font;
/**
* The menu component's name, which defaults to {@code null}.
* @serial
* @see #getName()
* @see #setName(String)
*/
! private volatile String name;
/**
* A variable to indicate whether a name is explicitly set.
* If {@code true} the name will be set explicitly.
* This defaults to {@code false}.
* @serial
* @see #setName(String)
*/
! private volatile boolean nameExplicitlySet;
/**
* Defaults to {@code false}.
* @serial
* @see #dispatchEvent(AWTEvent)
*/
! volatile boolean newEventsOnly;
/*
* The menu's AccessControlContext.
*/
private transient volatile AccessControlContext acc =
< prev index next >