Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.FormLayout


   
    UiUtilities.registerForClosing(this);
   
    CellConstraints cc = new CellConstraints();
    PanelBuilder pb = new PanelBuilder(
        new FormLayout("default:grow,default,default:grow",
            "default,fill:default:grow,default"),
        (JPanel)getContentPane());
   
    JLabel l = pb.addLabel(mLocalizer.msg("header","Important informations about TV-Browser functionality!"), cc.xy(2,1));
    l.setForeground(new Color(200,0,0));
View Full Code Here


   */
  public ExclusionPanel(Exclusion[] exclusions, final Window parent,
      final Favorite favorite) {
    mWasEditedOrDeleted = mWasAdded = false;
   
    setLayout(new FormLayout("5dlu, fill:pref:grow, 3dlu, pref",
        "pref, 3dlu, pref, 3dlu, pref, 3dlu, fill:pref:grow"));

    CellConstraints cc = new CellConstraints();

    DefaultListModel listModel = new DefaultListModel();
View Full Code Here

        LimitationConfiguration.DAYLIMIT_FRIDAY,
        LimitationConfiguration.DAYLIMIT_SATURDAY,
        LimitationConfiguration.DAYLIMIT_SUNDAY });
    mDayChooser.setRenderer(new DayListCellRenderer());
    CellConstraints cc = new CellConstraints();
    FormLayout layout = new FormLayout("5dlu, pref, default:grow",
    "pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu, pref");
    PanelBuilder panelBuilder = new PanelBuilder(layout);

    mChannelCB = new JComboBox(ChannelList.getSubscribedChannels());

    int rowInx = 3;
    panelBuilder.add(new JLabel(mMainQuestion), cc.xyw(1, 1, 3));

    panelBuilder.add(mTitleCb, cc.xy(2, rowInx));
    panelBuilder.add(mTitleTf, cc.xy(3, rowInx));
    rowInx += 2;

    panelBuilder.add(mTopicCb = new JCheckBox(mTopicQuestion), cc.xy(2, rowInx));
    panelBuilder.add(mTopicTf = new JTextField(), cc.xy(3, rowInx));

    rowInx += 2;

    int filterIndex = rowInx;

    panelBuilder.add(mChannelCb = new JCheckBox(mChannelQuestion), cc.xy(2, rowInx));
    panelBuilder.add(mChannelCB, cc.xy(3, rowInx));
    rowInx += 2;

    panelBuilder.add(mDayCb = new JCheckBox(mDayQuestion), cc.xy(2, rowInx));
    panelBuilder.add(mDayChooser, cc.xy(3, rowInx));

    rowInx += 2;
    panelBuilder.add(mTimeCb = new JCheckBox(mTimeQuestion), cc.xy(2, rowInx));
    panelBuilder.add(mTimePeriodChooser = new TimePeriodChooser(TimePeriodChooser.ALIGN_LEFT), cc.xy(3, rowInx));

    if(mMode == MODE_EDIT_EXCLUSION || mMode == MODE_CREATE_EXCLUSION) {
      layout.insertRow(filterIndex, RowSpec.decode("pref"));
      layout.insertRow(filterIndex+1, RowSpec.decode("5dlu"));

      panelBuilder.add(mFilterCb, cc.xy(2, filterIndex));
      panelBuilder.add(mFilterChooser, cc.xy(3, filterIndex));
    }
