Пример #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();
	}
Пример #2
0
 public static Locale[] getLocaleOptions() {
   return source.getLocaleOptions();
 }
Пример #3
0
 public static StringGetter getter(String key) {
   return source.getter(key);
 }
Пример #4
0
 public static String get(String key, String arg) {
   return StringUtil.format(source.get(key), arg);
 }
Пример #5
0
 public static String get(String key) {
   return source.get(key);
 }
Пример #6
0
		WindowMenuManager() {
			super(_("preferencesFrameMenuItem"), true);
			LocaleManager.addLocaleListener(this);
		}