Package de.kunysch.tvbrowser

Examples of de.kunysch.tvbrowser.Settings


    this.plugin = plugin;
    this.day = day;
    this.titleFormat = new MessageFormat(mLocalizer.msg("title", "Day summary - {0,date} - LocalImdb {1}")); //$NON-NLS-1$
    this.titleFormatShowAll = new MessageFormat(mLocalizer.msg(
        "title.all", "Day summary - {0,date}-{1,date} - LocalImdb {2}")); //$NON-NLS-1$
    final Settings settings = SettingsKeys.getSettings();
    setLocation(settings.getInt(SettingsKeys.DIALOG_X), settings.getInt(SettingsKeys.DIALOG_Y));
    setSize(settings.getInt(SettingsKeys.DIALOG_W), settings.getInt(SettingsKeys.DIALOG_H));
    updateDialog(0);
    initColumnLayout();
  }
View Full Code Here


  /**
   * This internal function stores column and dialog layout information in the
   * settings object.
   */
  private void saveLayout() {
    final Settings settings = SettingsKeys.getSettings();
    settings.setInt(SettingsKeys.DIALOG_X, getX());
    settings.setInt(SettingsKeys.DIALOG_Y, getY());
    settings.setInt(SettingsKeys.DIALOG_W, getWidth());
    settings.setInt(SettingsKeys.DIALOG_H, getHeight());
    final TableColumnModel colModel = table.getColumnModel();
    final StringBuffer colSizes = new StringBuffer();
    for (int i = 0; i < colModel.getColumnCount(); ++i) {
      colSizes.append(Integer.toString(colModel.getColumn(i).getModelIndex()));
      colSizes.append(';');
      colSizes.append(Integer.toString(colModel.getColumn(i).getWidth()));
      colSizes.append(';');
    }
    settings.setProperty(SettingsKeys.DIALOG_COLS, colSizes.toString());
  }
View Full Code Here

  public SettingsDialog(Plugin plugin, JDialog parent) {
    super(parent, mLocalizer.msg("title", "Settings - LocalImdb {0}", new Object[] { plugin.getInfo().getVersion() }),
        true);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    final Settings settings = SettingsKeys.getSettings();
    final Point location = new Point(settings.getInt(SettingsKeys.SETTINGS_X), settings.getInt(SettingsKeys.SETTINGS_Y));
    SwingUtilities.convertPointFromScreen(location, this);
    setLocation(location);
    this.programTab = getProgramPanelSettingsTab();
    this.pluginTab = plugin.getSettingsTab();
    iconPanel = extractIconPanel();
View Full Code Here

    final JButton okBtn = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    final JButton cancelBtn = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));
    final JButton applyBtn = new JButton(mLocalizer.msg("apply", "Apply")); //$NON-NLS-1$
    okBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        final Settings settings = SettingsKeys.getSettings();
        settings.setInt(SettingsKeys.SETTINGS_X, getLocationOnScreen().x);
        settings.setInt(SettingsKeys.SETTINGS_Y, getLocationOnScreen().y);
        applySettings();
        dispose();
      }
    });
    cancelBtn.addActionListener(new ActionListener() {
View Full Code Here

  }

  public HelpDialog(Dialog parent, URL startingUrl) {
    super(parent, mLocalizer.msg("title", "Viewer - LocalImdb"), startingUrl); //$NON-NLS-1$
    addWindowListener(new Listener());
    final Settings settings = SettingsKeys.getSettings();
    final Point location = new Point(settings.getInt(SettingsKeys.HELP_X), settings.getInt(SettingsKeys.HELP_Y));
    SwingUtilities.convertPointToScreen(location, this);
    setLocation(location);
    setSize(new Dimension(settings.getInt(SettingsKeys.HELP_W), settings.getInt(SettingsKeys.HELP_H)));
  }
View Full Code Here

  private static class Listener extends WindowAdapter {
    @Override
    public void windowClosing(WindowEvent e) {
      super.windowClosing(e);
      final Settings settings = SettingsKeys.getSettings();
      final Point location = e.getComponent().getLocationOnScreen();
      settings.setInt(SettingsKeys.HELP_X, location.x);
      settings.setInt(SettingsKeys.HELP_Y, location.y);
      final Dimension size = e.getComponent().getSize();
      settings.setInt(SettingsKeys.HELP_W, size.width);
      settings.setInt(SettingsKeys.HELP_H, size.height);
    }
View Full Code Here

TOP

Related Classes of de.kunysch.tvbrowser.Settings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.