Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ij/IJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ else if (version.startsWith("1.7"))
df[9] = new DecimalFormat("0.000000000", dfs);
df[0].setRoundingMode(RoundingMode.HALF_UP);
}

static void init(ImageJ imagej, Applet theApplet) {
ij = imagej;
applet = theApplet;
Expand Down Expand Up @@ -441,7 +441,11 @@ public static boolean isMacro() {
return macroRunning || Interpreter.getInstance()!=null;
}

/**Returns the Applet that created this ImageJ or null if running as an application.*/
/**
* Returns the Applet that created this ImageJ or null if running as an application.
* @deprecated Always returns null when running on Java 26+ due to removal of Applets.
*/
@Deprecated
public static java.applet.Applet getApplet() {
return applet;
}
Expand Down
9 changes: 7 additions & 2 deletions ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,19 @@ public ImageJ(int mode) {
this(null, mode);
}

/** Creates a new ImageJ frame that runs as an applet. */
/** Creates a new ImageJ frame that runs as an applet.
@deprecated Applets were removed in Java 26*/
@Deprecated
public ImageJ(java.applet.Applet applet) {
this(applet, STANDALONE);
}

/** If 'applet' is not null, creates a new ImageJ frame that runs as an applet.
If 'mode' is ImageJ.EMBEDDED and 'applet is null, creates an embedded
(non-standalone) version of ImageJ. */
(non-standalone) version of ImageJ.
@deprecated Applets were removed in Java 26.
*/
@Deprecated
public ImageJ(java.applet.Applet applet, int mode) {
super("ImageJ");
if ((mode&DEBUG)!=0)
Expand Down
14 changes: 14 additions & 0 deletions ij/Prefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,24 @@ public static boolean get(String key, boolean defaultValue) {
else
return value.equals("true");
}

/**
* Finds and loads the configuration file ("IJ_Props.txt")
* and the preferences file ("IJ_Prefs.txt").
*
* @param ij
* @return an error message if "IJ_Props.txt" not found.
*/
public static String load(Object ij) {
return load(ij, null);
}

/** Finds and loads the configuration file ("IJ_Props.txt")
* and the preferences file ("IJ_Prefs.txt").
* @return an error message if "IJ_Props.txt" not found.
* @deprecated Prefer {@link #load(Object)} as Applets were removed in Java 26.
*/
@Deprecated
public static String load(Object ij, Applet applet) {
if (ImageJDir==null)
ImageJDir = System.getProperty("user.dir");
Expand Down Expand Up @@ -345,6 +358,7 @@ static void dumpPrefs() {
}
*/

@Deprecated
static String loadAppletProps(InputStream f, Applet applet) {
if (f==null)
return PROPS_NAME+" not found in ij.jar";
Expand Down
Loading