Added copyright boilerplate.

Now using reflection API to invoke Java 1.4-specific functionality.  Thus, Savant now builds on my Java 1.3.1_04 box.
This commit is contained in:
dchandler 2002-09-28 14:42:01 +00:00
parent 955c46a7eb
commit eec991f735
25 changed files with 703 additions and 27 deletions

View file

@ -1,3 +1,21 @@
/*
The contents of this file are subject to the THDL Open Community License
Version 1.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License on the THDL web site
(http://www.thdl.org/).
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific terms governing rights and limitations under the
License.
The Initial Developer of this software is the Tibetan and Himalayan Digital
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
All Rights Reserved.
Contributor(s): ______________________________________.
*/
package org.thdl.savant;
import java.io.*;
@ -229,12 +247,15 @@ public class SavantShell extends JFrame
});
// Code for Merlin
if (getToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH))
{
if (JdkVersionHacks.maximizedBothSupported(getToolkit())) {
setLocation(0,0);
setSize(getToolkit().getScreenSize().width,getToolkit().getScreenSize().height);
setVisible(true);
setExtendedState(Frame.MAXIMIZED_BOTH);
// call setExtendedState(Frame.MAXIMIZED_BOTH) if possible:
if (!JdkVersionHacks.maximizeJFrameInBothDirections(this)) {
throw new Error("badness at maximum: the frame state is supported, but setting that state failed. JdkVersionHacks has a bug.");
}
} else {
Dimension gs = getToolkit().getScreenSize();
setLocation(0,0);
@ -327,4 +348,4 @@ public class SavantShell extends JFrame
}
}
}
}
}