List of usage examples for com.jgoodies.forms.builder DefaultFormBuilder DefaultFormBuilder
public DefaultFormBuilder(FormLayout layout, StringResourceAccessor localizer)
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.CalcPluginTransformOptionPanel.java
License:Open Source License
private void initGUI() { FormLayout layout = new FormLayout("p", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.appendSeparator(_("DataCalc.TransformOptionsPanel.TransformOptions")); largestFragment = new JCheckBox(new LargestFragmentAction()); builder.append(largestFragment);/*from w w w. j a v a 2 s.c om*/ deglycosilate = new JCheckBox(new DeglycosilateAction()); builder.append(deglycosilate); recalculate2Dcoords = new JCheckBox(new Recalculate2DCoordsAction()); builder.append(recalculate2Dcoords); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.additionalsmiles.AdditionalSmilesCalcPluginSettingsPanel.java
License:Open Source License
/** * @param arguments the plugin arguments *///from w w w .j a va 2 s.com public AdditionalSmilesCalcPluginSettingsPanel(AdditionalSmilesCalcPluginArguments arguments) { super(); Preconditions.checkNotNull(arguments); this.arguments = arguments; FormLayout layout = new FormLayout("p", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.appendSeparator(_("DataCalc.Plugins.PluginOptions")); calcLargestFragmentSmiles.setSelected(arguments.isCalcLargestFragmentSmiles()); calcLargestFragmentDeglycosilatedSmiles.setSelected(arguments.isCalcLargestFragmentDeglycosilatedSmiles()); calcOriginalStructureDeglycosilatedSmiles .setSelected(arguments.isCalcOriginalStructureDeglycosilatedSmiles()); builder.append(calcLargestFragmentSmiles); builder.append(calcLargestFragmentDeglycosilatedSmiles); builder.append(calcOriginalStructureDeglycosilatedSmiles); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.daylightbitfingerprint.DaylightBitCalcPluginSettingsPanel.java
License:Open Source License
/** * @param arguments//from w w w . j a v a 2s. c o m */ public DaylightBitCalcPluginSettingsPanel(DaylightBitCalcPluginArguments arguments) { super(); this.arguments = arguments; JPanel optionsPanel = new JPanel(); FormLayout layout = new FormLayout("right:pref, 4dlu, 50dlu, 4dlu", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, optionsPanel); builder.appendSeparator(_("DataCalc.Plugins.PluginOptions")); SpinnerNumberModel model = new SpinnerNumberModel(); model.setMinimum(0); model.setValue(arguments.getPathLength()); pathLength = new JSpinner(model); builder.append(_("DataCalc.Plugins.DaylightFingerprint.PathLength") + ":", pathLength, true); pathLength.addPropertyChangeListener(this); model = new SpinnerNumberModel(); model.setMinimum(1); model.setValue(arguments.getFingerprintSize()); fingerprintLength = new JSpinner(model); builder.append(_("DataCalc.Plugins.DaylightFingerprint.FingerprintSize") + ":", fingerprintLength, true); fingerprintLength.addPropertyChangeListener(this); layout = new FormLayout("p", ""); builder = new DefaultFormBuilder(layout, this); builder.append(optionsPanel); builder.append(new CalcPluginTransformOptionPanel(this.arguments, true, true, false)); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.daylightbitstringfingerprint.DaylightBitStringCalcPluginSettingsPanel.java
License:Open Source License
/** * @param arguments/*from ww w . j a va2 s.c om*/ */ public DaylightBitStringCalcPluginSettingsPanel(DaylightBitStringCalcPluginArguments arguments) { super(); this.arguments = arguments; JPanel optionsPanel = new JPanel(); FormLayout layout = new FormLayout("right:pref, 4dlu, 50dlu, 4dlu", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, optionsPanel); builder.appendSeparator(_("DataCalc.Plugins.PluginOptions")); SpinnerNumberModel model = new SpinnerNumberModel(); model.setMinimum(0); model.setValue(arguments.getPathLength()); pathLength = new JSpinner(model); builder.append(_("DataCalc.Plugins.DaylightFingerprint.PathLength") + ":", pathLength, true); pathLength.addPropertyChangeListener(this); model = new SpinnerNumberModel(); model.setMinimum(1); model.setValue(arguments.getFingerprintSize()); fingerprintLength = new JSpinner(model); builder.append(_("DataCalc.Plugins.DaylightFingerprint.FingerprintSize") + ":", fingerprintLength, true); fingerprintLength.addPropertyChangeListener(this); layout = new FormLayout("p", ""); builder = new DefaultFormBuilder(layout, this); builder.append(optionsPanel); builder.append(new CalcPluginTransformOptionPanel(this.arguments, true, true, false)); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.estatebitfingerprint.EStateBitCalcPluginSettingsPanel.java
License:Open Source License
public EStateBitCalcPluginSettingsPanel(EStateBitCalcPluginArguments arguments) { super();//from w ww . j av a 2 s . c o m this.arguments = arguments; FormLayout layout = new FormLayout("p", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.append(new CalcPluginTransformOptionPanel(this.arguments, true, true, false)); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.estatebitstringfingerprint.EStateBitStringCalcPluginSettingsPanel.java
License:Open Source License
public EStateBitStringCalcPluginSettingsPanel(EStateBitStringCalcPluginArguments arguments) { super();/*from ww w.j a v a 2 s . c om*/ this.arguments = arguments; FormLayout layout = new FormLayout("p", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.append(new CalcPluginTransformOptionPanel(this.arguments, true, true, false)); }
From source file:edu.udo.scaffoldhunter.plugins.datacalculation.impl.estatenumericalfingerprint.EStateNumericalCalcPluginSettingsPanel.java
License:Open Source License
public EStateNumericalCalcPluginSettingsPanel(EStateNumericalCalcPluginArguments arguments) { super();//ww w. j a va2 s.c o m this.arguments = arguments; FormLayout layout = new FormLayout("p", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.append(new CalcPluginTransformOptionPanel(this.arguments, true, true, false)); }
From source file:edu.udo.scaffoldhunter.view.util.TooltipManager.java
License:Open Source License
private JComponent buildPropertyPanel(Structure structure) { JScrollPane propertyScrollPane; final JPanel propertyPanel = new JPanel(); FormLayout propertyPanelLayout = new FormLayout("p, 4dlu, p:g", ""); DefaultFormBuilder propertyPanelBuilder = new DefaultFormBuilder(propertyPanelLayout, propertyPanel); lockingStructure.clear();/*from w w w. ja v a2s .c o m*/ lockingStructure.add(structure); try { db.lockAndLoad(propertyConfigurations.keySet(), lockingStructure); } catch (DatabaseException e) { // do nothing here because a popup failure message is annoying when // just showing a tooltip } appendProperties(structure, propertyPanelBuilder); appendAccumulatedProperties(structure, propertyPanelBuilder); db.unlockAndUnload(propertyConfigurations.keySet(), lockingStructure); propertyScrollPane = new JScrollPane(propertyPanel); propertyScrollPane.setPreferredSize(new Dimension(20, 20)); propertyScrollPane.setPreferredSize(new Dimension(400, 400)); propertyScrollPane.addComponentListener(new ComponentListener() { private boolean wasShown = false; @Override public void componentShown(ComponentEvent e) { } @Override public void componentResized(ComponentEvent e) { /* * set the viewport of the scrollpane to show the beginning of * the property panel. Located here instead of in method * componentShown(ComponentEvent e) because componentShown is * curiously never called? */ if (!wasShown) { propertyPanel.scrollRectToVisible(new Rectangle(0, 0, 10, 10)); wasShown = true; } } @Override public void componentMoved(ComponentEvent e) { } @Override public void componentHidden(ComponentEvent e) { } }); return propertyScrollPane; }
From source file:jgnash.ui.account.AccountPanel.java
License:Open Source License
private void layoutMainPanel() { initComponents();/*from ww w .j a va 2s . c om*/ FormLayout layout = new FormLayout( "right:max(20dlu;pref), $lcgap, max(50dlu;min):grow(1.0), $lcgap, max(50dlu;min):grow(1.0)", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.appendSeparator(rb.getString("Title.AccountInfo")); builder.setRowGroupingEnabled(true); builder.append(rb.getString("Label.Name"), nameField, 3); builder.nextLine(); builder.append(rb.getString("Label.Description"), descriptionField, 3); builder.nextLine(); builder.append(rb.getString("Label.AccountID"), codeField, 3); builder.nextLine(); builder.append(rb.getString("Label.BankID"), bankIdField, 3); builder.nextLine(); builder.append(rb.getString("Label.Currency"), currencyCombo, 3); builder.nextLine(); builder.append(rb.getString("Label.Securities"), securityButton, 3); builder.nextLine(); builder.append(rb.getString("Label.AccountType"), accountTypeCombo, 3); builder.nextLine(); builder.append(rb.getString("Label.AccountOptions"), lockedCheckBox, hideCheckBox); builder.nextLine(); builder.append("", placeholderCheckBox, excludeBudgetCheckBox); builder.setRowGroupingEnabled(false); builder.appendSeparator(rb.getString("Title.ParentAccount")); builder.append(parentButton, 5); builder.appendSeparator(rb.getString("Title.Notes")); JScrollPane pane = new JScrollPane(notesArea); pane.setAutoscrolls(true); builder.appendRow("f:60dlu:g(1.0)"); builder.append(pane, 5); }
From source file:jgnash.ui.account.AccountSecuritiesPanel.java
License:Open Source License
private void layoutMainPanel() { initComponents();//from w w w . j av a 2 s.co m FormLayout layout = new FormLayout("75dlu:g(0.5), 8dlu, p, 8dlu, 75dlu:g(0.5)", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout, this); builder.appendTitle(rb.getString("Title.Available")); builder.append(""); builder.appendTitle(rb.getString("Title.Current")); builder.appendRow("f:p:g(1.0)"); builder.append(new JScrollPane(availJList)); builder.append(layoutButtonStack()); builder.append(new JScrollPane(selectedJList)); }