/*
* 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.
*/
/**
* Basic L&F for a desktop.
*
* @author Steve Wilson
*/
// Old actions forward to an instance of this.
/**
* As of Java 2 platform v1.3 this previously undocumented field is no
* longer used.
* Key bindings are now defined by the LookAndFeel, please refer to
* the key bindings specification for further details.
*
* @deprecated As of 1.3.
*/
/**
* As of Java 2 platform v1.3 this previously undocumented field is no
* longer used.
* Key bindings are now defined by the LookAndFeel, please refer to
* the key bindings specification for further details.
*
* @deprecated As of 1.3.
*/
/**
* As of Java 2 platform v1.3 this previously undocumented field is no
* longer used.
* Key bindings are now defined by the LookAndFeel, please refer to
* the key bindings specification for further details.
*
* @deprecated As of 1.3.
*/
/**
* As of Java 2 platform v1.3 this previously undocumented field is no
* longer used.
* Key bindings are now defined by the LookAndFeel, please refer to
* the key bindings specification for further details.
*
* @deprecated As of 1.3.
*/
/**
* As of Java 2 platform v1.3 this previously undocumented field is no
* longer used.
* Key bindings are now defined by the LookAndFeel, please refer to
* the key bindings specification for further details.
*
* @deprecated As of 1.3.
*/
return new BasicDesktopPaneUI();
}
public BasicDesktopPaneUI() {
}
desktop = (JDesktopPane)c;
}
}
protected void installDefaults() {
}
}
protected void uninstallDefaults() { }
/**
* Installs the <code>PropertyChangeListener</code> returned from
* <code>createPropertyChangeListener</code> on the
* <code>JDesktopPane</code>.
*
* @since 1.5
* @see #createPropertyChangeListener
*/
protected void installListeners() {
}
/**
* Uninstalls the <code>PropertyChangeListener</code> returned from
* <code>createPropertyChangeListener</code> from the
* <code>JDesktopPane</code>.
*
* @since 1.5
* @see #createPropertyChangeListener
*/
protected void uninstallListeners() {
}
protected void installDesktopManager() {
if(desktopManager == null) {
desktopManager = new BasicDesktopManager();
}
}
protected void uninstallDesktopManager() {
}
}
protected void installKeyboardActions(){
}
inputMap);
}
"DesktopPane.actionMap");
}
protected void registerKeyboardActions(){
}
protected void unregisterKeyboardActions(){
}
return createInputMap(condition);
}
"Desktop.ancestorInputMap");
}
return null;
}
this, "Desktop.windowBindings");
}
}
return null;
}
}
protected void uninstallKeyboardActions(){
}
return minSize;
}
return maxSize;
}
/**
* Returns the <code>PropertyChangeListener</code> to install on
* the <code>JDesktopPane</code>.
*
* @since 1.5
* @return The PropertyChangeListener that will be added to track
* changes in the desktop pane.
*/
return getHandler();
}
}
return handler;
}
if ("desktopManager" == propertyName) {
}
}
}
/**
* The default DesktopManager installed by the UI.
*/
implements UIResource {
}
private static boolean moving = false;
private static boolean resizing = false;
Actions() {
super(null);
}
super(name);
}
}
focusOwner != null) {
}
moving = false;
resizing = false;
sourceFrame = null;
focusOwner = null;
}
if (sourceFrame == null) {
return;
}
focusOwner = null;
}
}
SHRINK_RIGHT == key ||
SHRINK_LEFT == key ||
SHRINK_DOWN == key) {
sourceFrame) {
return;
}
int delta;
if (moving) {
c.setLocation(
loc.x - MOVE_RESIZE_INCREMENT,
loc.y);
} else if (resizing) {
}
if (moving) {
c.setLocation(
loc.x + MOVE_RESIZE_INCREMENT >
loc.x + MOVE_RESIZE_INCREMENT,
loc.y);
} else if (resizing) {
}
if (moving) {
c.setLocation(loc.x,
loc.y - MOVE_RESIZE_INCREMENT);
} else if (resizing) {
}
if (moving) {
c.setLocation(loc.x,
loc.y + MOVE_RESIZE_INCREMENT >
loc.y + MOVE_RESIZE_INCREMENT);
} else if (resizing) {
}
// Make sure we don't resize less than minimum size.
} else {
}
// Ensure that we keep the internal frame on the desktop.
}
// Make sure we don't resize less than minimum size.
} else {
}
// Ensure that we keep the internal frame on the desktop.
}
// Make sure we don't resize less than minimum size.
} else {
}
// Ensure that we keep the internal frame on the desktop.
}
// Make sure we don't resize less than minimum size.
} else {
}
// Ensure that we keep the internal frame on the desktop.
}
}
}
}
else if (NAVIGATE_NEXT == key ||
NAVIGATE_PREVIOUS == key) {
boolean moveForward = true;
if (NAVIGATE_PREVIOUS == key) {
moveForward = false;
}
try {
sPolicy.setImplicitDownCycleTraversal(false);
if (moveForward) {
} else {
}
} finally {
}
}
}
}
}
if (f == null) {
return;
}
f.doDefaultCloseAction();
// maximize the selected frame
if (f == null) {
return;
}
if (!f.isMaximum()) {
if (f.isIcon()) {
try {
f.setIcon(false);
f.setMaximum(true);
} catch (PropertyVetoException pve) {}
} else {
try {
f.setMaximum(true);
} catch (PropertyVetoException pve) {
}
}
}
// minimize the selected frame
if (f == null) {
return;
}
if (!f.isIcon()) {
try {
f.setIcon(true);
} catch (PropertyVetoException pve) {
}
}
// restore the selected minimized or maximized frame
if (f == null) {
return;
}
try {
if (f.isIcon()) {
f.setIcon(false);
} else if (f.isMaximum()) {
f.setMaximum(false);
}
f.setSelected(true);
} catch (PropertyVetoException pve) {
}
}
}
if (sender instanceof JDesktopPane) {
return true;
}
return false;
return iFrame.isClosable();
return iFrame.isIconifiable();
return iFrame.isMaximizable();
}
return true;
}
return false;
}
}
/**
* Handles restoring a minimized or maximized internal frame.
* @since 1.3
*/
}
public boolean isEnabled() {
return true;
}
}
/**
* Handles closing an internal frame.
*/
}
public boolean isEnabled() {
return iFrame.isClosable();
}
return false;
}
}
/**
* Handles minimizing an internal frame.
*/
}
public boolean isEnabled() {
return iFrame.isIconifiable();
}
return false;
}
}
/**
* Handles maximizing an internal frame.
*/
}
public boolean isEnabled() {
return iFrame.isMaximizable();
}
return false;
}
}
/**
* Handles navigating to the next internal frame.
*/
dp.selectFrame(true);
}
public boolean isEnabled() {
return true;
}
}
}