Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.FormLayout$ComponentSizeCache


   */
  private void initGui() {

    JPanel panel = (JPanel) getContentPane();
    panel.setBorder(Borders.DLU4_BORDER);
    panel.setLayout(new FormLayout("fill:default:grow, default", "fill:default:grow, 3dlu, default"));

    CellConstraints cc = new CellConstraints();

    JEditorPane infoPanel = new JEditorPane();

View Full Code Here


  /**
   * Creates the settings panel for this tab.
   */
  public JPanel createSettingsPanel() {
    mSettingsPn = new JPanel(new FormLayout("5dlu, 10dlu, pref, 3dlu, pref, 3dlu, pref, fill:3dlu:grow, 3dlu", "pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref"));
    mSettingsPn.setBorder(Borders.DIALOG_BORDER);

    CellConstraints cc = new CellConstraints();

    mSettingsPn.add(DefaultComponentFactory.getInstance().createSeparator(mLocalizer.msg("browser", "Web browser")), cc.xyw(1,1,9));
View Full Code Here

    PlasticTheme[] themes = (PlasticTheme[]) themesList
        .toArray(new PlasticTheme[themesList.size()]);
   
    JPanel content = (JPanel) getContentPane();
   
    content.setLayout(new FormLayout("pref, 3dlu, fill:pref:grow", "pref, 3dlu, pref, fill:3dlu:grow, pref"));
    content.setBorder(Borders.DLU4_BORDER);
   
    CellConstraints cc = new CellConstraints();
   
    content.add(new JLabel(mLocalizer.msg("colorTheme", "Color-Theme") ":"), cc.xy(1,1));
View Full Code Here

   */
  private void initGui() {
    UiUtilities.registerForClosing(this);
    JPanel panel = (JPanel) getContentPane();
    panel.setBorder(Borders.DLU4_BORDER);
    panel.setLayout(new FormLayout("fill:default:grow, default", "fill:default:grow, 3dlu, default"));

    CellConstraints cc = new CellConstraints();

    final JEditorPane infoPanel = new JEditorPane();

View Full Code Here

  /**
   * Creates the settings panel for this tab.
   */
  public JPanel createSettingsPanel() {
    FormLayout layout = new FormLayout(
        "5dlu, pref, 3dlu, pref, fill:3dlu:grow, 3dlu",
        "pref, 5dlu, pref, 1dlu, pref, 1dlu, pref, 10dlu, pref, 10dlu, pref, 5dlu, pref, pref");
    mSettingsPn = new JPanel(layout);
    mSettingsPn.setBorder(Borders.DIALOG_BORDER);

    CellConstraints cc = new CellConstraints();

    int y = 1;

    mSettingsPn.add(DefaultComponentFactory.getInstance().createSeparator(
        mLocalizer.msg("title", "Startup")), cc.xyw(1, y++, 5));

    mMinimizeAfterStartUpChB = new JCheckBox(mLocalizer.msg(
        "minimizeAfterStartup", "Minimize main window after start up"),
        Settings.propMinimizeAfterStartup.getBoolean());
    mSettingsPn.add(mMinimizeAfterStartUpChB, cc.xy(2, ++y));

    y++;

    mStartFullscreen = new JCheckBox(mLocalizer.msg(
        "startFullscreen","Start in fullscreen mode"),
        Settings.propIsUsingFullscreen.getBoolean());
    mSettingsPn.add(mStartFullscreen, cc.xy(2,++y));

    mMinimizeAfterStartUpChB.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if(e.getStateChange() == ItemEvent.SELECTED) {
          mStartFullscreen.setSelected(false);
        }
      }
    });

    mStartFullscreen.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if(e.getStateChange() == ItemEvent.SELECTED) {
          mMinimizeAfterStartUpChB.setSelected(false);
        }
      }
    });

    y++;

    mShowSplashChB = new JCheckBox(mLocalizer.msg("showSplashScreen",
        "Show splash screen during start up"), Settings.propSplashShow
        .getBoolean());
    mSettingsPn.add(mShowSplashChB, cc.xy(2, ++y));

    if (System.getProperty("os.name").toLowerCase().startsWith("windows") && !TVBrowser.isTransportable()) {
      layout.insertRow(++y, RowSpec.decode("1dlu"));
      layout.insertRow(++y, RowSpec.decode("pref"));

      try {
        RegistryKey shellFolders = new RegistryKey(RootKey.HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");
        String path = shellFolders.getValue("Startup").getData().toString();

View Full Code Here

  public String getTitle() {
    return mLocalizer.msg("general", "General");
  }

  private JPanel createRefreshPanel() {
    PanelBuilder refreshSettings = new PanelBuilder(new FormLayout("5dlu, 9dlu, pref, 3dlu, pref, fill:3dlu:grow, 3dlu",
    "pref, 5dlu, pref, 3dlu, pref, pref, 3dlu, pref, 5dlu, pref, 3dlu, pref"));

    CellConstraints cc = new CellConstraints();

    refreshSettings.addSeparator(mLocalizer.msg("titleRefresh", "Startup"), cc.xyw(
        1, 1, 6));

    mAutoDownload = new JCheckBox(mLocalizer.msg("autoUpdate","Update TV listings automatically"));

    mStartDownload = new JRadioButton(mLocalizer.msg("onStartUp", "Only on TV-Browser startup"));
    mRecurrentDownload = new JRadioButton(mLocalizer.msg("recurrent","Recurrent"));

    ButtonGroup bg = new ButtonGroup();

    bg.add(mStartDownload);
    bg.add(mRecurrentDownload);

    refreshSettings.add(mAutoDownload, cc.xyw(2, 3, 5));

    refreshSettings.add(mStartDownload, cc.xyw(3, 5, 4));
    refreshSettings.add(mRecurrentDownload, cc.xyw(3, 6, 4));

    mAutoDownloadCombo = new JComboBox(AUTO_DOWNLOAD_MSG_ARR);
    String dlType = Settings.propAutoDownloadType.getString();
    if (dlType.equals("daily")) {
      mAutoDownloadCombo.setSelectedIndex(0);
    } else if (dlType.equals("every3days")) {
      mAutoDownloadCombo.setSelectedIndex(1);
    } else if (dlType.equals("weekly")) {
      mAutoDownloadCombo.setSelectedIndex(2);
    }

    JPanel panel = new JPanel(new FormLayout("10dlu, pref, 3dlu, pref", "pref, 3dlu, pref, 3dlu, pref, 5dlu, pref"));

    mStartDownload.setSelected(!dlType.equals("never") && !Settings.propAutoDataDownloadEnabled.getBoolean());
    mRecurrentDownload.setSelected(Settings.propAutoDataDownloadEnabled.getBoolean());

    mAutoDownload.setSelected(mStartDownload.isSelected() || mRecurrentDownload.isSelected());
    mStartDownload.setSelected(!mAutoDownload.isSelected() || mStartDownload.isSelected());

    mStartDownload.setEnabled(mAutoDownload.isSelected());
    mRecurrentDownload.setEnabled(mAutoDownload.isSelected());

    mHowOften = new JLabel(mLocalizer.msg("autoDownload.howOften", "How often?"));
    panel.add(mHowOften, cc.xy(2, 1));
    panel.add(mAutoDownloadCombo, cc.xy(4, 1));

    mAskBeforeDownloadRadio = new JRadioButton(mLocalizer.msg("autoDownload.ask", "Ask before downloading"));
    mAutoDownloadPeriodCB = new JComboBox(PeriodItem.getPeriodItems());

    int autoDLPeriod = Settings.propAutoDownloadPeriod.getInt();
    PeriodItem pi = new PeriodItem(autoDLPeriod);
    mAutoDownloadPeriodCB.setSelectedItem(pi);

    panel.add(mAskBeforeDownloadRadio, cc.xyw(2, 3, 3));

    mAskTimeRadio = new JRadioButton(mLocalizer.msg("autoDownload.duration", "Automatically refresh for"));
    panel.add(mAskTimeRadio, cc.xy(2, 5));
    panel.add(mAutoDownloadPeriodCB, cc.xy(4, 5));

    ButtonGroup group = new ButtonGroup();
    group.add(mAskBeforeDownloadRadio);
    group.add(mAskTimeRadio);

    mAskBeforeDownloadRadio.setSelected(Settings.propAskForAutoDownload.getBoolean());
    mAskTimeRadio.setSelected(!Settings.propAskForAutoDownload.getBoolean());

    mAutoDownloadWaitingTime = new JCheckBox(mLocalizer.msg("autoDownload.waiting","Delay auto update for"),Settings.propAutoDownloadWaitingEnabled.getBoolean());
    mAutoDownloadWaitingTimeSp = new JSpinner(new SpinnerNumberModel(
        Settings.propAutoDownloadWaitingTime.getShort(), 1, 60, 1));
    mSecondsLabel = new JLabel(mLocalizer.msg("autoDownload.seconds","seconds"));

    mAutoDownload.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        setAutoDownloadEnabled(e.getStateChange() == ItemEvent.SELECTED);
      }
    });

    mAskBeforeDownloadRadio.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        setAutoDownloadEnabled(mAutoDownload.isSelected());
      }
    });

    mAskTimeRadio.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setAutoDownloadEnabled(mAskTimeRadio.isSelected());
      };
    });

    mAutoDownloadWaitingTime.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        mAutoDownloadWaitingTimeSp.setEnabled(e.getStateChange() == ItemEvent.SELECTED);
      }
    });

    JPanel waitingPanel = new JPanel(new FormLayout("pref,2dlu,pref,2dlu,pref","pref"));

    waitingPanel.add(mAutoDownloadWaitingTime, cc.xy(1, 1));
    waitingPanel.add(mAutoDownloadWaitingTimeSp, cc.xy(3, 1));
    waitingPanel.add(mSecondsLabel, cc.xy(5,1));
