/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
final class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler {
if (ui instanceof ScreenMenuItemUI) {
// SAK: Not calling this means that mouse and mouse motion listeners don't get
// installed. Not a problem because the menu manager handles tracking for us.
}
}
public void addNotify() {
super.addNotify();
fMenuItem.addComponentListener(this);
fListener = new ScreenMenuPropertyListener(this);
addActionListener(this);
// can't setState or setAccelerator or setIcon till we have a peer
}
}
if (tooltipText != null) {
this.setToolTipText(tooltipText);
}
if (fMenuItem instanceof JRadioButtonMenuItem) {
if (ui instanceof ScreenMenuItemUI) {
}
}
}
public void removeNotify() {
super.removeNotify();
removeActionListener(this);
fMenuItem.removeComponentListener(this);
}
//Is it possible?
return;
}
} else {
ks.getModifiers());
}
}
}
// We call CMenuItem.setLabel(..,..,..) directly and does not initialize
// shortcut property. So shortcut property should not be used from the
// peers code directly or indirectly.
}
}
/**
* Invoked when the component's size changes.
*/
/**
* Invoked when the component's position changes.
*/
/**
* Invoked when the component has been made visible.
* See componentHidden - we should still have a MenuItem
* it just isn't inserted
*/
setVisible(true);
}
/**
* Invoked when the component has been made invisible.
* MenuComponent.setVisible does nothing,
* so we remove the ScreenMenuItem from the ScreenMenu
* but leave it in fItems
*/
setVisible(false);
}
public void setVisible(final boolean b) {
// Hang on to our parent
}
}
}
if (i != null) {
}
}
}
// we have no children
// only check and radio items can be indeterminate
}