View Full Code Here

    builder.addFixed(mCloseBtn);
   

    final CellConstraints cc = new CellConstraints();

    FormLayout layout = new FormLayout("default,5dlu,0dlu:grow","default");

    JPanel northPn = new JPanel(layout);
    northPn.add(new JLabel(onlyUpdate ?mLocalizer.msg("updateHeader","Updates for installed plugins were found.") :
      mLocalizer.msg("header","Here you can download new plugins and updates for it.")), cc.xyw(1,1,3));

    JPanel southPn = new JPanel(new BorderLayout());

    southPn.add(builder.getPanel(), BorderLayout.SOUTH);

    ArrayList<SoftwareUpdateItem> selectedItems = new ArrayList<SoftwareUpdateItem>();
    for (SoftwareUpdateItem item : itemArr) {
      if (item.isAlreadyInstalled() && item.getInstalledVersion().compareTo(item.getVersion()) < 0) {
        selectedItems.add(item);
      }
    }

    mDownloadBtn.setEnabled(!selectedItems.isEmpty());

    mSoftwareUpdateItemList = new SelectableItemList(selectedItems.toArray(new SoftwareUpdateItem[selectedItems.size()]),itemArr);
    mSoftwareUpdateItemList.addListSelectionListener(this);
    mSoftwareUpdateItemList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    mSoftwareUpdateItemList.setListUI(new MyListUI());
    mSoftwareUpdateItemList.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

    mSoftwareUpdateItemList.addCenterRendererComponent(PluginsSoftwareUpdateItem.class,new SelectableItemRendererCenterComponentIf() {
      private final ImageIcon NEW_VERSION_ICON = IconLoader.getInstance().getIconFromTheme("status", "software-update-available", 16);

      public JPanel createCenterPanel(JList list, Object value, int index, boolean isSelected, boolean isEnabled, JScrollPane parentScrollPane, int leftColumnWidth) {
        FormLayout lay = new FormLayout("5dlu,default,5dlu,default:grow","2dlu,default,2dlu,fill:pref:grow,2dlu");
        EnhancedPanelBuilder pb = new EnhancedPanelBuilder(lay);
        pb.getPanel().setOpaque(false);

        SoftwareUpdateItem item = (SoftwareUpdateItem)value;

        JLabel label = pb.addLabel(HTMLTextHelper.convertHtmlToText(item.getName()) + " " + item.getVersion(), cc.xy(2,2));
        label.setFont(label.getFont().deriveFont(Font.BOLD, label.getFont().getSize2D()+2));

        int width = parentScrollPane.getSize().width - parentScrollPane.getVerticalScrollBar().getWidth() - leftColumnWidth - Sizes.dialogUnitXAsPixel(5,pb.getPanel()) * 4 - parentScrollPane.getInsets().left - parentScrollPane.getInsets().right;

        if (width <= 0) {
          width = Settings.propColumnWidth.getInt();
        }

        TextAreaIcon icon = new TextAreaIcon(HTMLTextHelper.convertHtmlToText(item.getDescription()), new JLabel().getFont(), width, 2);

        JLabel iconLabel = new JLabel("");
        iconLabel.setIcon(icon);

        pb.add(iconLabel, cc.xyw(2,4,3));

        JLabel label3 = new JLabel();

        if (item.isAlreadyInstalled()) {
          Version installedVersion = item.getInstalledVersion();
          if ((installedVersion != null) && (installedVersion.compareTo(item.getVersion()) < 0)) {
            label.setIcon(NEW_VERSION_ICON);

            label3.setText("(" + mLocalizer.msg("installed","Installed version: ") + installedVersion.toString()+")");
            label3.setFont(label3.getFont().deriveFont(label3.getFont().getSize2D()+2));

            pb.add(label3, cc.xy(4,2));
          }
        }

        if (isSelected && isEnabled) {
          label.setForeground(list.getSelectionForeground());

          String author = item.getProperty("author");
          String website = item.getWebsite();

          FormLayout authorAndWebsiteLayout = new FormLayout("default,5dlu,default","default");
          JPanel authorAndWebsite = new JPanel(authorAndWebsiteLayout);
          authorAndWebsite.setOpaque(false);

          if (author != null) {
            lay.appendRow(RowSpec.decode("2dlu"));
            lay.appendRow(RowSpec.decode("default"));
            lay.appendRow(RowSpec.decode("2dlu"));

            pb.add(authorAndWebsite, cc.xyw(2,7,3));

            JLabel authorLabel = new JLabel(mLocalizer.msg("author", "Author"));
            authorLabel.setFont(authorLabel.getFont().deriveFont(Font.BOLD));
            authorLabel.setForeground(list.getSelectionForeground());
            authorLabel.setHorizontalAlignment(SwingConstants.RIGHT);

            JLabel authorName = new JLabel(HTMLTextHelper.convertHtmlToText(author));
            authorName.setForeground(list.getSelectionForeground());

            authorAndWebsite.add(authorLabel, cc.xy(1,1));
            authorAndWebsite.add(authorName, cc.xy(3,1));
          }

          if (website != null) {
            if(author == null) {
              lay.appendRow(RowSpec.decode("2dlu"));
              lay.appendRow(RowSpec.decode("default"));
              lay.appendRow(RowSpec.decode("2dlu"));

              pb.add(authorAndWebsite, cc.xyw(2,7,3));
            }
            else {
              authorAndWebsiteLayout.appendRow(RowSpec.decode("1dlu"));
              authorAndWebsiteLayout.appendRow(RowSpec.decode("default"));
            }

            JLabel webLabel = new JLabel(mLocalizer.msg("website", "Website"));
            webLabel.setFont(webLabel.getFont().deriveFont(Font.BOLD));
            webLabel.setForeground(list.getSelectionForeground());
View Full Code Here

    final JPanel jcontentPane = new JPanel(new BorderLayout(0, 10));
    jcontentPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    mDialog.setContentPane(jcontentPane);

    mLayout = new FormLayout("pref:grow,3dlu,pref","pref,3dlu");
    final PanelBuilder programsPanel = new PanelBuilder(mLayout);
    CellConstraints cc = new CellConstraints();

    final Date today = Date.getCurrentDate();
    programsPanel.add(mHeader = new JLabel(""), cc.xyw(1, 1, 3));
View Full Code Here

        mHighlightButton.setEnabled(mHighlight.isSelected());
      }
    });

    CellConstraints cc = new CellConstraints();
    EnhancedPanelBuilder formatPanel = new EnhancedPanelBuilder(new FormLayout("5dlu,10dlu,pref,pref,5dlu,default:grow,pref,5dlu"));
    formatPanel.setDefaultDialogBorder();
    formatPanel.addParagraph(ProgramInfo.mLocalizer.msg("font","Font settings"));
    formatPanel.addRow();
    formatPanel.add(mAntiAliasing, cc.xyw(2,formatPanel.getRowCount(), formatPanel.getColumnCount() - 2));
    formatPanel.addRow();
    formatPanel.add(mUserFont, cc.xyw(2,formatPanel.getRowCount(),formatPanel.getColumnCount() - 2));
    formatPanel.addRow();
    final JLabel titleLabel = new JLabel(ProgramInfo.mLocalizer.msg("title", "Title font"));
    formatPanel.add(titleLabel, cc.xy(3, formatPanel.getRowCount()));
    formatPanel.add(mTitleFont, cc.xyw(6,formatPanel.getRowCount(),2));
    formatPanel.addRow();
    final JLabel bodyLabel = new JLabel(ProgramInfo.mLocalizer.msg("body", "Description font"));
    formatPanel.add(bodyLabel, cc.xy(3,formatPanel.getRowCount()));
    formatPanel.add(mBodyFont, cc.xyw(6,formatPanel.getRowCount(),2));

    mUserFont.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        mTitleFont.setEnabled(mUserFont.isSelected());
        mBodyFont.setEnabled(mUserFont.isSelected());
        titleLabel.setEnabled(mUserFont.isSelected());
        bodyLabel.setEnabled(mUserFont.isSelected());
      }
    });

    mTitleFont.setEnabled(mUserFont.isSelected());
    mBodyFont.setEnabled(mUserFont.isSelected());
    titleLabel.setEnabled(mUserFont.isSelected());
    bodyLabel.setEnabled(mUserFont.isSelected());

    formatPanel.addParagraph(ProgramInfo.mLocalizer.msg("design","Design"));
    formatPanel.addRow();
    formatPanel.add(mLook, cc.xyw(2,formatPanel.getRowCount(),2));

    formatPanel.addParagraph(ProgramInfoDialog.mLocalizer.msg("functions","Functions"));
    formatPanel.addRow();
    formatPanel.add(mShowFunctions, cc.xyw(2,formatPanel.getRowCount(),formatPanel.getColumnCount() - 2));
    formatPanel.addRow();
    formatPanel.add(mShowTextSearchButton, cc.xyw(3,formatPanel.getRowCount(),formatPanel.getColumnCount() - 3));

    formatPanel.addParagraph(ProgramInfo.mLocalizer.msg("favorites","Favorites"));
    formatPanel.addRow();
    formatPanel.add(mHighlight, cc.xyw(2,formatPanel.getRowCount(),5));
    JPanel panel = new JPanel(new FlowLayout());
    mHighlightColorLb = new ColorLabel(settings.getHighlightColor());
    panel.add(mHighlightColorLb);
    mHighlightColorLb.setStandardColor(settings.getHighlightColor());
    mHighlightButton = new ColorButton(mHighlightColorLb);
    panel.add(mHighlightButton);
    mHighlight.getActionListeners()[0].actionPerformed(null);
    formatPanel.add(panel, cc.xy(7,formatPanel.getRowCount()));

    mOldOrder = settings.getFieldOrder();
    mOldSetupState = ProgramInfo.getInstance().getSettings().getSetupwasdone();

    mList = new OrderChooser(mOldOrder, ProgramTextCreator.getDefaultOrder(),
        true);

    JButton previewBtn = new JButton(ProgramInfo.mLocalizer.msg("preview", "Preview"));
    previewBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        saveSettings();
        ProgramInfo.getInstance().showProgramInformation(
            Plugin.getPluginManager().getExampleProgram(), false);
        restoreSettings();
      }
    });

    JButton defaultBtn = new JButton(ProgramInfo.mLocalizer.msg("default", "Default"));
    defaultBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        resetSettings();
      }
    });

    EnhancedPanelBuilder orderPanel = new EnhancedPanelBuilder("default:grow");
    orderPanel.setDefaultDialogBorder();

    orderPanel.addRow("fill:default:grow");
    orderPanel.add(mList, cc.xy(1, orderPanel.getRowCount()));


    EnhancedPanelBuilder picturePanel = new EnhancedPanelBuilder("default:grow");
    picturePanel.setDefaultDialogBorder();

    picturePanel.addRow("default");
    picturePanel.add(mPictureSettings = new PluginsPictureSettingsPanel(ProgramInfo.getInstance().getPictureSettings(),false), cc.xy(1, picturePanel.getRowCount()));

    PanelBuilder pb = new PanelBuilder(new FormLayout("default,2dlu,default,5dlu,default","default"));

    pb.add(mZoomEnabled = new JCheckBox(ProgramInfo.mLocalizer.msg(
        "scaleImage", "Scale picture:"), ProgramInfo.getInstance()
        .getSettings().getZoomEnabled()), cc.xy(1, 1));
    pb.add(mZoomValue = new JSpinner(new SpinnerNumberModel(ProgramInfo
        .getInstance().getSettings().getZoomValue(), 50, 300, 1)), cc.xy(3, 1));
    final JLabel label = pb.addLabel("%",cc.xy(5,1));

    mZoomEnabled.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        mZoomValue.setEnabled(mZoomEnabled.isSelected());
        label.setEnabled(mZoomEnabled.isSelected());
      }
    });

    mZoomValue.setEnabled(mZoomEnabled.isSelected());
    label.setEnabled(mZoomEnabled.isSelected());

    picturePanel.addRow("5dlu");
    picturePanel.addRow("default");
    picturePanel.add(pb.getPanel(), cc.xy(1, picturePanel.getRowCount()));



    PluginAccess webPlugin = PluginManagerImpl.getInstance().getActivatedPluginForId("java.webplugin.WebPlugin");

    mAvailableTargetGroup = new ButtonGroup();

    final ArrayList<InternalRadioButton<?>> availableDefaultTargets = new ArrayList<InternalRadioButton<?>>();

    availableDefaultTargets.add(new InternalRadioButton<String>(ProgramInfoDialog.mLocalizer.msg("searchTvBrowser","Search in TV-Browser")));
    mAvailableTargetGroup.add(availableDefaultTargets.get(0));
    availableDefaultTargets.add(new InternalRadioButton<String>(ProgramInfoDialog.mLocalizer.msg("searchWikipedia","Search in Wikipedia")));
    mAvailableTargetGroup.add(availableDefaultTargets.get(1));

    final String currentValue = settings.getActorSearch();

    int selectedIndex = -1;

    if(webPlugin != null && webPlugin.canReceiveProgramsWithTarget()) {
      ProgramReceiveTarget[] targets = webPlugin.getProgramReceiveTargets();

      if(targets != null) {
        for(ProgramReceiveTarget target : targets) {
          availableDefaultTargets.add(new InternalRadioButton<ProgramReceiveTarget>(target));
          mAvailableTargetGroup.add(availableDefaultTargets.get(availableDefaultTargets.size()-1));

          if(currentValue.equals(target.getReceiveIfId() + "#_#_#" + target.getTargetId())) {
            selectedIndex = availableDefaultTargets.size()-1;
          }
        }
      }
    }

    if(selectedIndex == -1) {
      if(currentValue.equals("internalSearch")) {
        selectedIndex = 0;
      }
      else {
        selectedIndex = 1;
      }
    }

    availableDefaultTargets.get(selectedIndex).setSelected(true);

    ScrollableJPanel buttonPanel = new ScrollableJPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS));
    buttonPanel.setOpaque(false);

    for(InternalRadioButton<?> button : availableDefaultTargets) {
      buttonPanel.add(button);
    }

    final JScrollPane scrollPane = new JScrollPane(buttonPanel);
    scrollPane.setBackground(UIManager.getDefaults().getColor("List.background"));
    scrollPane.getViewport().setBackground(UIManager.getDefaults().getColor("List.background"));
    PanelBuilder actorPanel = new PanelBuilder(
        new FormLayout(
        "default:grow", "pref,3dlu,default,1dlu,fill:default:grow"));
    actorPanel.setDefaultDialogBorder();

    mPersonSearchCB = new JCheckBox(ProgramInfo.mLocalizer.msg("enableSearch",
        "Show person names as links to person search"));
    actorPanel.add(mPersonSearchCB, cc.xy(1, 1));
    final JLabel searchLabel = new JLabel(ProgramInfo.mLocalizer.msg(
        "defaultActorSearchMethod", "Default search method:"));
    actorPanel.add(searchLabel, cc.xy(1, 3));
    actorPanel.add(scrollPane, cc.xy(1, 5));

    mPersonSearchCB.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        scrollPane.setEnabled(mPersonSearchCB.isSelected());
        searchLabel.setEnabled(mPersonSearchCB.isSelected());
        for (InternalRadioButton<?> button : availableDefaultTargets) {
          button.setEnabled(mPersonSearchCB.isSelected());
        }
      }
    });
    mPersonSearchCB.setSelected(settings.getEnableSearch());
    mPersonSearchCB.getActionListeners()[0].actionPerformed(null);

    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(ProgramInfo.mLocalizer.msg("look","Look"), formatPanel.getPanel());
    tabbedPane.add(ProgramInfo.mLocalizer.msg("fields","Fields"), orderPanel.getPanel());
    tabbedPane.add(Localizer.getLocalization(Localizer.I18N_PICTURES), picturePanel.getPanel());
    tabbedPane.add(ProgramInfo.mLocalizer.msg("actorSearch","Actor search"), actorPanel.getPanel());
    tabbedPane.setSelectedIndex(0);

    FormLayout layout = new FormLayout("default,default:grow,default","pref");
    layout.setColumnGroups(new int[][] {{1,3}});
    JPanel buttonPn = new JPanel(layout);
    buttonPn.add(previewBtn, cc.xy(3,1));
    buttonPn.add(defaultBtn, cc.xy(1,1));

    JPanel base = new JPanel(new FormLayout("default:grow","fill:default:grow,10dlu,default"));
    base.setBorder(Borders.DIALOG_BORDER);
    base.add(tabbedPane, cc.xy(1,1));
    base.add(buttonPn, cc.xy(1,3));

    return base;
