Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.PanelBuilder


      .getLocalizerFor(MausSettingsTab.class);

  private ArrayList<MouseClickSetting> mSettings = new ArrayList<MausSettingsTab.MouseClickSetting>();

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

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

    contentPanel.add(
        new JLabel(mLocalizer.msg("MouseButtons", "Mouse Buttons:")),
        cc.xyw(2, 3, 4));

    int row = 5;
    for (MouseClickSetting clickSetting : mSettings) {
      contentPanel.add(new JLabel(clickSetting.mLabel), cc.xy(2, row));
      contentPanel.add(clickSetting.createComboxBox(), cc.xy(4, row));
      row += 2;
    }
    return contentPanel.getPanel();
  }
View Full Code Here


 
  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,5dlu,pref,10dlu,pref,5dlu,pref,pref,pref," +
        "10dlu,pref,5dlu,pref,pref,pref,3dlu,pref,5dlu,pref,fill:pref:grow,pref"));
    builder.setDefaultDialogBorder();
   
    mIsEnabled = new JCheckBox(mLocalizer.msg("onTimeEnabled","Show programs at..."),Settings.propTrayOnTimeProgramsEnabled.getBoolean());
   
    ButtonGroup bg = new ButtonGroup();
   
    mShowInSubMenu = new JRadioButton(mLocalizer.msg("inSubMenu","in a sub menu"),Settings.propTrayOnTimeProgramsInSubMenu.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.propTrayOnTimeProgramsContainsName.getBoolean() && Settings.propTrayOnTimeProgramsContainsIcon.getBoolean());
    mShowIcon = new JRadioButton(mLocalizer.msg("showIcon","Show channel icon"),Settings.propTrayOnTimeProgramsContainsIcon.getBoolean() && !Settings.propTrayOnTimeProgramsContainsName.getBoolean());
    mShowName = new JRadioButton(mLocalizer.msg("showName","Show channel name"),!Settings.propTrayOnTimeProgramsContainsIcon.getBoolean() && Settings.propTrayOnTimeProgramsContainsName.getBoolean());
   
    ButtonGroup bg1 = new ButtonGroup();
    bg1.add(mShowIconAndName);
    bg1.add(mShowIcon);
    bg1.add(mShowName);
   
    mShowTime = new JCheckBox(mLocalizer.msg("showTime","Show start time"),Settings.propTrayOnTimeProgramsContainsTime.getBoolean());
    mShowToolTip = new JCheckBox(mLocalizer.msg("showToolTip","Show additional information of the program in a tool tip"),Settings.propTrayOnTimeProgramsContainsToolTip.getBoolean());
    mShowToolTip.setToolTipText(mLocalizer.msg("toolTipTip","Tool tips are small helper to something, like this one."));
    mShowProgress = new JCheckBox(mLocalizer.msg("showProgress","Show progress bar"), Settings.propTrayOnTimeProgramsShowProgress.getBoolean());
   
    mLightColorLb = new ColorLabel(Settings.propTrayOnTimeProgramsLightBackground.getColor());
    mLightColorLb.setStandardColor(Settings.propTrayOnTimeProgramsLightBackground.getDefaultColor());
    mDarkColorLb = new ColorLabel(Settings.propTrayOnTimeProgramsDarkBackground.getColor());
    mDarkColorLb.setStandardColor(Settings.propTrayOnTimeProgramsDarkBackground.getDefaultColor());
   
    mTimeHelp =  UiUtilities.createHtmlHelpTextArea(mLocalizer.msg("helpTime","If you want to change the times of this view, you simply have to change the times of the <a href=\"#link\">time buttons</a>."), new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          SettingsDialog.getInstance().showSettingsTab(SettingsItem.TIMEBUTTONS);
        }
      }
    });
   
    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);
        }
      }
    });
   
    mInfo = UiUtilities.createHtmlHelpTextArea(mLocalizer.msg("trayProgressInfo","The progress bar simulates the progress of the program if the time would be reached."));
   
    mLight = new ColorButton(mLightColorLb);
    mDark = new ColorButton(mDarkColorLb);
   
    PanelBuilder colors = new PanelBuilder(new FormLayout(
        "default,5dlu,default,5dlu,default", "pref,2dlu,pref"));
   
    mDarkLabel = colors.addLabel(
        mLocalizer.msg("progressLight",
            "Background color of the programs at..."), cc.xy(1, 1));
    colors.add(mLightColorLb, cc.xy(3, 1));
    colors.add(mLight,cc.xy(5, 1));

    mLightLabel = colors.addLabel(
        mLocalizer.msg("progressDark",
            "Progress color of the programs at..."), cc.xy(1, 3));
    colors.add(mDarkColorLb, cc.xy(3, 3));
    colors.add(mDark,cc.xy(5, 3));
       
    JPanel c = (JPanel) builder.addSeparator(mLocalizer.msg("onTime","Programs at..."), 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));
    builder.add(mTimeHelp, cc.xyw(2,7,2));

    JPanel c1 = (JPanel) builder.addSeparator(mLocalizer.msg("iconNameSeparator","Channel icons/channel name"), cc.xyw(1,9,4));
    builder.add(mShowIconAndName, cc.xyw(2,11,2));
    builder.add(mShowIcon, cc.xyw(2,12,2));
    builder.add(mShowName, cc.xyw(2,13,2));
   
    JPanel c2 = (JPanel) builder.addSeparator(mLocalizer.msg("settings","Settings"), cc.xyw(1,15,4));
    builder.add(mShowTime, cc.xyw(2,17,2));
    builder.add(mShowToolTip, cc.xyw(2,18,2));
    builder.add(mShowProgress, cc.xyw(2,19,2));
    builder.add(colors.getPanel(), cc.xy(3,21));
    builder.add(mInfo, cc.xyw(2,23,2));
    builder.add(mHelpLabel, cc.xyw(1,25,4));
   
    mSeparator1 = (JLabel)c.getComponent(0);
    mIconSeparator = (JLabel)c1.getComponent(0);