View Full Code Here

   */
  private void createDialog() {
    UiUtilities.registerForClosing(this);
    JPanel panel = (JPanel) getContentPane();

    panel.setLayout(new FormLayout("default, 3dlu, fill:default:grow",
        "default, 3dlu, default, 3dlu:grow, default, 3dlu"));

    CellConstraints cc = new CellConstraints();

    panel.setBorder(Borders.DLU4_BORDER);
View Full Code Here

                filterField.setText("");
            }
        });

        // http://www.jgoodies.com/articles/forms.pdf
        FormLayout formLayout = new FormLayout(
                "left:pref, pref, pref:grow, right:pref", // 3 columns
                "pref"); // 1 row

        CellConstraints cc = new CellConstraints();
        filterPanel = getComponentFactory().createPanel(formLayout);
View Full Code Here

    UiUtilities.registerForClosing(this);
    mResult = CANCEL;
    mHandler = handler;

    JPanel panel = (JPanel) getContentPane();
    panel.setLayout(new FormLayout("fill:default:grow", "fill:pref:grow, 3dlu, bottom:pref"));
    panel.setBorder(Borders.DLU4_BORDER);

    switchToStep(step);
  }
View Full Code Here

    mNextBtn = new JButton(Localizer.getLocalization(Localizer.I18N_NEXT) + " >>");
    mNextBtn.setEnabled(false);
    mBackBtn = new JButton("<< " + Localizer.getLocalization(Localizer.I18N_BACK));
    mBackBtn.setEnabled(false);

    JPanel panel = new JPanel(new FormLayout("fill:pref:grow, pref, 3dlu, pref", "pref"));
    CellConstraints cc = new CellConstraints();
   
    if (!mStep.isSingleStep()) {
      FormLayout layout = new FormLayout("pref, 3dlu, pref", "pref");
      layout.setColumnGroups(new int[][] { { 1, 3 } });
      JPanel nextpanel = new JPanel(layout);
      nextpanel.add(mBackBtn, cc.xy(1,1));
      nextpanel.add(mNextBtn, cc.xy(3,1));
      panel.add(nextpanel, cc.xy(2, 1));
    }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.layout.FormLayout$ComponentSizeCache

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.