List of usage examples for com.jgoodies.forms.builder PanelBuilder PanelBuilder
public PanelBuilder(FormLayout layout)
From source file:aconsole.config.PropertyPanel.java
License:Open Source License
public PropertyPanel() { CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout("5dlu, pref, pref,default:grow", "pref, 5dlu"); PanelBuilder panelBuilder = new PanelBuilder(layout); panelBuilder.add(new JLabel(mLocalizer.msg("title", "setup appearance of TVBConsole")), cc.xyw(2, 1, 2)); int row = 2;/*w ww .j av a 2 s . c om*/ row += addColorButton(AConsole.getBg(), mLocalizer.msg("Bg.label", "background:"), mLocalizer.msg("Bg.tooltip", "select the color for the console background"), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getSelection(), mLocalizer.msg("Selection.label", "background for selected rows:"), mLocalizer.msg("Selection.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getSelectionText(), mLocalizer.msg("SelectionText.label", "color for selected text:"), mLocalizer.msg("SelectionText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getSystemOutText(), mLocalizer.msg("SystemOutText.label", "color for text send to System.out:"), mLocalizer.msg("SystemOutText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getSystemErrText(), mLocalizer.msg("SystemErrText.label", "color for text send to System.err:"), mLocalizer.msg("SystemErrText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getLevelSevereText(), mLocalizer.msg("LevelSevereText.label", "text with logger-level of severe or higher:"), mLocalizer.msg("LevelSevereText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getLevelWarningText(), mLocalizer.msg("LevelWarningText.label", "text with logger-level between warning and severe:"), mLocalizer.msg("LevelWarningText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getLevelInfoText(), mLocalizer.msg("LevelInfoText.label", "text with logger-level between info and warning:"), mLocalizer.msg("LevelInfoText.tooltip", ""), layout, panelBuilder, cc, row); row += addColorButton(AConsole.getLevelOtherText(), mLocalizer.msg("LevelOtherText.label", "text with logger-level less than warning:"), mLocalizer.msg("LevelOtherText.tooltip", ""), layout, panelBuilder, cc, row); panel = panelBuilder.getPanel(); }
From source file:action.About.java
License:Open Source License
private JPanel getaboutPanel() { FormLayout lay = new FormLayout("left:pref, 3dlu, left:pref, max(200dlu;pref)", "p, p, 10dlu, p, 3dlu, p, 10dlu, p, 10dlu, p, p");// rows CellConstraints cc = new CellConstraints(); PanelBuilder build = new PanelBuilder(lay); ImageIcon ii = TResourceUtils.getIcon("appIcon", 80); JLabel jl = new JLabel(ii); jl.setHorizontalAlignment(JLabel.LEFT); build.add(jl, cc.xyw(1, 1, 4));/*from www.ja va 2s . c om*/ build.add(new JLabel(TStringUtils.getBundleString("about.app")), cc.xyw(1, 2, 4)); build.add(new JLabel(TStringUtils.getBundleString("about.version")), cc.xy(1, 4)); build.add(new JLabel(SystemVariables.getStringVar("versionID")), cc.xy(3, 4)); build.add(new JLabel(TStringUtils.getBundleString("about.update")), cc.xy(1, 6)); build.add(new JLabel(SystemVariables.getStringVar("updateID")), cc.xy(3, 6)); build.add(new JLabel(TStringUtils.getBundleString("about.msg1")), cc.xyw(1, 8, 4)); build.add(new JLabel(TStringUtils.getBundleString("about.msg2")), cc.xyw(1, 10, 4)); build.add(getOpenSourcePanel(), cc.xyw(1, 11, 4)); // build.add(Box.createVerticalStrut(4), cc.xy(1, 7)); JPanel jp = build.getPanel(); jp.setBorder(new EmptyBorder(4, 4, 4, 4)); return jp; }
From source file:ambit2.dbui.dictionary.DictionaryQueryPanel.java
License:Open Source License
public JComponent buildPanel() { initRows();/*from w w w . jav a 2 s . com*/ 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();/* w w w .j a va 2s .c om*/ 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(); 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();/*from w w w .j a v a2 s. c o m*/ 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(); 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();// w ww. j a va2 s . c om 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)); 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();/*from ww w.j av a2 s .c o m*/ 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)); 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();/* w w w .j av a 2 s . co m*/ 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(); 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(/* w ww .java2 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:ambit2.ui.editors.BeanEditor.java
License:Open Source License
public JComponent buildPanel(L object, final String[] columns, String[] captions) { initComponents(object, columns, captions); StringBuffer b = new StringBuffer(); b.append("p, 1dlu,"); for (int i = 0; i < columns.length; i++) { if (null == columns[i]) b.append("12dlu,"); else {//from w ww. j ava 2 s . co m b.append("p, "); b.append("3dlu, "); } } FormLayout layout = new FormLayout("right:pref, 3dlu, 150dlu:grow", b.toString()); // "p, 1dlu, p, 9dlu, p, 1dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 9dlu, p"); PanelBuilder builder = new PanelBuilder(layout); // builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); buildFields(builder, cc); return builder.getPanel(); }