Exemplo n.º 1
0
	private PreferencesFrame() {
		setDefaultCloseOperation(HIDE_ON_CLOSE);
		setJMenuBar(new LogisimMenuBar(this, null));
		
		panels = new OptionsPanel[] {
				new TemplateOptions(this),
				new IntlOptions(this),
				new WindowOptions(this),
				new LayoutOptions(this),
				new ExperimentalOptions(this),
		};
		tabbedPane = new JTabbedPane();
		int intlIndex = -1;
		for (int index = 0; index < panels.length; index++) {
			OptionsPanel panel = panels[index];
			tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
			if (panel instanceof IntlOptions) intlIndex = index;
		}

		JPanel buttonPanel = new JPanel();
		buttonPanel.add(close);
		close.addActionListener(myListener);

		Container contents = getContentPane();
		tabbedPane.setPreferredSize(new Dimension(450, 300));
		contents.add(tabbedPane, BorderLayout.CENTER);
		contents.add(buttonPanel, BorderLayout.SOUTH);
		
		if (intlIndex >= 0) tabbedPane.setSelectedIndex(intlIndex);

		LocaleManager.addLocaleListener(myListener);
		myListener.localeChanged();
		pack();
	}
Exemplo n.º 2
0
 public static Locale[] getLocaleOptions() {
   return source.getLocaleOptions();
 }
Exemplo n.º 3
0
 public static StringGetter getter(String key) {
   return source.getter(key);
 }
Exemplo n.º 4
0
 public static String get(String key, String arg) {
   return StringUtil.format(source.get(key), arg);
 }
Exemplo n.º 5
0
 public static String get(String key) {
   return source.get(key);
 }
Exemplo n.º 6
0
		WindowMenuManager() {
			super(_("preferencesFrameMenuItem"), true);
			LocaleManager.addLocaleListener(this);
		}