diff options
| author | Bdale Garbee <bdale@gag.com> | 2013-05-16 00:36:23 -0600 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2013-05-16 00:36:23 -0600 | 
| commit | 02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch) | |
| tree | 8356f4a019969ee99a45e264c87d38555cf316cc /altosui/Altos.java | |
| parent | 7a2e1f05adad990a6b161865267abf07ffec7a7e (diff) | |
| parent | 7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff) | |
Merge branch 'branch-1.2' into debian
Diffstat (limited to 'altosui/Altos.java')
| -rw-r--r-- | altosui/Altos.java | 75 | 
1 files changed, 3 insertions, 72 deletions
diff --git a/altosui/Altos.java b/altosui/Altos.java index cd17a93e..d25736bf 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -18,80 +18,11 @@  package altosui;  import java.awt.*; -import java.util.*; -import java.text.*; -import java.nio.charset.Charset; -  import libaltosJNI.*; -import org.altusmetrum.AltosLib.*; - -public class Altos extends AltosLib { - -	static final int tab_elt_pad = 5; - -	static Font label_font; -	static Font value_font; -	static Font status_font; -	static Font table_label_font; -	static Font table_value_font; - -	final static int font_size_small = 1; -	final static int font_size_medium = 2; -	final static int font_size_large = 3; - -	static void set_fonts(int size) { -		int	brief_size; -		int	table_size; -		int	status_size; - -		switch (size) { -		case font_size_small: -			brief_size = 16; -			status_size = 18; -			table_size = 11; -			break; -		default: -		case font_size_medium: -			brief_size = 22; -			status_size = 24; -			table_size = 14; -			break; -		case font_size_large: -			brief_size = 26; -			status_size = 30; -			table_size = 17; -			break; -		} -		label_font = new Font("Dialog", Font.PLAIN, brief_size); -		value_font = new Font("Monospaced", Font.PLAIN, brief_size); -		status_font = new Font("SansSerif", Font.BOLD, status_size); -		table_label_font = new Font("SansSerif", Font.PLAIN, table_size); -		table_value_font = new Font("Monospaced", Font.PLAIN, table_size); -	} - -	static final int text_width = 20; +import org.altusmetrum.altoslib_1.*; +import org.altusmetrum.altosuilib_1.*; -	static public boolean initialized = false; -	static public boolean loaded_library = false; +public class Altos extends AltosUILib { -	public static boolean load_library() { -		if (!initialized) { -			try { -				System.loadLibrary("altos"); -				libaltos.altos_init(); -				loaded_library = true; -			} catch (UnsatisfiedLinkError e) { -				try { -					System.loadLibrary("altos64"); -					libaltos.altos_init(); -					loaded_library = true; -				} catch (UnsatisfiedLinkError e2) { -					loaded_library = false; -				} -			} -			initialized = true; -		} -		return loaded_library; -	}  }  | 
