List of usage examples for com.jgoodies.forms.builder PanelBuilder setDefaultDialogBorder
@Deprecated public void setDefaultDialogBorder()
From source file:ambit2.dbui.dictionary.DictionaryQueryPanel.java
License:Open Source License
public JComponent buildPanel() { initRows();// ww w . j a v a 2 s . c o m FormLayout layout = new FormLayout("331dlu", "pref,48dlu,pref:grow"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); JComponent c = null; c = createNavigator(panel.getPanel(), path); // c.setBackground(panel.getPanel().getBackground()); // c.setBorder(BorderFactory.createRaisedBevelBorder()); panel.addSeparator("Filter by templates", cc.xywh(1, 1, 1, 1)); panel.add(c, cc.xywh(1, 2, 1, 1)); panel.add(createValueComponent(), cc.xywh(1, 3, 1, 1)); return panel.getPanel(); }
From source file:ambit2.dbui.QueryDatasetEditor.java
License:Open Source License
public JComponent buildPanel() { datasets = new AmbitRows<SourceDataset>(); FormLayout layout = new FormLayout("75dlu,3dlu,125dlu,3dlu,125dlu", "pref,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); panel.addSeparator("Dataset name", cc.xywh(1, 1, 5, 1)); JComponent c = createConditionComponent(); if (c != null) panel.add(c, cc.xywh(1, 2, 1, 1)); c = createValueComponent();/*from w w w . j a v a 2 s . co m*/ if (c != null) panel.add(c, cc.xywh(3, 2, 3, 1)); return panel.getPanel(); }
From source file:ambit2.dbui.QueryEditor.java
License:Open Source License
public JComponent buildPanel() { FormLayout layout = new FormLayout("125dlu,3dlu,75dlu,3dlu,125dlu", "pref,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); panel.addSeparator("Field name", cc.xywh(1, 1, 1, 1)); panel.addSeparator("Condition", cc.xywh(3, 1, 1, 1)); panel.addSeparator("Value", cc.xywh(5, 1, 1, 1)); JComponent c = createFieldnameComponent(); if (c != null) panel.add(c, cc.xywh(1, 2, 1, 1)); c = createConditionComponent();/*from w ww . ja v a 2 s.c om*/ if (c != null) panel.add(c, cc.xywh(3, 2, 1, 1)); c = createValueComponent(); if (c != null) panel.add(c, cc.xywh(5, 2, 1, 1)); return panel.getPanel(); }
From source file:ambit2.dbui.QueryFieldNumericEditor.java
License:Open Source License
public JComponent buildPanel() { properties = new AmbitRows<Property>(); stats = new AmbitRows<PropertyStats>(); FormLayout layout = new FormLayout("125dlu,3dlu,75dlu,3dlu,61dlu,3dlu,61dlu", "pref,pref,pref,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); panel.addSeparator("Field name", cc.xywh(1, 1, 1, 1)); panel.addSeparator("Condition", cc.xywh(3, 1, 1, 1)); panel.addSeparator("Value", cc.xywh(5, 1, 3, 1)); panel.add(createFieldnameComponent(), cc.xywh(1, 2, 1, 1)); panel.add(createConditionComponent(), cc.xywh(3, 2, 1, 1)); panel.add(createValueComponent(), cc.xywh(5, 2, 1, 1)); JComponent mv = createMaxValueComponent(); panel.add(mv, cc.xywh(7, 2, 1, 1));// w ww .j a va 2s . c o m panel.add(createStatsButton(), cc.xywh(1, 4, 1, 1)); JComponent[] s = createStatsFields(); for (JComponent c : s) c.setBackground(panel.getPanel().getBackground()); //panel.add(createStatsCheckBox(), cc.xywh(1,3,1,1)); panel.addSeparator("Average", cc.xywh(3, 3, 1, 1)); panel.addSeparator("Min", cc.xywh(5, 3, 1, 1)); panel.addSeparator("Max", cc.xywh(7, 3, 1, 1)); panel.add(s[0], cc.xywh(3, 4, 1, 1)); panel.add(s[1], cc.xywh(5, 4, 1, 1)); panel.add(s[2], cc.xywh(7, 4, 1, 1)); return panel.getPanel(); }
From source file:ambit2.dbui.QueryFunctionalGroupsEditor.java
License:Open Source License
public JComponent buildPanel() { FormLayout layout = new FormLayout("125dlu,3dlu,75dlu,3dlu,125dlu", "pref,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); panel.addSeparator("Functional groups", cc.xywh(1, 1, 5, 1)); JComponent c = createFieldnameComponent(); panel.add(c, cc.xywh(1, 2, 5, 1));//from www . j a v a 2 s.c o m return panel.getPanel(); }
From source file:ambit2.dbui.QuerySimilarityEditor.java
License:Open Source License
public JComponent buildPanel() { FormLayout layout = new FormLayout("125dlu,3dlu,75dlu,3dlu,40dlu,3dlu,40dlu,2dlu,40dlu", "pref,3dlu,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); JComponent c = createFieldnameComponent(); panel.add(new JLabel("<html><b>Similarity</b></html>"), cc.xywh(1, 3, 1, 1)); if (c != null) panel.add(c, cc.xywh(3, 3, 1, 1)); c = createConditionComponent();//from www. j a va 2 s . co m panel.add(new JLabel("Threshold"), cc.xywh(5, 3, 1, 1)); if (c != null) panel.add(c, cc.xywh(7, 3, 1, 1)); c = createThresholdComponent(); if (c != null) panel.add(c, cc.xywh(9, 3, 1, 1)); c = createStructureComponent(); panel.add(c, cc.xywh(1, 1, 9, 1)); return panel.getPanel(); }
From source file:ambit2.dbui.QueryStoredResultsEditor.java
License:Open Source License
@Override public JComponent buildPanel() { queries = new AmbitRows<IStoredQuery>(); searchStoredQuery = new SearchStoredQueries(); searchStoredQuery.setCondition(//from ww w . j a va2 s.c om StringCondition.getInstance(StringCondition.STRING_CONDITION.S_STARTS_WITH.getName())); FormLayout layout = new FormLayout("125dlu,3dlu,75dlu,3dlu,125dlu", "pref,pref"); PanelBuilder panel = new PanelBuilder(layout); panel.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); panel.addSeparator("Query name [number of structures]", cc.xywh(1, 1, 5, 1)); JComponent c = createFieldnameComponent(); if (c != null) panel.add(c, cc.xywh(1, 2, 5, 1)); return panel.getPanel(); }
From source file:at.lame.hellonzb.HelloNzbCradle.java
License:Open Source License
/** * Create the status bar inclusive all contents. * /* w w w . j a v a 2 s .c om*/ * @param progBar The previously create JProgressBar object * @return The newly created JPanel object */ protected JPanel createStatusBar(JProgressBar progBar) { // create layout for this tab/panel FormLayout layout = new FormLayout("pref:grow, 10dlu, pref, 10dlu, [100dlu,pref,150dlu]", // cols "p"); // rows // create builder PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); // status bar text field statusBarText = new JLabel(localer.getBundleText("StatusBarRunningThreads") + " 0"); builder.add(statusBarText, cc.xy(1, 1)); // ETA & total file size text field etaAndTotalText = new JLabel(""); builder.add(etaAndTotalText, cc.xy(3, 1)); etaAndTotalText.setToolTipText(localer.getBundleText("StatusBarEtaAndTotalTooltip")); // create background task progress bar in status bar builder.add(progBar, cc.xy(5, 1)); return builder.getPanel(); }
From source file:at.lame.hellonzb.preferences.tabs.PrefDownloadTab.java
License:Open Source License
private void createPanel() { String sepString = null;/*from w ww . j av a2s . co m*/ CompContainer compc = new CompContainer(null, null); par2CmdLineAppButton = new JButton(localer.getBundleText("DownloadSettingsPar2ChooseButton")); par2CmdLineAppButton.setName("DownloadSettingsPar2ExeLocation-Button"); unrarCmdLineAppButton = new JButton(localer.getBundleText("DownloadSettingsPar2ChooseButton")); unrarCmdLineAppButton.setName("DownloadSettingsUnrarExeLocation-Button"); // create layout for this tab/panel FormLayout layout = new FormLayout("right:pref, 3dlu, [100dlu,pref]:grow, 3dlu, pref", // cols "p, 3dlu, p, 9dlu, p, 3dlu, p, 3dlu, p, 9dlu, p, 3dlu, p, 3dlu, p"); // rows // create builder PanelBuilder builder = new PanelBuilder(layout, panel); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); // fill the grid with components ////////////////////////////////////////////////////////////////////// // group "connection" sepString = localer.getBundleText("DownloadSettingsGroupConnection"); builder.addSeparator(sepString, cc.xyw(1, 1, 5)); // max connection speed createTextfield(compc, "DownloadSettingsMaxConnectionSpeed", "NumericTextField"); compc.label.setText(compc.label.getText() + " (KB/s)"); builder.add(compc.label, cc.xy(1, 3)); builder.add(compc.comp, cc.xy(3, 3)); ////////////////////////////////////////////////////////////////////// // group "par2 check" sepString = localer.getBundleText("DownloadSettingsGroupPar2Check"); builder.addSeparator(sepString, cc.xyw(1, 5, 5)); // par2 check after download createCheckbox(compc, "DownloadSettingsPar2Check", false); par2ExtractCheckbox = (JCheckBox) compc.comp; builder.add(compc.label, cc.xy(1, 7)); builder.add(compc.comp, cc.xy(3, 7)); // path to par2 command line tool createTextfield(compc, "DownloadSettingsPar2ExeLocation", "JTextField"); par2LocationTextField = (JTextField) compc.comp; builder.add(compc.label, cc.xy(1, 9)); builder.add(compc.comp, cc.xy(3, 9)); builder.add(par2CmdLineAppButton, cc.xy(5, 9)); if (!par2ExtractCheckbox.isSelected()) { par2LocationTextField.setEnabled(false); par2CmdLineAppButton.setEnabled(false); } ////////////////////////////////////////////////////////////////////// // group "RAR archives" sepString = localer.getBundleText("DownloadSettingsGroupArcExtract"); builder.addSeparator(sepString, cc.xyw(1, 11, 5)); // automatically extract (RAR) archive files createCheckbox(compc, "DownloadSettingsExtractRARArchives", false); rarExtractCheckbox = (JCheckBox) compc.comp; builder.add(compc.label, cc.xy(1, 13)); builder.add(compc.comp, cc.xy(3, 13)); // path to unrar command line tool createTextfield(compc, "DownloadSettingsUnrarExeLocation", "JTextField"); unrarLocationTextField = (JTextField) compc.comp; builder.add(compc.label, cc.xy(1, 15)); builder.add(compc.comp, cc.xy(3, 15)); builder.add(unrarCmdLineAppButton, cc.xy(5, 15)); if (!rarExtractCheckbox.isSelected()) { unrarLocationTextField.setEnabled(false); unrarCmdLineAppButton.setEnabled(false); } }
From source file:at.lame.hellonzb.preferences.tabs.PrefExtendedTab.java
License:Open Source License
private void createPanel() { CompContainer compc = new CompContainer(null, null); String sepString = null;/*from w w w. ja va 2 s . c om*/ // create layout for this tab/panel FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow", // cols "p, 3dlu, p, 9dlu, p, 3dlu, p, 9dlu, p, 9dlu, p"); // rows // create builder PanelBuilder builder = new PanelBuilder(layout, panel); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); // fill the grid with components ////////////////////////////////////////////////////////////////////// // group "locale settings" sepString = localer.getBundleText("ExtendedSettingsGroupLocaleSettings"); builder.addSeparator(sepString, cc.xyw(1, 1, 3)); // choose language String[] boxvalues = new String[] { "-default-", "English", "German", "Dutch", "Turkish" }; createCombobox(compc, "ExtendedSettingsChooseLanguage", boxvalues, 0); builder.add(compc.label, cc.xy(1, 3)); builder.add(compc.comp, cc.xy(3, 3)); ////////////////////////////////////////////////////////////////////// // group "console output" sepString = localer.getBundleText("ExtendedSettingsGroupConsole"); builder.addSeparator(sepString, cc.xyw(1, 5, 3)); // activate console output createCheckbox(compc, "ExtendedSettingsConsoleOutput", true); builder.add(compc.label, cc.xy(1, 7)); builder.add(compc.comp, cc.xy(3, 7)); ////////////////////////////////////////////////////////////////////// // group "program settings" sepString = localer.getBundleText("GeneralSettingsGroupProgramSettings"); builder.addSeparator(sepString, cc.xyw(1, 9, 3)); // reset all hidden messages resetAllMsg = new JButton(localer.getBundleText("ExtendedSettingsResetMessages")); builder.add(resetAllMsg, cc.xyw(1, 11, 3)); }