Examples of PanelBuilder


Examples of com.jgoodies.forms.builder.PanelBuilder

  private static boolean mIsEnabled = Settings.propTrayIsEnabled.getBoolean();
  private JRadioButton mFilterAll,mNoMarkedFiltering,mNoFiltering;

  public JPanel createSettingsPanel() {

    final PanelBuilder builder = new PanelBuilder(new FormLayout(
        "5dlu, pref:grow, 5dlu",
        "pref, 5dlu, pref, pref, pref, pref, pref, 10dlu, pref, 5dlu, pref, pref, pref"));
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();

    String msg = mLocalizer.msg("trayIsEnabled", "Tray activated");
    mOldState = Settings.propTrayIsEnabled.getBoolean();
    mTrayIsEnabled = new JCheckBox(msg, mOldState);

    msg = mLocalizer.msg("minimizeToTray", "Minimize to Tray");
    boolean checked = Settings.propTrayMinimizeTo.getBoolean();
    mMinimizeToTrayChb = new JCheckBox(msg, checked && mOldState);
    mMinimizeToTrayChb.setEnabled(mTrayIsEnabled.isSelected());

    msg = mLocalizer.msg("nowOnDeIconify", "Jump to now when restoring application");
    checked = Settings.propNowOnRestore.getBoolean();
    mNowOnRestore = new JCheckBox(msg, checked);

    msg = mLocalizer.msg("trayAntialiasing", "Antialiasing enabled");
    checked = Settings.propTrayIsAntialiasing.getBoolean();
    mTrayIsAnialiasing = new JCheckBox(msg, checked);
   
    if(System.getProperty("os.name").toLowerCase().startsWith("linux") && (JavaVersion.getVersion() < JavaVersion.VERSION_1_6 || OperatingSystem.isKDE())) {
      mMinimizeToTrayChb.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if(mMinimizeToTrayChb.isSelected()) {
            JOptionPane.showMessageDialog(builder.getPanel(),mLocalizer.msg("minimizeToTrayWarning","This function might not work as expected on Unix systems like KDE or Gnome.\nSo it's recommended not to select this checkbox."),mLocalizer.msg("warning","Warning"), JOptionPane.WARNING_MESSAGE);
          }
        }
    });
    }
   
    //filter settings
    ButtonGroup filter = new ButtonGroup();
   
    msg = mLocalizer.msg("trayFilterAll", "Filter all programs");
    mFilterAll = new JRadioButton(msg);

    msg = mLocalizer.msg("trayFilterNotMarked", "Filter programs, if not marked");
    checked = Settings.propTrayFilterNotMarked.getBoolean();
    mNoMarkedFiltering = new JRadioButton(msg, checked);

    msg = mLocalizer.msg("trayFilterNot", "Don't filter programs");
    checked = Settings.propTrayFilterNot.getBoolean();
    mNoFiltering = new JRadioButton(msg, checked);
   
    if(!mNoFiltering.isSelected() && !mNoMarkedFiltering.isSelected()) {
      mFilterAll.setSelected(true);
    }
   
    filter.add(mFilterAll);
    filter.add(mNoMarkedFiltering);
    filter.add(mNoFiltering);

    //create panel
    builder.addSeparator(mLocalizer.msg("basics", "Basic settings"), cc.xyw(1,1,3));
    builder.add(mTrayIsEnabled, cc.xy(2,3));
    builder.add(mTrayIsAnialiasing, cc.xy(2,4));
    builder.add(mMinimizeToTrayChb, cc.xy(2,5));
    builder.add(mNowOnRestore, cc.xy(2,6));
   
    builder.addSeparator(mLocalizer.msg("filter", "Filter settings"), cc.xyw(1,9,3));
    builder.add(mFilterAll, cc.xy(2,11));
    builder.add(mNoMarkedFiltering, cc.xy(2,12));
    builder.add(mNoFiltering, cc.xy(2,13));

    mTrayIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mIsEnabled = mTrayIsEnabled.isSelected();
        TrayImportantSettingsTab.setTrayIsEnabled(mIsEnabled);
        TrayNowSettingsTab.setTrayIsEnabled(mIsEnabled);
        TrayOnTimeSettingsTab.setTrayIsEnabled(mIsEnabled);
        TraySoonSettingsTab.setTrayIsEnabled(mIsEnabled);
        TrayProgramsChannelsSettingsTab.setTrayIsEnabled(mIsEnabled);
        mMinimizeToTrayChb.setEnabled(mTrayIsEnabled.isSelected());
        mNowOnRestore.setEnabled(mTrayIsEnabled.isSelected());
        mTrayIsAnialiasing.setEnabled(mTrayIsEnabled.isSelected());
        mFilterAll.setEnabled(mTrayIsEnabled.isSelected());
        mNoMarkedFiltering.setEnabled(mTrayIsEnabled.isSelected());
        mNoFiltering.setEnabled(mTrayIsEnabled.isSelected());
      }
    });

    return builder.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

 
  public JPanel createSettingsPanel() {
    mInstance = this;
   
    CellConstraints cc = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(new FormLayout("5dlu,pref:grow,5dlu",
        "pref,5dlu,pref,10dlu,pref,5dlu,pref,pref,pref," +
        "10dlu,pref,5dlu,pref,pref,fill:default:grow,pref"));
    builder.setDefaultDialogBorder();
   
    mIsEnabled = new JCheckBox(mLocalizer.msg("soonEnabled","Show Soon running programs"),Settings.propTraySoonProgramsEnabled.getBoolean());
   
    mShowIconAndName = new JRadioButton(mLocalizer.msg("showIconName","Show channel icon and channel name"),Settings.propTraySoonProgramsContainsName.getBoolean() && Settings.propTraySoonProgramsContainsIcon.getBoolean());
    mShowName = new JRadioButton(mLocalizer.msg("showName","Show channel name"),Settings.propTraySoonProgramsContainsName.getBoolean() && !Settings.propTraySoonProgramsContainsIcon.getBoolean());
    mShowIcon = new JRadioButton(mLocalizer.msg("showIcon","Show channel icon"),!Settings.propTraySoonProgramsContainsName.getBoolean() && Settings.propTraySoonProgramsContainsIcon.getBoolean());
   
    ButtonGroup bg = new ButtonGroup();
    bg.add(mShowIconAndName);
    bg.add(mShowIcon);
    bg.add(mShowName);
   
    mShowTime = new JCheckBox(mLocalizer.msg("showTime","Show start time"),Settings.propTraySoonProgramsContainsTime.getBoolean());
    mShowToolTip = new JCheckBox(mLocalizer.msg("showToolTip","Show additional information of the program in a tool tip"),Settings.propTraySoonProgramsContainsToolTip.getBoolean());
    mShowToolTip.setToolTipText(mLocalizer.msg("toolTipTip","Tool tips are small helper to something, like this one."));
   
    mHelpLabel = UiUtilities.createHtmlHelpTextArea(mLocalizer.msg("help","The Tray is deactivated. To activate these settings activate the option <b>Tray activated</b> in the <a href=\"#link\">Tray Base settings</a>."), new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          SettingsDialog.getInstance().showSettingsTab(SettingsItem.TRAY);
        }
      }
    });
       
    JPanel c = (JPanel) builder.addSeparator(mLocalizer.msg("soon","Soon running programs"), cc.xyw(1,1,3));
    builder.add(mIsEnabled, cc.xy(2,3));
   
    JPanel c1 = (JPanel) builder.addSeparator(mLocalizer.msg("iconNameSeparator","Channel icons/channel name"), cc.xyw(1,5,3));
   
    builder.add(mShowIconAndName, cc.xy(2,7));
    builder.add(mShowIcon, cc.xy(2,8));
    builder.add(mShowName, cc.xy(2,9));
   
    JPanel c2 = (JPanel) builder.addSeparator(mLocalizer.msg("settings","Settings"), cc.xyw(1,11,3));
   
    builder.add(mShowTime, cc.xy(2,13));
    builder.add(mShowToolTip, cc.xy(2,14));
    builder.add(mHelpLabel, cc.xyw(1,16,3));
   
    mSeparator1 = (JLabel)c.getComponent(0);
    mIconSeparator = (JLabel)c1.getComponent(0);
    mSeparator2 = (JLabel)c2.getComponent(0);
   
    setEnabled(true);
   
    mIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setEnabled(false);
      }
    });
   
    return builder.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

  private static TrayImportantSettingsTab mInstance;
 
  public JPanel createSettingsPanel() {
    mInstance = this;
    CellConstraints cc = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(new FormLayout("5dlu,12dlu,pref,5dlu,pref,5dlu,pref:grow,5dlu",
        "pref,5dlu,pref,pref,pref,pref,pref,10dlu,pref,5dlu,pref," +
        "pref,pref,10dlu,pref,5dlu,pref,pref,pref,fill:pref:grow,pref"));
    builder.setDefaultDialogBorder();
   
    mIsEnabled = new JCheckBox(mLocalizer.msg("importantEnabled","Show important programs"),Settings.propTrayImportantProgramsEnabled.getBoolean());
    mIsEnabled.setToolTipText(mLocalizer.msg("importantToolTip","Important programs are all marked programs."));
   
    ButtonGroup bg = new ButtonGroup();
   
    mShowInSubMenu = new JRadioButton(mLocalizer.msg("inSubMenu","in a sub menu"),Settings.propTrayImportantProgramsInSubMenu.getBoolean());
    mShowInTray = new JRadioButton(mLocalizer.msg("inTray","in the tray menu"), !mShowInSubMenu.isSelected());
   
    bg.add(mShowInSubMenu);
    bg.add(mShowInTray);
   
    int maxSizeValue = Settings.propTrayImportantProgramsInSubMenu.getBoolean() ? 30 : 15;
   
    mSize = new JSpinner(new SpinnerNumberModel(Settings.propTrayImportantProgramsSize.getInt(), 1, maxSizeValue, 1));
   
    mShowIconAndName = new JRadioButton(mLocalizer.msg("showIconName","Show channel icon and channel name"),Settings.propTrayImportantProgramsContainsName.getBoolean() && Settings.propTrayImportantProgramsContainsIcon.getBoolean());
    mShowName = new JRadioButton(mLocalizer.msg("showName","Show channel name"),Settings.propTrayImportantProgramsContainsName.getBoolean() && !Settings.propTrayImportantProgramsContainsIcon.getBoolean());
    mShowIcon = new JRadioButton(mLocalizer.msg("showIcon","Show channel icon"),!Settings.propTrayImportantProgramsContainsName.getBoolean() && Settings.propTrayImportantProgramsContainsIcon.getBoolean());
   
    ButtonGroup bg1 = new ButtonGroup();
    bg1.add(mShowIconAndName);
    bg1.add(mShowIcon);
    bg1.add(mShowName);
   
    mShowDate = new JCheckBox(mLocalizer.msg("showDate","Show date"),Settings.propTrayImportantProgramsContainsDate.getBoolean());
    mShowTime = new JCheckBox(mLocalizer.msg("showTime","Show start time"),Settings.propTrayImportantProgramsContainsTime.getBoolean());
    mShowToolTip = new JCheckBox(mLocalizer.msg("showToolTip","Show additional information of the program in a tool tip"),Settings.propTrayImportantProgramsContainsToolTip.getBoolean());
    mShowToolTip.setToolTipText(mLocalizer.msg("toolTipTip","Tool tips are small helper to something, like this one."));
       
    mHelpLabel = UiUtilities.createHtmlHelpTextArea(mLocalizer.msg("help","The Tray is deactivated. To activate these settings activate the option <b>Tray activated</b> in the <a href=\"#link\">Tray Base settings</a>."), new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          SettingsDialog.getInstance().showSettingsTab(SettingsItem.TRAY);
        }
      }
    });
   
    JPanel priority = new JPanel(new FormLayout("pref,5dlu,pref","1dlu,pref"));
   
    Localizer localizer = MarkingsSettingsTab.mLocalizer;
   
    String[] colors = {localizer.msg("color.minPriority","1. Color (minimum priority)"),localizer.msg("color.lowerMediumPriority","2. Color (lower medium priority)"),localizer.msg("color.mediumPriority","3. Color (Medium priority)"),localizer.msg("color.higherMediumPriority","4. Color (higher medium priority)"),localizer.msg("color.maxPriority","5. Color (maximum priority)")};
   
    mPriorityText = new JLabel(mLocalizer.msg("importantMarkPriority","Mark priority higher or the same like:"));
   
    mPriority = new JComboBox(colors);
    mPriority.setSelectedIndex(Settings.propTrayImportantProgramsPriority.getInt());
    mPriority.setRenderer(new MarkPriorityComboBoxRenderer());

    priority.add(mPriorityText, cc.xy(1,2));
    priority.add(mPriority, cc.xy(3,2));
   
    JPanel c = (JPanel) builder.addSeparator(mLocalizer.msg("important","Important programs"), cc.xyw(1,1,8));
    builder.add(mIsEnabled, cc.xyw(2,3,6));
    builder.add(mShowInTray, cc.xyw(3,4,5));
    builder.add(mShowInSubMenu, cc.xyw(3,5,5));
    mSizeLabel = builder.addLabel(mLocalizer.msg("importantSize","Number of shown programs:"), cc.xy(3,6));
    builder.add(mSize, cc.xy(5,6));
    mSizeInfo = builder.addLabel(mLocalizer.msg("sizeInfo","(maximum: {0})",maxSizeValue), cc.xy(7,6));
    builder.add(priority, cc.xyw(3,7,5));
   
    JPanel c1 = (JPanel) builder.addSeparator(mLocalizer.msg("iconNameSeparator","Channel icons/channel name"), cc.xyw(1,9,8));
    builder.add(mShowIconAndName, cc.xyw(2,11,6));
    builder.add(mShowIcon, cc.xyw(2,12,6));
    builder.add(mShowName, cc.xyw(2,13,6));
   
    JPanel c2 = (JPanel) builder.addSeparator(mLocalizer.msg("settings","Settings"), cc.xyw(1,15,8));
    builder.add(mShowDate, cc.xyw(2,17,6));
    builder.add(mShowTime, cc.xyw(2,18,6));
    builder.add(mShowToolTip, cc.xyw(2,19,6));
    builder.add(mHelpLabel, cc.xyw(1,21,8));
   
    mSeparator1 = (JLabel)c.getComponent(0);
    mIconSeparator = (JLabel)c1.getComponent(0);
    mSeparator2 = (JLabel)c2.getComponent(0);
   
    setEnabled(true);
   
    mShowInSubMenu.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mSize.setModel(new SpinnerNumberModel(((Integer)mSize.getValue()).intValue(), 1, 30, 1));
        mSizeInfo.setText(mLocalizer.msg("sizeInfo","(maximum: {0})",30));
      }
    });

    mShowInTray.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        int value = ((Integer)mSize.getValue()).intValue();
        mSize.setModel(new SpinnerNumberModel(value > 15 ? 15 : value, 1, 15, 1));
        mSizeInfo.setText(mLocalizer.msg("sizeInfo","(maximum: {0})",15));
      }
    });
   
    mIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setEnabled(false);
      }
    });
   
    return builder.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

    return true;
  }

  public JPanel createSettingsContent() {
    CellConstraints cc = new CellConstraints();
    PanelBuilder pb = new PanelBuilder(new FormLayout("default,5dlu,default,5dlu,default","default"));
   
    mColorLabel = new ColorLabel(Settings.propProgramTableBackgroundSingleColor.getColor());
    mColorLabel.setStandardColor(Settings.propProgramTableBackgroundSingleColor.getDefaultColor());
   
    ColorButton colorButton = new ColorButton(mColorLabel);
   
    pb.addLabel(mLocalizer.msg("text","Background color"), cc.xy(1,1));
    pb.add(mColorLabel, cc.xy(3,1));
    pb.add(colorButton, cc.xy(5,1));
   
    return pb.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

 
  public JPanel createSettingsPanel() {
    mInstance = this;
   
    CellConstraints cc = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(new FormLayout("5dlu,12dlu,pref:grow,5dlu",
        "pref,5dlu,pref,pref,pref,10dlu,pref,5dlu,pref,pref," +
        "pref,10dlu,pref,5dlu,pref,pref,fill:pref:grow,pref"));
    builder.setDefaultDialogBorder();
   
    mIsEnabled = new JCheckBox(mLocalizer.msg("nowEnabled","Show Now running programs"),Settings.propTrayNowProgramsEnabled.getBoolean());
   
    ButtonGroup bg = new ButtonGroup();
   
    mShowInSubMenu = new JRadioButton(mLocalizer.msg("inSubMenu","in a sub menu"),Settings.propTrayNowProgramsInSubMenu.getBoolean());
    mShowInTray = new JRadioButton(mLocalizer.msg("inTray","in the tray menu"), !mShowInSubMenu.isSelected());
   
    bg.add(mShowInSubMenu);
    bg.add(mShowInTray);
   
    mShowIconAndName = new JRadioButton(mLocalizer.msg("showIconName","Show channel icon and channel name"),Settings.propTrayNowProgramsContainsName.getBoolean() && Settings.propTrayNowProgramsContainsIcon.getBoolean());
    mShowIcon = new JRadioButton(mLocalizer.msg("showIcon","Show channel icon"),!Settings.propTrayNowProgramsContainsName.getBoolean() && Settings.propTrayNowProgramsContainsIcon.getBoolean());
    mShowName = new JRadioButton(mLocalizer.msg("showName","Show channel name"),Settings.propTrayNowProgramsContainsName.getBoolean() && !Settings.propTrayNowProgramsContainsIcon.getBoolean());
       
    ButtonGroup bg1 = new ButtonGroup();
    bg1.add(mShowIconAndName);
    bg1.add(mShowIcon);
    bg1.add(mShowName);
   
    mShowTime = new JCheckBox(mLocalizer.msg("showTime","Show start time"),Settings.propTrayNowProgramsContainsTime.getBoolean());
    mShowToolTip = new JCheckBox(mLocalizer.msg("showToolTip","Show additional information of the program in a tool tip"),Settings.propTrayNowProgramsContainsToolTip.getBoolean());
    mShowToolTip.setToolTipText(mLocalizer.msg("toolTipTip","Tool tips are small helper to something, like this one."));
       
    mHelpLabel = UiUtilities.createHtmlHelpTextArea(mLocalizer.msg("help","The Tray is deactivated. To activate these settings activate the option <b>Tray activated</b> in the <a href=\"#link\">Tray Base settings</a>."), new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          SettingsDialog.getInstance().showSettingsTab(SettingsItem.TRAY);
        }
      }
    });
   
    JPanel c = (JPanel) builder.addSeparator(mLocalizer.msg("now","Now running programs"), cc.xyw(1,1,4));
    builder.add(mIsEnabled, cc.xyw(2,3,2));
    builder.add(mShowInTray, cc.xy(3,4));
    builder.add(mShowInSubMenu, cc.xy(3,5));
   
    JPanel c1 = (JPanel) builder.addSeparator(mLocalizer.msg("iconNameSeparator","Channel icons/channel name"), cc.xyw(1,7,4));
    builder.add(mShowIconAndName, cc.xyw(2,9,2));
    builder.add(mShowIcon, cc.xyw(2,10,2));
    builder.add(mShowName, cc.xyw(2,11,2));
   
    JPanel c2 = (JPanel) builder.addSeparator(mLocalizer.msg("settings","Settings"), cc.xyw(1,13,4));
    builder.add(mShowTime, cc.xyw(2,15,2));
    builder.add(mShowToolTip, cc.xyw(2,16,2));
    builder.add(mHelpLabel, cc.xyw(1,18,4));
   
    mSeparator1 = (JLabel)c.getComponent(0);
    mIconSeparator = (JLabel)c1.getComponent(0);
    mSeparator2 = (JLabel)c2.getComponent(0);
       
    setEnabled(true);
   
    mIsEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setEnabled(false);
      }
    });
   
    return builder.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

    ((JSpinner.DateEditor)mEndTimeLimit.getEditor()).getTextField().setHorizontalAlignment(SwingConstants.LEFT);
   
    CaretPositionCorrector.createCorrector(((JSpinner.DateEditor)mStartTimeLimit.getEditor()).getTextField(), new char[] {':'}, -1);
    CaretPositionCorrector.createCorrector(((JSpinner.DateEditor)mEndTimeLimit.getEditor()).getTextField(), new char[] {':'}, -1);
   
    PanelBuilder timeLimitPanel = new PanelBuilder(new FormLayout("default:grow,10dlu,default:grow","default,2dlu,default"));
   
    timeLimitPanel.addLabel(mLocalizer.msg("startTime","Start time:"), cc.xy(1,1));
    timeLimitPanel.addLabel(mLocalizer.msg("endTime","End time:"), cc.xy(3,1));
    timeLimitPanel.add(mStartTimeLimit, cc.xy(1,3));
    timeLimitPanel.add(mEndTimeLimit, cc.xy(3,3));
   
    panel.add(timeLimitPanel.getPanel(), cc.xy(3,15));
   
    JTextArea txt2 = UiUtilities.createHelpTextArea(mLocalizer.msg("DLSTNote", ""));
    // Hack because of growing JTextArea in FormLayout
    txt2.setMinimumSize(new Dimension(150, 20));
    panel.add(txt2, cc.xy(3, 17));
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

  private ArrayList<ContextMenuIf> mDeactivatedItems;

  public JPanel createSettingsPanel() {
    createList();

    PanelBuilder contentPanel = new PanelBuilder(new FormLayout("5dlu, pref, 3dlu, pref, fill:pref:grow, 3dlu",
        "pref, 5dlu, pref, 3dlu, fill:pref:grow"));
    contentPanel.setBorder(Borders.DIALOG_BORDER);

    CellConstraints cc = new CellConstraints();
    contentPanel.addSeparator(mLocalizer.msg("title", "Title"), cc.xyw(1,
        1, 6));

    contentPanel.add(UiUtilities.createHelpTextArea(mLocalizer.msg("ItemOrder", "Item Order:")), cc.xyw(2, 3, 4));

    contentPanel.add(mList, cc.xyw(2, 5, 4));

    fillListbox();

    return contentPanel.getPanel();
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

  private JButton mAdd, mEdit, mDelete;

  public JPanel createSettingsPanel() {
    try {
      CellConstraints cc = new CellConstraints();
      PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,default:grow,5dlu","pref,5dlu,fill:default:grow,5dlu,pref,10dlu,pref"));
      pb.setDefaultDialogBorder();

      mConfigurations = new SortableItemList("",GlobalPluginProgramFormatingManager.getInstance().getAvailableGlobalPluginProgramFormatings());
      mConfigurations.getList().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

      mConfigurations.getList().addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
          if(SwingUtilities.isLeftMouseButton(e) && e.getClickCount() >= 2) {
            LocalPluginProgramFormatingSettingsDialog.createInstance(UiUtilities.getLastModalChildOf(MainFrame.getInstance()), (AbstractPluginProgramFormating)mConfigurations.getList().getSelectedValue(), GlobalPluginProgramFormatingManager.getDefaultConfiguration(), true, true);
            mConfigurations.getList().repaint();
          }
        }
      });

      pb.addSeparator(mLocalizer.msg("title","Plugin program formating"), cc.xyw(1,1,3));
      pb.add(mConfigurations, cc.xy(2,3));

      FormLayout layout = new FormLayout("default,5dlu,default,5dlu,default","pref");
      layout.setColumnGroups(new int[][] {{1,3,5}});

      JPanel buttonPanel = new JPanel(layout);

      mAdd = new JButton(Localizer.getLocalization(Localizer.I18N_ADD));
      mAdd.setIcon(TVBrowserIcons.newIcon(TVBrowserIcons.SIZE_SMALL));
      mAdd.addActionListener(this);

      mEdit = new JButton(Localizer.getLocalization(Localizer.I18N_EDIT));
      mEdit.setIcon(TVBrowserIcons.edit(TVBrowserIcons.SIZE_SMALL));
      mEdit.setEnabled(false);
      mEdit.addActionListener(this);

      mDelete = new JButton(Localizer.getLocalization(Localizer.I18N_DELETE));
      mDelete.setIcon(TVBrowserIcons.delete(TVBrowserIcons.SIZE_SMALL));
      mDelete.setEnabled(false);
      mDelete.addActionListener(this);

      buttonPanel.add(mAdd, cc.xy(1,1));
      buttonPanel.add(mEdit, cc.xy(3,1));
      buttonPanel.add(mDelete, cc.xy(5,1));

      pb.add(buttonPanel, cc.xy(2,5));
      pb.addLabel(mLocalizer.msg("help","<html>This list of formating can be used by several plugins. So a formating don't have to be entered in every plugin that should use the formating. The selection of the formating can be done in the settings of the plugin.</html>"), cc.xy(2,7));

      mConfigurations.getList().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
          if(!e.getValueIsAdjusting()) {
            mEdit.setEnabled(mConfigurations.getList().getSelectedIndex() != -1);
            mDelete.setEnabled(mConfigurations.getList().getSelectedIndex() != -1);
          }
        }
      });

      return pb.getPanel();

    }catch(Exception e) {e.printStackTrace();}
    return null;
  }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

  private JCheckBox mShowPluginMarkingCb;

  public ExtrasTab(Frame dlgParent) {
    CellConstraints cc = new CellConstraints();
   
    PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref:grow",
        "pref,5dlu,pref,3dlu,pref,10dlu"), this);
    pb.setDefaultDialogBorder();
    pb.addSeparator(mLocalizer.msg("programItem","Program item"), cc.xyw(1,1,2));
    pb.add(mProgramPreviewPanel = new ProgramPreviewPanel(dlgParent), cc.xy(2,3));
    pb.add(mShowPluginMarkingCb = new JCheckBox(mLocalizer.msg("showPluginMarkings","Show plugin markings")), cc.xy(2,5));

    mShowPluginMarkingCb.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        mProgramPreviewPanel.setShowPluginMarking(mShowPluginMarkingCb.isSelected());
      }
View Full Code Here

Examples of com.jgoodies.forms.builder.PanelBuilder

  public LayoutTab() {
    CellConstraints cc = new CellConstraints();
    mLayoutCBModel = new DefaultComboBoxModel();
   
    PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref,10dlu,pref:grow",
        "pref,5dlu,pref,2dlu,pref,10dlu"), this);
    pb.setDefaultDialogBorder();
   
    pb.addSeparator(mLocalizer.msg("channelsAndColumns","Channels and columns"), cc.xyw(1,1,4));
    pb.addLabel(mLocalizer.msg("channelsPerPage","Channels per page")+":", cc.xy(2,3));
    pb.add(mChannelsPerPageCB = new JComboBox(createIntegerArray(2,22)), cc.xy(4,3));
    pb.addLabel(mLocalizer.msg("columnsPerPage","columns")+":", cc.xy(2,5));
    pb.add(mLayoutCB = new JComboBox(mLayoutCBModel), cc.xy(4,5));

    mChannelsPerPageCB.addItemListener(new ItemListener(){
      public void itemStateChanged(ItemEvent e) {
        int val = ((Integer)mChannelsPerPageCB.getSelectedItem()).intValue();
        updateLayoutCombobox(val);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.