View Full Code Here

    return mLocalizer.msg("title","Notification");
  }

  public JPanel createContent(WizardHandler handler) {
    CellConstraints cc = new CellConstraints();
    PanelBuilder panelBuilder = new PanelBuilder(new FormLayout("pref",
                    "pref, 5dlu, pref, 5dlu, pref, 5dlu, pref"));

    panelBuilder.setBorder(Borders.DLU4_BORDER);
    panelBuilder.add(new JLabel(mLocalizer.msg("mainQuestion","Wollen Sie automatisch auf diese Sendung hingewiesen werden?")), cc.xy(1,1));
    panelBuilder.add(mReminderCb = new JCheckBox(mLocalizer.msg("option.remind","Automatisch an diese Sendung erinnern.")), cc.xy(1,3));
View Full Code Here

        }
      });

      CellConstraints cc = new CellConstraints();

      FormLayout layout = new FormLayout(
              "5dlu, 12dlu, 15dlu, pref, 5dlu, pref, 5dlu, pref:grow, 5dlu",
              "pref,5dlu,pref,pref,pref,2dlu,pref,pref,2dlu,pref" +
                      ",2dlu,pref,pref,5dlu,pref,pref,10dlu,pref,5dlu,pref,10dlu,pref,5dlu");

      PanelBuilder pb = new PanelBuilder(layout, new ScrollableJPanel());

      pb.setDefaultDialogBorder();

      int y = 1;

      pb.addSeparator(mLocalizer.msg("basics", "Picture settings for the program table"), cc.xyw(1, y, 9));

      pb.add(mShowPicturesNever, cc.xyw(2, y+=2, 8));
      pb.add(mShowPicturesEver, cc.xyw(2, y+=1, 8));
      pb.add(mShowPicturesForSelection, cc.xyw(2, y+=1, 8));

      pb.add(mShowPicturesInTimeRange, cc.xyw(3, y+=2, 7));
      mStartLabel = pb.addLabel(mLocalizer.msg("startTime", "From:"), cc.xy(4, y+=1));
      pb.add(mPictureStartTime, cc.xy(6, y));
      mEndLabel = pb.addLabel(mLocalizer.msg("endTime", "To:"), cc.xy(4, y+=2));
      pb.add(mPictureEndTime, cc.xy(6, y));

      pb.add(mShowPicturesForDuration, cc.xyw(3, y+=2, 7));
      pb.add(mDuration, cc.xy(6, y+=1));
      final JLabel minutesLabel = pb.addLabel(mLocalizer.msg("minutes", "Minutes"), cc.xy(8, y));
      y++;
      if (Settings.propPicturePluginIds.getStringArray() != null) {
        JPanel mSubPanel = new JPanel(new FormLayout("15dlu,pref:grow,5dlu,pref", "pref,2dlu,pref"));

        mShowPicturesForPlugins = new JCheckBox(mLocalizer.msg("showPicturesForPlugins", "Show for programs that are marked by plugins:"), ProgramPanelSettings.typeContainsType(Settings.propPictureType.getInt(), ProgramPanelSettings.SHOW_PICTURES_FOR_PLUGINS));
        mPluginLabel = new JLabel();
        mPluginLabel.setEnabled(ProgramPanelSettings.typeContainsType(Settings.propPictureType.getInt(), ProgramPanelSettings.SHOW_PICTURES_FOR_PLUGINS));

        choose = new JButton(mLocalizer.msg("selectPlugins", "Choose Plugins"));
        choose.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            Window parent = UiUtilities.getLastModalChildOf(MainFrame
                .getInstance());
            MarkerChooserDlg chooser = new MarkerChooserDlg(parent,
                mClientPlugins, null);

            chooser.setLocationRelativeTo(parent);
            chooser.setVisible(true);

            mClientPlugins = chooser.getMarker();

            handlePluginSelection();
          }
        });
        choose.setEnabled(ProgramPanelSettings.typeContainsType(Settings.propPictureType.getInt(), ProgramPanelSettings.SHOW_PICTURES_FOR_PLUGINS));

        mShowPicturesForPlugins.addItemListener(new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            mPluginLabel.setEnabled(e.getStateChange() == ItemEvent.SELECTED);
            choose.setEnabled(e.getStateChange() == ItemEvent.SELECTED);
          }
        });

        String[] clientPluginIdArr = Settings.propPicturePluginIds.getStringArray();

        ArrayList<Marker> clientPlugins = new ArrayList<Marker>();

        for (String arr : clientPluginIdArr) {
          PluginAccess plugin = Plugin.getPluginManager().getActivatedPluginForId(arr);
          if (plugin != null) {
            clientPlugins.add(plugin);
          } else if (ReminderPluginProxy.getInstance().getId().compareTo(arr) == 0) {
            clientPlugins.add(ReminderPluginProxy.getInstance());
          } else if (FavoritesPluginProxy.getInstance().getId().compareTo(arr) == 0) {
            clientPlugins.add(FavoritesPluginProxy.getInstance());
          }
        }

        mClientPlugins = clientPlugins.toArray(new Marker[clientPlugins.size()]);

        handlePluginSelection();

        mSubPanel.add(mShowPicturesForPlugins, cc.xyw(1, 1, 4));
        mSubPanel.add(mPluginLabel, cc.xy(2, 3));
        mSubPanel.add(choose, cc.xy(4, 3));

        layout.insertRow(y, RowSpec.decode("2dlu"));
        layout.insertRow(y+=1, RowSpec.decode("pref"));
        pb.add(mSubPanel, cc.xyw(3, y, 6));
        layout.insertRow(y+=1, RowSpec.decode("2dlu"));
        y++;
      }

      pb.add(mShowDescription, cc.xyw(2, y+=1, 8));