View Full Code Here

    FormLayout layout = new FormLayout("5dlu,pref,5dlu,pref,pref:grow,3dlu,pref,3dlu,pref,5dlu",
        "pref,5dlu,pref,1dlu,pref,1dlu,pref,1dlu,pref,10dlu,pref,5dlu," +
        "pref,10dlu,pref,5dlu,pref,10dlu,pref,5dlu,pref,10dlu," +
        "pref,5dlu,pref,3dlu,pref,10dlu,pref,5dlu,pref");
    layout.setColumnGroups(new int[][] {{7,9}});
    PanelBuilder pb = new PanelBuilder(layout, new ScrollableJPanel());
    pb.setDefaultDialogBorder();
   
    CellConstraints cc = new CellConstraints();
   
    final String[] extArr = { ".wav", ".aif", ".rmf", ".au", ".mid" };
    String soundFName=mSettings.getProperty("soundfile","/");
    String msg = mLocalizer.msg("soundFileFilter", "Sound file ({0})",
        "*.wav, *.aif, *.rmf, *.au, *.mid");
   
   
    mReminderWindowChB = new JCheckBox(mLocalizer.msg("reminderWindow", "Reminder window"), mSettings.getProperty("usemsgbox","false").equalsIgnoreCase("true"));
   
    mShowAlwaysOnTop = new JCheckBox(mLocalizer.msg("alwaysOnTop","Show always on top"), mSettings.getProperty("alwaysOnTop","true").equalsIgnoreCase("true"));
    mShowAlwaysOnTop.setEnabled(mReminderWindowChB.isSelected());

    JPanel reminderWindowCfg = new JPanel(new FormLayout("12dlu,default:grow","pref,1dlu,pref"));
    reminderWindowCfg.add(mReminderWindowChB, cc.xyw(1,1,2));
    reminderWindowCfg.add(mShowAlwaysOnTop, cc.xy(2,3));
       
    mSoundFileChB = new FileCheckBox(mLocalizer.msg("playlingSound", "Play sound"), new File(soundFName), 0, false);
   
    JFileChooser soundChooser=new JFileChooser((String)null);
    soundChooser.setFileFilter(new ExtensionFileFilter(extArr, msg));

    mSoundFileChB.setFileChooser(soundChooser);
       
    mSoundFileChB.setSelected(mSettings.getProperty("usesound","false").equals("true"));
   
    mBeep = new JCheckBox(mLocalizer.msg("beep", "Speaker sound"), mSettings.getProperty("usebeep","true").equalsIgnoreCase("true"));

    mExecFileStr = mSettings.getProperty("execfile", "");
    mExecParamStr = mSettings.getProperty("execparam", "");
   
    final JButton soundTestBt = new JButton(mLocalizer.msg("test", "Test"));
   
    mExecChB = new JCheckBox(mLocalizer.msg("executeProgram", "Execute program"));
    mExecChB.setSelected(mSettings.getProperty("useexec","false").equals("true"));
   
    mExecFileDialogBtn = new JButton(mLocalizer.msg("executeConfig", "Configure"));
    mExecFileDialogBtn.setEnabled(mExecChB.isSelected());
   
    mPluginLabel = new JLabel();
    JButton choose = new JButton(mLocalizer.msg("selectPlugins","Choose Plugins"));
       
    mClientPluginTargets = ReminderPlugin.getInstance().getClientPluginsTargets();
   
    handlePluginSelection();
   
    choose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {try{
        Window parent = UiUtilities.getLastModalChildOf(MainFrame
              .getInstance());
        PluginChooserDlg chooser = null;
        chooser = new PluginChooserDlg(parent, mClientPluginTargets, null,
              ReminderPluginProxy.getInstance());
       
        chooser.setLocationRelativeTo(parent);
        chooser.setVisible(true);
       
        if(chooser.getReceiveTargets() != null) {
          mClientPluginTargets = chooser.getReceiveTargets();
        }
       
        handlePluginSelection();}catch(Exception ee) {ee.printStackTrace();}
      }
    });
   
    int autoCloseReminderTime = 10;
    try {
      String asString = mSettings.getProperty("autoCloseReminderTime", "10");
      autoCloseReminderTime = Integer.parseInt(asString);
     
      if(autoCloseReminderTime == 0) {
        autoCloseReminderTime = 10;
      }
    } catch (Exception exc) {
      // ignore
    }
   
    mCloseOnEnd = new JRadioButton(mLocalizer.msg("autoCloseReminderAtProgramEnd","Program end"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("onEnd"));
    mCloseOnEnd.setEnabled(mReminderWindowChB.isSelected());
   
    mCloseNever = new JRadioButton(mLocalizer.msg("autoCloseNever","Never close"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("never"));
    mCloseNever.setEnabled(mReminderWindowChB.isSelected());
   
    mCloseOnTime = new JRadioButton(mLocalizer.ellipsisMsg("autoCloseAfterTime","After time"), mSettings.getProperty("autoCloseBehaviour","onEnd").equals("onTime"));
    mCloseOnTime.setEnabled(mReminderWindowChB.isSelected());
   
    ButtonGroup bg = new ButtonGroup();
   
    bg.add(mCloseOnEnd);
    bg.add(mCloseNever);
    bg.add(mCloseOnTime);
   
    mAutoCloseReminderTimeSp = new JSpinner(new SpinnerNumberModel(autoCloseReminderTime,autoCloseReminderTime < 5 ? 1 : 5,600,1));
    mAutoCloseReminderTimeSp.setEnabled(mCloseOnTime.isSelected() && mReminderWindowChB.isSelected());
   
    mShowTimeCounter = new JCheckBox(mLocalizer.msg("showTimeCounter","Show time counter"),mSettings.getProperty("showTimeCounter","false").compareTo("true") == 0);
    mShowTimeCounter.setEnabled(!mCloseNever.isSelected() && mReminderWindowChB.isSelected());
   
    PanelBuilder autoClosePanel = new PanelBuilder(new FormLayout("12dlu,default,2dlu,default:grow","pref,2dlu,pref,2dlu,pref,2dlu,pref,10dlu,pref"));
    autoClosePanel.add(mCloseOnEnd, cc.xyw(1,1,4));
    autoClosePanel.add(mCloseNever, cc.xyw(1,3,4));
    autoClosePanel.add(mCloseOnTime, cc.xyw(1,5,4));
    autoClosePanel.add(mAutoCloseReminderTimeSp, cc.xy(2,7));
   
    final JLabel secondsLabel = autoClosePanel.addLabel(mLocalizer.msg("seconds", "seconds (0 = off)"), cc.xy(4,7));
   
    autoClosePanel.add(mShowTimeCounter, cc.xyw(1,9,4));
   
    secondsLabel.setEnabled(mCloseOnTime.isSelected() && mReminderWindowChB.isSelected());
   
    String defaultReminderEntryStr = (String)mSettings.get("defaultReminderEntry");
    mDefaultReminderEntryList =new JComboBox(ReminderDialog.SMALL_REMIND_MSG_ARR);
    if (defaultReminderEntryStr != null) {
      try {
        int inx = Integer.parseInt(defaultReminderEntryStr);
        if (inx < ReminderDialog.SMALL_REMIND_MSG_ARR.length) {
          mDefaultReminderEntryList.setSelectedIndex(inx);
        }
      }catch(NumberFormatException e) {
        // ignore
      }
    }
       
    mShowTimeSelectionDlg = new JCheckBox(mLocalizer.msg("showTimeSelectionDialog","Show time selection dialog"));
    mShowTimeSelectionDlg.setSelected(mSettings.getProperty("showTimeSelectionDialog","true").compareTo("true") == 0);
    mShowRemovedDlg = new JCheckBox(mLocalizer.msg("showRemovedDialog","Show removed reminders after data update"));
    mShowRemovedDlg.setSelected(mSettings.getProperty("showRemovedDialog","true").compareTo("true") == 0);
       
    pb.addSeparator(mLocalizer.msg("remindBy", "Remind me by"), cc.xyw(1,1,10));
   
    pb.add(reminderWindowCfg, cc.xyw(2,3,4));
    pb.add(mSoundFileChB, cc.xyw(2,5,4));
    pb.add(mSoundFileChB.getButton(), cc.xy(7,5));
    pb.add(soundTestBt, cc.xy(9,5));
    pb.add(mBeep, cc.xy(2,7));
    pb.add(mExecChB, cc.xyw(2,9,4));
    pb.add(mExecFileDialogBtn, cc.xyw(7,9,3));
   
    pb.addSeparator(mLocalizer.msg("sendToPlugin", "Send reminded program to"), cc.xyw(1,11,10));
   
    pb.add(mPluginLabel, cc.xyw(2,13,4));
    pb.add(choose, cc.xyw(7,13,3));
   
    final JLabel c = (JLabel) pb.addSeparator(mLocalizer.msg("autoCloseReminder", "Automatically close reminder"), cc.xyw(1,15,10)).getComponent(0);
    c.setEnabled(mReminderWindowChB.isSelected());
   
    pb.add(autoClosePanel.getPanel(), cc.xyw(2,17,5));
   
    JPanel reminderEntry = new JPanel(new FlowLayout(FlowLayout.LEADING,0,0));
    reminderEntry.add(mDefaultReminderEntryList);
   
    pb.addSeparator(mLocalizer.msg("defaltReminderEntry","Default reminder time"), cc.xyw(1,19,10));
View Full Code Here

      // Columns
      "center:pref",
      // Rows
      "pref, 6dlu, pref, 6dlu, pref, 6dlu, pref");

    PanelBuilder builder = new PanelBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.setDefaultDialogBorder();

    int y = 1;
    builder.addSeparator(getTitle(), cc.xywh(1, y, 1, 1));

    y += 2;
    //i18n[PleaseWaitDialog.pleaseWait=Please wait while the query is executed]
    builder.addLabel(stringMgr.getString("PleaseWaitDialog.pleaseWait"), cc.xy(1, y));

    y += 2;
    builder.addSeparator("", cc.xywh(1, y, 1, 1));

    //i18n[PleaseWaitDialog.cancel=Cancel]
    cancelButton = new JButton(stringMgr.getString("PleaseWaitDialog.cancel"));
    cancelButton.addActionListener(this);
   
    y += 2;
    builder.add(cancelButton, cc.xywh(1, y, 1, 1));

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

    private JPanel createControlPanel()
    {
        FormLayout layout = new FormLayout( "pref, 3dlu, pref, 3dlu:grow",
                                            "pref, 15dlu, pref, 15dlu, pref, 3dlu:grow, pref" );
        PanelBuilder builder = new PanelBuilder( layout );
        CellConstraints cc = new CellConstraints( );

        String title = ConwayApplicationProperties.getProperty( "app.title" );
        builder.addLabel( title,
                          cc.xywh( 1,
                                   1,
                                   layout.getColumnCount( ),
                                   1 ) );

        String info = ConwayApplicationProperties.getProperty( "app.description" );
        builder.addLabel( info,
                          cc.xywh( 1,
                                   3,
                                   layout.getColumnCount( ),
                                   1 ) );

        final String patternLabel = ConwayApplicationProperties.getProperty( "pattern.label" );
        builder.addLabel( patternLabel,
                          cc.xy( 1,
                                 5 ) );

        builder.add( patternSelector,
                     cc.xy( 3,
                            5 ) );
        JPanel buttonPanel = ButtonBarFactory.buildLeftAlignedBar( nextGenerationButton,
                                                                   startStopButton,
                                                                   clearButton );
        builder.add( buttonPanel,
                     cc.xywh( 1,
                              7,
                              layout.getColumnCount( ),
                              1 ) );

        Border etchedBorder = BorderFactory.createEtchedBorder( EtchedBorder.LOWERED );
        Border outerBlankBorder = BorderFactory.createEmptyBorder( 5,
                                                                   5,
                                                                   5,
                                                                   5 );
        Border innerBlankBorder = BorderFactory.createEmptyBorder( 5,
                                                                   5,
                                                                   5,
                                                                   5 );
        Border border = BorderFactory.createCompoundBorder( BorderFactory.createCompoundBorder( outerBlankBorder,
                                                                                                etchedBorder ),
                                                            innerBlankBorder );
        builder.setBorder( border );
        return builder.getPanel( );
    }
View Full Code Here

        CellConstraints cc = new CellConstraints();
        FormLayout layout = new FormLayout(
                "right:pref, 3dlu, fill:50dlu, 3dlu, fill:47dlu, 3dlu, fill:100",
                "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p");

        PanelBuilder builder = new PanelBuilder(layout);
        builder.setDefaultDialogBorder();

        builder.addSeparator("DataDomain Configuration", cc.xywh(1, 1, 7, 1));
        builder.addLabel("DataDomain Name:", cc.xy(1, 3));
        builder.add(name.getComponent(), cc.xywh(3, 3, 5, 1));

        builder.addLabel("DataContext Factory:", cc.xy(1, 5));
        builder.add(dataContextFactory.getComponent(), cc.xywh(3, 5, 5, 1));

        builder.addLabel("Object Validation:", cc.xy(1, 7));
        builder.add(objectValidation, cc.xy(3, 7));

        builder.addLabel("Container-Managed Transactions:", cc.xy(1, 9));
        builder.add(externalTransactions, cc.xy(3, 9));
       
        builder.addSeparator("Cache Configuration", cc.xywh(1, 11, 7, 1));
        builder.addLabel("Max. Number of Objects:", cc.xy(1, 13));
        builder.add(cacheSize.getComponent(), cc.xy(3, 13));

        builder.addLabel("Use Shared Cache:", cc.xy(1, 15));
        builder.add(sharedCache, cc.xy(3, 15));

        builder.addLabel("Remote Change Notifications:", cc.xy(1, 17));
        builder.add(remoteUpdates, cc.xy(3, 17));
        builder.add(configRemoteUpdates, cc.xy(7, 17));

        this.setLayout(new BorderLayout());
        this.add(builder.getPanel(), BorderLayout.CENTER);
    }
