use of com.mucommander.commons.util.ui.dialog.DialogOwner in project mucommander by mucommander.
the class BinaryViewer method extendMenu.
@Override
public void extendMenu(JMenuBar menuBar) {
menuBar.add(editMenu);
menuBar.add(viewMenu);
EncodingMenu encodingMenu = new EncodingMenu(new DialogOwner(presenter.getWindowFrame()), binaryComponent.getCodeArea().getCharset().name());
encodingMenu.addEncodingListener((source, oldEncoding, newEncoding) -> changeEncoding(newEncoding));
menuBar.add(encodingMenu);
}
use of com.mucommander.commons.util.ui.dialog.DialogOwner in project mucommander by mucommander.
the class MiscPanel method createShellEncodingPanel.
private JPanel createShellEncodingPanel(PreferencesDialog parent) {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING));
shellEncodingAutoDetectCheckbox = new PrefCheckBox(Translator.get("prefs_dialog.auto_detect_shell_encoding"), () -> MuConfigurations.getPreferences().getVariable(MuPreference.AUTODETECT_SHELL_ENCODING, MuPreferences.DEFAULT_AUTODETECT_SHELL_ENCODING));
shellEncodingAutoDetectCheckbox.addDialogListener(parent);
shellEncodingAutoDetectCheckbox.addItemListener(this);
panel.add(shellEncodingAutoDetectCheckbox);
shellEncodingSelectBox = new PrefEncodingSelectBox(new DialogOwner(parent), MuConfigurations.getPreferences().getVariable(MuPreference.SHELL_ENCODING)) {
public boolean hasChanged() {
return !MuConfigurations.getPreferences().getVariable(MuPreference.SHELL_ENCODING).equals(getSelectedEncoding());
}
};
shellEncodingSelectBox.addDialogListener(parent);
shellEncodingSelectBox.setEnabled(!shellEncodingAutoDetectCheckbox.isSelected());
panel.add(shellEncodingSelectBox);
return panel;
}
use of com.mucommander.commons.util.ui.dialog.DialogOwner in project mucommander by mucommander.
the class TextEditor method extendMenu.
@Override
public void extendMenu(JMenuBar menuBar) {
super.extendMenu(menuBar);
// Encoding menu
EncodingMenu encodingMenu = new EncodingMenu(new DialogOwner(presenter.getWindowFrame()), textViewerDelegate.getEncoding());
encodingMenu.addEncodingListener(this);
menuBar.add(editMenu);
menuBar.add(viewMenu);
menuBar.add(encodingMenu);
}
use of com.mucommander.commons.util.ui.dialog.DialogOwner in project mucommander by mucommander.
the class BinaryEditor method extendMenu.
@Override
public void extendMenu(JMenuBar menuBar) {
menuBar.add(fileMenu);
menuBar.add(editMenu);
menuBar.add(viewMenu);
EncodingMenu encodingMenu = new EncodingMenu(new DialogOwner(presenter.getWindowFrame()), binaryComponent.getCodeArea().getCharset().name());
encodingMenu.addEncodingListener((source, oldEncoding, newEncoding) -> changeEncoding(newEncoding));
menuBar.add(encodingMenu);
}
use of com.mucommander.commons.util.ui.dialog.DialogOwner in project mucommander by mucommander.
the class TextViewer method extendMenu.
@Override
public void extendMenu(JMenuBar menuBar) {
// Encoding menu
EncodingMenu encodingMenu = new EncodingMenu(new DialogOwner(presenter.getWindowFrame()), encoding);
encodingMenu.addEncodingListener(this);
menuBar.add(editMenu);
menuBar.add(viewMenu);
menuBar.add(encodingMenu);
}
Aggregations