View Full Code Here

      upBnd = 24 * 60 - 1;
    }
    mTimePeriodChooser = new TimePeriodChooser(lowBnd, upBnd, TimePeriodChooser.ALIGN_RIGHT);

    CellConstraints cc = new CellConstraints();
    PanelBuilder panelBuilder = new PanelBuilder(new FormLayout("pref, default:grow, pref", "pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu, pref"));

    panelBuilder.setBorder(Borders.DLU4_BORDER);
    panelBuilder.add(new JLabel(mLocalizer.msg("mainQuestion", "Are there any limitations?")), cc.xy(1, 1));
    panelBuilder.add(mChannelCb = new JCheckBox(mLocalizer.msg("limitByChannel",
        "Certain channels only:")), cc.xy(1, 3));
View Full Code Here

  public FinishWizardStep(WizardStep caller) {
    mCaller = caller;
  }

  public JPanel createContent(WizardHandler handler) {
    JPanel pn = new JPanel(new FormLayout("fill:default:grow", "fill:pref:grow"));
    CellConstraints cc = new CellConstraints();
    pn.add(new JLabel(mLocalizer.msg("msg", "Die Lieblingssendung ist nun eingerichtet!"), SwingConstants.CENTER), cc.xy(1,1));
    handler.allowCancel(false);
    final WizardDlg dialog=handler.getDialog();
    pn.addFocusListener(new FocusAdapter() {
View Full Code Here

TOP

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

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.