View Full Code Here

        password = new JPasswordField();

        url.setText(urlStartConnections[driver.getSelectedIndex()]);

        FormLayout layout = new FormLayout("right:max(40mm;p), 4mm, 45mm", "p, 2mm, p, 2mm, p, 2mm, p");
        PanelBuilder builder = new PanelBuilder(layout);
        builder.setDefaultDialogBorder();
        CellConstraints cc = new CellConstraints();

        builder.addLabel(
            Utilities.getLangueMessage(Constantes.MESSAGE_TYPE_CONNEXION) + " : ", cc.xy(1, 1));
        builder.add(driver, cc.xy(3, 1));
        builder.addLabel(
            Utilities.getLangueMessage(Constantes.MESSAGE_ADRESSE_URL) + " : ", cc.xy(1, 3));
        builder.add(url, cc.xy(3, 3));
        builder.addLabel(
            Utilities.getLangueMessage(Constantes.MESSAGE_LOGIN) + " : ", cc.xy(1, 5));
        builder.add(user, cc.xy(3, 5));
        builder.addLabel(
            Utilities.getLangueMessage(Constantes.MESSAGE_PASSWORD) + " : ", cc.xy(1, 7));
        builder.add(password, cc.xy(3, 7));

        p = builder.getPanel();
        p.setBorder(MyBorderFactory.createEtchedBorder());

        return p;
    }
