src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, 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) 1997, 2014, 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
*** 468,482 ****
--- 468,484 ----
* No longer used, use BasicToolBarUI.createFloatingWindow(JToolBar)
* @see #createFloatingWindow
*/
protected JFrame createFloatingFrame(JToolBar toolbar) {
Window window = SwingUtilities.getWindowAncestor(toolbar);
+ @SuppressWarnings("serial") // anonymous class
JFrame frame = new JFrame(toolbar.getName(),
(window != null) ? window.getGraphicsConfiguration() : null) {
// Override createRootPane() to automatically resize
// the frame when contents change
protected JRootPane createRootPane() {
+ @SuppressWarnings("serial") // anonymous class
JRootPane rootPane = new JRootPane() {
private boolean packing = false;
public void validate() {
super.validate();
*** 503,512 ****
--- 505,515 ----
* dragged out from its container
* @return a <code>RootPaneContainer</code> object, containing the toolbar.
* @since 1.4
*/
protected RootPaneContainer createFloatingWindow(JToolBar toolbar) {
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
class ToolBarDialog extends JDialog {
public ToolBarDialog(Frame owner, String title, boolean modal) {
super(owner, title, modal);
}
*** 515,524 ****
--- 518,528 ----
}
// Override createRootPane() to automatically resize
// the frame when contents change
protected JRootPane createRootPane() {
+ @SuppressWarnings("serial") // anonymous class
JRootPane rootPane = new JRootPane() {
private boolean packing = false;
public void validate() {
super.validate();
*** 1368,1377 ****
--- 1372,1382 ----
public void mouseMoved(MouseEvent e) {
getHandler().mouseMoved(e);
}
}
+ @SuppressWarnings("serial") // Same-version serialization only
protected class DragWindow extends Window
{
Color borderColor = Color.gray;
int orientation = toolBar.getOrientation();
Point offset; // offset of the mouse cursor inside the DragWindow