Skip to content

Commit

Permalink
switch deprecated show()/hide() to setVisible(boolean visible)
Browse files Browse the repository at this point in the history
  • Loading branch information
mebigfatguy committed Dec 31, 2017
1 parent 2302af3 commit a6f17b3
Show file tree
Hide file tree
Showing 20 changed files with 6,835 additions and 6,963 deletions.
16 changes: 8 additions & 8 deletions src/org/apophysis/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@ public class Adjust extends MyThinlet implements Constants, ThreadTarget {

@Override
public boolean destroy() {
hide();
super.setVisible(false);
return false;
}

/*****************************************************************************/

@Override
public void show() {
public void setVisible(boolean visible) {

super.show();
super.setVisible(visible);

}

Expand Down Expand Up @@ -559,7 +559,7 @@ void drawPreview() {

public void btnOpenClick() {

Global.browser.show();
Global.browser.setVisible(true);

} // End of method btnOpenClick

Expand Down Expand Up @@ -916,7 +916,7 @@ public void btnBackgroundClick() {

Global.colordialog = new ColorDialog(this, color);
Global.colordialog.setTask(new ColorTask());
Global.colordialog.show();
Global.colordialog.setVisible(true);

}

Expand Down Expand Up @@ -1108,7 +1108,7 @@ public void mnuSmoothPaletteClick() {
/*****************************************************************************/

public void mnuOpenClick() {
Global.browser.show();
Global.browser.setVisible(true);
}

/*****************************************************************************/
Expand All @@ -1123,7 +1123,7 @@ public void mnuSaveGradientClick() {

Task task = new SaveGradientTask();
Global.entrydialog = new EntryDialog(this, Global.gradientFile, ename, task);
Global.entrydialog.show();
Global.entrydialog.setVisible(true);

} // End of method mnuSaveGradientClick

Expand All @@ -1141,7 +1141,7 @@ public void mnuSaveMapClick() {
Task task = new SaveMapTask();
String name = Global.mainCP.name + ".map";
Global.savedialog = new SaveDialog(this, Global.browserPath, name, task);
Global.savedialog.show();
Global.savedialog.setVisible(true);

}

Expand Down
55 changes: 26 additions & 29 deletions src/org/apophysis/Apophysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,40 @@ based on Flam3 ( http://www.flam3.com )

public class Apophysis implements Constants {

/*****************************************************************************/
// CONSTANTS
/*****************************************************************************/
// CONSTANTS

public static void main(String args[]) {
public static void main(String args[]) {

System.setProperty("com.apple.mrj.application.apple.menu.about.name",
"Apophysis-j");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Apophysis-j");

try {
String title = APPNAME + " " + VERSION;
try {
String title = APPNAME + " " + VERSION;

Global.randomGenerator = new Random();
Global.randomGenerator = new Random();

Global.main = new Main(title, "/org/apophysis/thinletxml/main.xml", 800, 600);
Global.editor = new Editor("Editor", "/org/apophysis/thinletxml/editor.xml", 760, 556);
Global.adjust = new Adjust("Adjust", "/org/apophysis/thinletxml/adjust.xml", 450, 380);
Global.browser = new Browser("Browser", "/org/apophysis/thinletxml/browser.xml", 500, 350);
Global.mutate = new Mutate("Mutate", "/org/apophysis/thinletxml/mutate.xml", 370, 400);
Global.options = new Options("Options", "/org/apophysis/thinletxml/options.xml", 520, 400);
Global.export = new Export("Export Flame", "/org/apophysis/thinletxml/export.xml", 420, 390);
Global.script = new Script("Script Editor", "/org/apophysis/thinletxml/script.xml", 540, 490);
Global.helper = new Helper("Help", "/org/apophysis/thinletxml/helper.xml", 520, 520);
Global.preview = new Preview("Preview", "/org/apophysis/thinletxml/preview.xml", 212, 180);
Global.favorites = new Favorites("Favorite Scripts",
"/org/apophysis/thinletxml/favorites.xml", 400, 400);
Global.fullscreen = new Fullscreen("Full Screen", "/org/apophysis/thinletxml/fullscreen.xml",
100, 100);
Global.render = new Render("Render", "/org/apophysis/thinletxml/render.xml", 470, 470);
Global.main = new Main(title, "/org/apophysis/thinletxml/main.xml", 800, 600);
Global.editor = new Editor("Editor", "/org/apophysis/thinletxml/editor.xml", 760, 556);
Global.adjust = new Adjust("Adjust", "/org/apophysis/thinletxml/adjust.xml", 450, 380);
Global.browser = new Browser("Browser", "/org/apophysis/thinletxml/browser.xml", 500, 350);
Global.mutate = new Mutate("Mutate", "/org/apophysis/thinletxml/mutate.xml", 370, 400);
Global.options = new Options("Options", "/org/apophysis/thinletxml/options.xml", 520, 400);
Global.export = new Export("Export Flame", "/org/apophysis/thinletxml/export.xml", 420, 390);
Global.script = new Script("Script Editor", "/org/apophysis/thinletxml/script.xml", 540, 490);
Global.helper = new Helper("Help", "/org/apophysis/thinletxml/helper.xml", 520, 520);
Global.preview = new Preview("Preview", "/org/apophysis/thinletxml/preview.xml", 212, 180);
Global.favorites = new Favorites("Favorite Scripts", "/org/apophysis/thinletxml/favorites.xml", 400, 400);
Global.fullscreen = new Fullscreen("Full Screen", "/org/apophysis/thinletxml/fullscreen.xml", 100, 100);
Global.render = new Render("Render", "/org/apophysis/thinletxml/render.xml", 470, 470);

Global.main.show();
Global.main.setVisible(true);

} catch (Exception ex) {
ex.printStackTrace();
}
} catch (Exception ex) {
ex.printStackTrace();
}

} // End of method main
} // End of method main

/*****************************************************************************/
/*****************************************************************************/

} // End of class Apophysis
Loading

0 comments on commit a6f17b3

Please sign in to comment.