View Full Code Here

        /* Construction de la Frame Interne*/
        iFrame = new SimpleInternalFrame(Utilities.getLangueMessage(Constantes.MESSAGE_NAVIGATEUR));
        layout = new FormLayout(
        "5px, 182px, 5px",
        "2mm, p, 2mm, p, 2mm, p, 2mm, p, 2mm, p, 2mm, p");
        builder = new PanelBuilder(layout);
    cc = new CellConstraints();
    inc = 2;
   
        this.add(iFrame);
    }
View Full Code Here

    FormLayout layout = new FormLayout("15dlu,"
        + viewHandler.getTableWidth() + ":grow,3dlu,p,15dlu",
        "10dlu,p,3dlu,10dlu,p,3dlu,p,3dlu,p,3dlu,p,"
            + viewHandler.getTableHeight() + ":grow,p,5dlu,p,5dlu");
//     PanelBuilder builder = new PanelBuilder(layout,new FormDebugPanel());
    PanelBuilder builder = new PanelBuilder(layout);
     table.getColumnExt(5).setVisible(false);
    JScrollPane scrollPaneTable = new JScrollPane(table);
    scrollPaneTable.setBorder(Borders.EMPTY_BORDER);
    CellConstraints cc = new CellConstraints();
builder.add(checkBoxShowInactive,cc.xy(4, 2));
    builder.add(labelHeading, cc.xy(2, 2));
    builder.add(scrollPaneTable, cc.xywh(2, 4, 1, 9));

    builder.add(buildButtonPanel(), cc.xywh(4, 5, 1, 10));

    builder.add(
        ButtonBarFactory.buildCenteredBar(buttonExcel, buttonCancel),
        cc.xyw(2, 15, 3));

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

    public JPanel buildConstraintPanel(WindowInterface window,boolean addEmpty) {
       initComponents(window,addEmpty);
        FormLayout layout = new FormLayout(
                "p,3dlu,30dlu,3dlu,p:grow,3dlu,30dlu,3dlu,p,3dlu,30dlu,10dlu",
                "p,3dlu,p,3dlu,p");
        PanelBuilder builder = new PanelBuilder(layout);
        // PanelBuilder builder = new PanelBuilder(new FormDebugPanel(),layout);
        CellConstraints cc = new CellConstraints();

        if (excelReportEnum.useFrom()) {
            builder.addLabel("�r:", cc.xy(1, 1));
            builder.add(yearChooser, cc.xy(3, 1));
            if (excelReportEnum.useTo()) {
                builder.addLabel("Fra uke:", cc.xy(5, 1));
                builder.addLabel("Til uke:", cc.xy(9, 1));
                builder.add(comboBoxWeekTo, cc.xy(11, 1));
            } else {
                builder.addLabel("Uke:", cc.xy(5, 1));
            }
            builder.add(comboBoxWeekFrom, cc.xy(7, 1));
        }

        if (comboBoxReportType != null) {
            builder.addLabel("Rapport:", cc.xyw(1, 3, 3));
            builder.add(comboBoxReportType, cc.xyw(5, 3, 7));
        }
        if (excelReportEnum.useProductArea()) {
        builder.addLabel("Produktomr�de:", cc.xyw(1, 5, 5));
        builder.add(comboBoxProductArea, cc.xyw(6, 5, 4));
        }
        builder.add(checkBoxSalesMan,cc.xyw(11, 5,2));

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

TOP

Related Classes of com.jgoodies.forms.builder.PanelBuilder

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.