List of usage examples for com.jgoodies.forms.layout CellConstraints LEFT
Alignment LEFT
To view the source code for com.jgoodies.forms.layout CellConstraints LEFT.
Click Source Link
From source file:UserPreferencesDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown ResourceBundle bundle = ResourceBundle.getBundle("UserPreferencesDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); toolbar = new JButtonBar(); panelCard = new JPanel(); JPanel panelGeneral = new JPanel(); JPanel panelGeneralSettings = new JPanel(); checkShowIconInSystemTray = new JCheckBox(); JPanel panelAlarm = new JPanel(); JPanel panelWhenAlarmGoesOff = new JPanel(); JPanel panelAlarmDefaults = new JPanel(); JPanel panelPlugins = new JPanel(); JTabbedPane pluginTabbedPane = new JTabbedPane(); JPanel pluginPanelSettings = new JPanel(); JScrollPane scrollPane1 = new JScrollPane(); pluginTable = new JXTable(); JXButtonPanel pluginsButtonPanel = new JXButtonPanel(); JLabel labelPluginInfo = new JLabel(); popmenuButton = ComponentFactory.getPopdownButton(); btnPluginOptions = new JButton(); JPanel pluginPanelUpdates = new JPanel(); check4PluginUpdatesAutomatically = new JCheckBox(); JLabel labelAfterDetectUpdate = new JLabel(); comboHowToUpdate = new JComboBox(); checkDownloadNotExistingPlugins = new JCheckBox(); JLabel labelCheckForUpdateEvery = new JLabel(); spinnerUpdateHour = new JSpinner(); JLabel labelHours = new JLabel(); JLabel labelUpdateFromServer = new JLabel(); comboPluginServers = new JComboBox(); btnResetDefaultPluginServer = new JButton(); JLabel labelManualCheck = new JLabel(); buttonBar = new JXButtonPanel(); btnOK = new JButton(); btnCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle(bundle.getString("this.title")); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//ww w. j a v a2 s. c o m dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new BorderLayout()); //======== toolbar ======== { toolbar.setBorder(LineBorder.createBlackLineBorder()); toolbar.setLayout(null); } contentPanel.add(toolbar, BorderLayout.NORTH); //======== panelCard ======== { panelCard.setLayout(new CardLayout()); //======== panelGeneral ======== { panelGeneral.setBorder(Borders.TABBED_DIALOG); //======== panelGeneralSettings ======== { panelGeneralSettings.setBorder( new TitledBorder(null, bundle.getString("panelGeneralSettings.border"), TitledBorder.LEADING, TitledBorder.TOP)); //---- checkShowIconInSystemTray ---- checkShowIconInSystemTray.setText(bundle.getString("checkShowIconInSystemTray.text")); PanelBuilder panelGeneralSettingsBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default")), panelGeneralSettings); panelGeneralSettingsBuilder.add(checkShowIconInSystemTray, cc.xy(3, 1)); } PanelBuilder panelGeneralBuilder = new PanelBuilder( new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormSpecs.RELATED_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) }), panelGeneral); panelGeneralBuilder.add(panelGeneralSettings, cc.xy(1, 1)); } panelCard.add(panelGeneral, "CARD1"); //======== panelAlarm ======== { panelAlarm.setBorder(Borders.TABBED_DIALOG); //======== panelWhenAlarmGoesOff ======== { panelWhenAlarmGoesOff.setBorder( new TitledBorder(null, bundle.getString("panelWhenAlarmGoesOff.border"), TitledBorder.LEADING, TitledBorder.TOP)); PanelBuilder panelWhenAlarmGoesOffBuilder = new PanelBuilder( new FormLayout(new ColumnSpec[] { new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), panelWhenAlarmGoesOff); ((FormLayout) panelWhenAlarmGoesOff.getLayout()) .setColumnGroups(new int[][] { { 9, 11 } }); } //======== panelAlarmDefaults ======== { panelAlarmDefaults .setBorder(new TitledBorder(null, bundle.getString("panelAlarmDefaults.border"), TitledBorder.LEADING, TitledBorder.TOP)); PanelBuilder panelAlarmDefaultsBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.NARROW_LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), panelAlarmDefaults); } PanelBuilder panelAlarmBuilder = new PanelBuilder(new FormLayout( ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), panelAlarm); panelAlarmBuilder.add(panelWhenAlarmGoesOff, cc.xy(1, 1)); panelAlarmBuilder.add(panelAlarmDefaults, cc.xy(1, 3)); } panelCard.add(panelAlarm, "CARD2"); //======== panelPlugins ======== { panelPlugins.setBorder(Borders.TABBED_DIALOG); //======== pluginTabbedPane ======== { //======== pluginPanelSettings ======== { pluginPanelSettings.setBorder( new CompoundBorder(new EmptyBorder(4, 4, 4, 4), new EtchedBorder())); pluginPanelSettings.setLayout(new BorderLayout()); //======== scrollPane1 ======== { scrollPane1.setViewportView(pluginTable); } pluginPanelSettings.add(scrollPane1, BorderLayout.CENTER); //======== pluginsButtonPanel ======== { pluginsButtonPanel.setBorder(new EmptyBorder(4, 4, 4, 4)); //---- labelPluginInfo ---- labelPluginInfo.setText(bundle.getString("labelPluginInfo.text")); //---- popmenuButton ---- popmenuButton.setText(bundle.getString("popmenuButton.text")); //---- btnPluginOptions ---- btnPluginOptions.setText(bundle.getString("btnPluginOptions.text")); PanelBuilder pluginsButtonPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.UNRELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.UNRELATED_GAP_COLSPEC }, RowSpec.decodeSpecs("default")), pluginsButtonPanel); pluginsButtonPanelBuilder.add(labelPluginInfo, cc.xy(3, 1)); pluginsButtonPanelBuilder.add(popmenuButton, cc.xy(5, 1)); pluginsButtonPanelBuilder.add(btnPluginOptions, cc.xy(7, 1)); } pluginPanelSettings.add(pluginsButtonPanel, BorderLayout.SOUTH); } pluginTabbedPane.addTab(bundle.getString("pluginPanelSettings.tab.title"), pluginPanelSettings); //======== pluginPanelUpdates ======== { pluginPanelUpdates.setBorder(new CompoundBorder(new EmptyBorder(4, 4, 4, 4), new TitledBorder(bundle.getString("pluginPanelUpdates.border")))); //---- check4PluginUpdatesAutomatically ---- check4PluginUpdatesAutomatically .setText(bundle.getString("check4PluginUpdatesAutomatically.text")); //---- labelAfterDetectUpdate ---- labelAfterDetectUpdate.setText(bundle.getString("labelAfterDetectUpdate.text")); //---- checkDownloadNotExistingPlugins ---- checkDownloadNotExistingPlugins .setText(bundle.getString("checkDownloadNotExistingPlugins.text")); //---- labelCheckForUpdateEvery ---- labelCheckForUpdateEvery.setText(bundle.getString("labelCheckForUpdateEvery.text")); //---- labelHours ---- labelHours.setText(bundle.getString("labelHours.text")); //---- labelUpdateFromServer ---- labelUpdateFromServer.setText(bundle.getString("labelUpdateFromServer.text")); labelUpdateFromServer.setLabelFor(comboPluginServers); //---- comboPluginServers ---- comboPluginServers.setEditable(true); //---- btnResetDefaultPluginServer ---- btnResetDefaultPluginServer .setText(bundle.getString("btnResetDefaultPluginServer.text")); //---- labelManualCheck ---- labelManualCheck.setText(bundle.getString("labelManualCheck.text")); PanelBuilder pluginPanelUpdatesBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes .bounded(Sizes.MINIMUM, Sizes.dluX(30), Sizes.dluX(30))), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.bounded(Sizes.DEFAULT, Sizes.dluX(50), Sizes.dluX(75)), FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.UNRELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.UNRELATED_GAP_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), pluginPanelUpdates); pluginPanelUpdatesBuilder.add(check4PluginUpdatesAutomatically, cc.xywh(1, 1, 5, 1)); pluginPanelUpdatesBuilder.add(labelAfterDetectUpdate, cc.xywh(1, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); pluginPanelUpdatesBuilder.add(comboHowToUpdate, cc.xywh(5, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); pluginPanelUpdatesBuilder.add(checkDownloadNotExistingPlugins, cc.xywh(1, 5, 5, 1)); pluginPanelUpdatesBuilder.add(labelCheckForUpdateEvery, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); pluginPanelUpdatesBuilder.add(spinnerUpdateHour, cc.xy(3, 7)); pluginPanelUpdatesBuilder.add(labelHours, cc.xy(5, 7)); pluginPanelUpdatesBuilder.add(labelUpdateFromServer, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); pluginPanelUpdatesBuilder.add(comboPluginServers, cc.xywh(3, 9, 3, 1)); pluginPanelUpdatesBuilder.add(btnResetDefaultPluginServer, cc.xy(7, 9)); pluginPanelUpdatesBuilder.add(labelManualCheck, cc.xywh(1, 13, 7, 1)); } pluginTabbedPane.addTab(bundle.getString("pluginPanelUpdates.tab.title"), pluginPanelUpdates); } PanelBuilder panelPluginsBuilder = new PanelBuilder( new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("5px") }), panelPlugins); panelPluginsBuilder.add(pluginTabbedPane, cc.xy(1, 1)); } panelCard.add(panelPlugins, "CARD6"); } contentPanel.add(panelCard, BorderLayout.CENTER); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_PAD); buttonBar.setCyclic(true); //---- btnOK ---- btnOK.setText(bundle.getString("btnOK.text")); //---- btnCancel ---- btnCancel.setText(bundle.getString("btnCancel.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.GLUE_COLSPEC, ColumnSpec.decode("max(pref;42dlu)"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.PREF_COLSPEC }, RowSpec.decodeSpecs("pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 2, 4 } }); buttonBarBuilder.add(btnOK, cc.xy(2, 1)); buttonBarBuilder.add(btnCancel, cc.xy(4, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:ai.aitia.meme.utils.FormsUtils.java
License:Open Source License
/** * Returns a DefaultFormBuilder containing the specified components and layout. * @param cols This parameter corresponds to the <code>encodedColumnSpecs</code> * parameter of FormLayout's ctor. Besides the encoding defined by FormLayout, * the following extensions are also available: the characters defined in the * global <code>{@link #gapLength}</code> variable (hereafter: gap-characters) * can be used to insert gap-columns. Gap columns must not appear in the * cell-specification (explained below) and they're automatically included in * column spans. /*from w ww . j a v a 2s. co m*/ * Consecutive gap-characters are coalesced into 1 gap column by calculating * their cumulated pixel size. * @param rows A string describing general builder settings + cell-specification * + row/colum spans + row heights + row groups. See the examples. * The digits and underscores specify which component goes into which cell(s) * of the layout grid (cell-specification). There can be at most one character * for every (non-gap) column specified by <code>cols</code>. Rows must be * separated by the '|' character. Only underscores, digits and letters are * allowed in the cell-specification (space isn't). Underscore means that a * cell is empty. A digit/letter character refers to a component in the varargs * list: '0'..'9', 'A'..'Z', 'a'..'z' (in this order) denote the first 62 * components of the <code>args</code> list. Repeating the same digit specifies * the component's column span (and row span, if repeated in consecutive rows * in the same columns, like '3' in the example).<br> * After the cell-specification, but before the newline ('|') character * the row height and row grouping can also be specified. It must begin * with a space to separate it from the cell-specification. The row * height can be a gap-character (for constant heights only) or a string * that is interpreted by RowSpec.decodeSpecs(). If omitted, the height * spec. of the most recent row is inherited. Content rows inherit the * height of the previous content row, gap rows inherit the height of * the previous gap row. A row is a gap row if its cell-specification is * omitted.<br> * Row grouping forces equal heights to every member of the group. It * can be specified by "grp?" strings using any character in place of * '?' (except space and '|'. In the example 'grp1' uses '1'). Rows * using the same grouping character will be in the same group. * By default there're no groups. * <br> * General builder-settings can be specified at the beginning of the * string, enclosed in square brackets ([..]). (No space is allowed * after the closing ']'). This is intended for future extensions, too. * The list of available settings is described at the {@link Prop} * enumeration. Note that setting names are case-sensitive, and should * be separated by commas. * @param args List of components. Besides java.awt.Component objects, * the caller may use plain strings and instances of the {@link Separator} * class. Plain strings are used to create labels (with mnemonic-expansion). * Separator objects will create and add separators to the form. * Any of these objects may be followed optionally by a {@link CellConstraints}, * a {@link CellConstraints.Alignment} or a {@link CellInsets} object, * which overrides the cell's default alignment, can extend its row/column * span and adjust its insets.<br> * If the first element of <code>args</code> is a java.util.Map object, * it is treated as an additional mapping for gap-characters. This * overrides the default global mapping. Note that gap-characters can * help you to set up uniform spacing on your forms. For example, if * you use "-" as normal column-gap and "~" as normal row-gap, fine-tuning * the sizes of these gaps later is as easy as changing the mapping for "-" * and "~" — there's no need to update all the dlu sizes in all layouts. * @see * Example1: <pre> * build("6dlu, p, 6dlu, 50dlu, 6dlu", * "_0_1_ pref| 6dlu|" + * "_2_33 pref:grow(0.5) grp1||" + * "_4_33 grp1", * component0, component1, component2, component3, * component4, cellConstraintsForComponent4).getPanel() * </pre> * The same exaple with gap-characters: <pre> * build("~ p ~ 50dlu, 6dlu", * "01_ pref|~|" + * "233 pref:grow(0.5) grp1||" + * "433 grp1", * component0, component1, component2, component3, * component4, cellConstraintsForComponent4).getPanel() * </pre> * Example3 (only the second argument): <pre> * "[LineGapSize=6dlu, ParagraphGapSize=20dlu]_0_1||_2_3||_4_5" * </pre> * Note: this method can be used with no components and empty cell-specification, * too. In this case only a {@link DefaultFormBuilder} is created, configured * and returned. Its operations can then be used to append components to the form. */ @SuppressWarnings("unchecked") public static DefaultFormBuilder build(String cols, String rows, Object... args) { Context ctx = new Context(); // Parse column widths // int firstArg = 0; if (args.length > 0 && args[0] instanceof java.util.Map) { ctx.localGapSpec = (java.util.Map<Character, String>) args[0]; firstArg += 1; } StringBuilder colstmp = new StringBuilder(); ctx.contentCol = parseColumnWidths(colstmp, cols, ctx.localGapSpec, 0); // Parse the list of components (may include individual cell-constraints) // ctx.components = new ArrayList<Rec>(args.length); for (int i = firstArg; i < args.length; ++i) { Rec r = new Rec(args[i]); if (i + 1 < args.length) { if (args[i + 1] instanceof CellConstraints) { r.cc = (CellConstraints) args[++i]; r.useAlignment = true; } else if (args[i + 1] instanceof CellConstraints.Alignment) { CellConstraints.Alignment a = (CellConstraints.Alignment) args[++i]; if (a == CellConstraints.BOTTOM || a == CellConstraints.TOP) r.cc = new CellConstraints(1, 1, CellConstraints.DEFAULT, a); else if (a == CellConstraints.LEFT || a == CellConstraints.RIGHT) r.cc = new CellConstraints(1, 1, a, CellConstraints.DEFAULT); else if (a == CellConstraints.CENTER || a == CellConstraints.FILL) r.cc = new CellConstraints(1, 1, a, a); r.useAlignment = (r.cc != null); } else if (args[i + 1] instanceof CellInsets) { CellInsets ci = ((CellInsets) args[++i]); r.cc = ci.cc; r.useAlignment = ci.useAlignment; r.useInsets = true; //} //else if (args[i+1] == null) { // this would allow superfluous 'null' values // i += 1; } } ctx.components.add(r); } // Parse general settings (but don't apply yet) // EnumMap<Prop, Object> props = null; int i = rows.indexOf(']'); if (i >= 0) { String defaults = rows.substring(0, i); rows = rows.substring(++i); i = defaults.indexOf('['); ctx.input = defaults.substring(++i); props = Prop.parseGeneralSettings(ctx); } // Parse cell-specification, row heights and row groups // String cells[] = rows.split("\\|", -1); StringBuilder rowstmp = new StringBuilder(); java.util.HashMap<Character, int[]> rowGroups = new HashMap<Character, int[]>(); String lastContentRowHeight = "p", lastGapRowHeight = null; int rowcnt = 0; for (i = 0; i < cells.length; ++i) { rowcnt += 1; // See if it begins with a gap-character String g = (cells[i].length() > 0) ? getGap(cells[i].charAt(0), ctx.localGapSpec) : null; if (g != null) cells[i] = ' ' + cells[i]; int j = cells[i].indexOf(' '); boolean gapRow = (j == 0) || (cells[i].length() == 0); String rh = null; if (j >= 0) { String tmp[] = cells[i].substring(j + 1).split("\\s"); // expect height and grouping specifications cells[i] = cells[i].substring(0, j); ArrayList<String> gaps = new ArrayList<String>(); for (j = 0; j < tmp.length; ++j) { if (tmp[j].length() == 0) continue; if (tmp[j].length() == 4 && tmp[j].toLowerCase().startsWith("grp")) { Character groupch = tmp[j].charAt(3); rowGroups.put(groupch, appendIntArray(rowGroups.get(groupch), rowcnt)); } else { rh = tmp[j]; for (int k = 0, n = tmp[j].length(); k < n && addGap(gaps, getGap(tmp[j].charAt(k), ctx.localGapSpec)); ++k) ; } } if (!gaps.isEmpty()) { StringBuilder sb = new StringBuilder(); flushGaps(gaps, sb, false); rh = sb.substring(0, sb.length() - 1); } } if (rh == null) { if (gapRow && lastGapRowHeight == null) { ctx.b = new DefaultFormBuilder(new FormLayout(colstmp.toString(), "")); Prop.setBuilder(props, ctx); lastGapRowHeight = parseableRowSpec(ctx.b.getLineGapSpec()); } rh = gapRow ? lastGapRowHeight : lastContentRowHeight; } else { if (gapRow) lastGapRowHeight = rh; else lastContentRowHeight = rh; } if (i > 0) rowstmp.append(','); rowstmp.append(rh); } // Create builder // FormLayout fml = new FormLayout(colstmp.toString(), rowstmp.toString()); ctx.b = new DefaultFormBuilder(fml, debuggable()); // Apply builder settings (e.g. column groups) // Prop.setBuilder(props, ctx); props = null; // Set row groups // if (!rowGroups.isEmpty()) { int[][] tmp = new int[rowGroups.size()][]; // ??? i = 0; for (int[] a : rowGroups.values()) tmp[i++] = a; fml.setRowGroups(tmp); } rowGroups = null; JLabel lastLabel = null; java.util.HashSet<Character> done = new java.util.HashSet<Character>(ctx.components.size()); int h = cells.length; for (int y = 0; y < cells.length; ++y) { int w = cells[y].length(); int first = -1; for (int x = 0; x < w; ++x) { char ch = cells[y].charAt(x); if (ch == '_' || done.contains(ch)) continue; int idx = intValue(ch); Rec rec; try { rec = ctx.components.get(idx); } catch (IndexOutOfBoundsException e) { throw new IndexOutOfBoundsException( String.format("build() cells=\"%s\" ch=%c rows=\"%s\"", cells[y], ch, rows)); } CellConstraints cc = (rec.cc == null) ? new CellConstraints() : (CellConstraints) rec.cc.clone(); int sx = cc.gridWidth, sy = cc.gridHeight; // span x, span y while (x + sx < w && cells[y].charAt(x + sx) == ch) sx += 1; while (y + sy < h && ((x < cells[y + sy].length() && cells[y + sy].charAt(x) == ch) || (cells[y + sy].length() == 0 && y + sy + 1 < h && x < cells[y + sy + 1].length() && cells[y + sy + 1].charAt(x) == ch))) { sy += 1; } int colSpan = ctx.contentCol[x + sx - 1] - ctx.contentCol[x] + 1; ctx.b.setBounds(ctx.contentCol[x] + 1, ctx.b.getRow(), colSpan, sy); ctx.b.setLeadingColumnOffset(first & ctx.contentCol[x]); // 0 vagy x (itt nem kell a +1) first = 0; x += (sx - 1); Object comp = ctx.components.get(idx).component; if (comp instanceof Component) { ctx.b.append((Component) comp, colSpan); if (comp instanceof JLabel) lastLabel = (JLabel) comp; else { if (lastLabel != null) lastLabel.setLabelFor((Component) comp); lastLabel = null; } } else if (comp instanceof Separator) { comp = ctx.b.appendSeparator(comp.toString()); lastLabel = null; } else { comp = lastLabel = ctx.b.getComponentFactory().createLabel(comp.toString()); ctx.b.append(lastLabel, colSpan); } if (rec.useAlignment || rec.useInsets) { CellConstraints cc2 = fml.getConstraints((Component) comp); cc2.insets = cc.insets; cc2.hAlign = cc.hAlign; cc2.vAlign = cc.vAlign; fml.setConstraints((Component) comp, cc2); } done.add(ch); } lastLabel = null; ctx.b.nextLine(); } return ctx.b; }
From source file:ai.aitia.meme.viewmanager.Page_Columns.java
License:Open Source License
private void layoutGUI() { final JPanel panel = new JPanel(new BorderLayout()); this.setLayout(new BorderLayout()); this.add(new DraggableViewport(panel)); panel.setBorder(Borders.DIALOG_BORDER); panel.add(FormsUtils.build("pref - min:grow - 30px", "012 min|~|3|=", filterLabel, new TAWrapper(jFilterTextArea), jFilterEEButton, // 0-2 new Separator("Columns of the view table") // 3 ).getPanel(), BorderLayout.NORTH); Box box = new Box(BoxLayout.Y_AXIS); box.add(FormsUtils.build("f:80dlu:g - pref", "01 f:min:g|-", getJTableScrollPane(), FormsUtils .buttonStack(jMoveUpButton, jMoveDownButton, FormsUtils.BS_UNRELATED, jRemoveButton, jEditButton) .getPanel()).getPanel());// w ww.j a v a 2 s . com // Use different preferred size for docked and floating conditions JScrollPane jScriptScrollPane = new JScrollPane(jScriptTextArea) /*{ private static final long serialVersionUID = 1L; public Dimension getPreferredSize() { if (SwingUtilities.getRoot(this) == SwingUtilities.getRoot(panel)) { return new Dimension(100, 24); // docked } return new Dimension(100, Sizes.dialogUnitYAsPixel(120, this)); // floating } }*/; MEMEApp.getLF().makeTransparent(jScriptScrollPane); // Ezt nem szabad bekapcsolni mert akkor sajnos rosszul szamolja a meretet // es a JScrollPane-ben a fugg.scrollbar letakarhatja a listaelemek veget. // Ezen esetleg a LookAndFeel.makeTransparent() tud segiteni. //tp.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); java.awt.Component columnProps = FormsUtils.titledPanel(" Column properties ", FormsUtils.build("- d:g ~~ f:max(120dlu;pref)", "01|%|02|~|03 f:m:g", // Left side #0 FormsUtils.build("pref ' 25dlu:g ' 30px", "011 p|~|" + "233||" + "444||" + "555||" + "666||" + "777||" + "889 f:d:g", "&Column name:", jColNameTextField, // 0-1 "Aggregative operation:", jAggregateCombo, // 2-3 FormsUtils.build("l:d:g'r:m'20dlu", "012", jSplittedCheckBox, jNamingDelimiter, jSplittedDelimTextField).getPanel(), // 4 jHiddenCheckBox, CellConstraints.LEFT, // 5 jForceAggregateCheckBox, // 6 FormsUtils.build("l:m:g = r:m'22px'22px'22px'22px'p", "0123456 p", jScriptCheckBox, jResultTypeLabel, jBooleanDataTypeButton, jIntDataTypeButton, jRealDataTypeButton, jStringDataTypeButton, jHelpButton).getPanel(), // 7 jScriptScrollPane, new CellInsets(0, 20, 0, 0), // 8 jScriptEEButton, CellConstraints.TOP // 9 ).getPanel(), // Right side #1,2,3 FormsUtils.build("0:g, fill:max(40dlu;pref) % fill:max(40dlu;pref), 0:g", "[ColGroups=24]" + "_01_ p", jAddButton, jCancelButton).getPanel(), "Available parameters:", jParListTabbedPane)) .getPanel(); /*boolean useToolbar = false; if (useToolbar) { JToolBar tb = new JToolBar("Column properties", JToolBar.HORIZONTAL); tb.add(columnProps); columnProps = tb; }*/ box.add(columnProps); panel.add(box, BorderLayout.CENTER); }
From source file:ai.aitia.meme.viewmanager.Page_NameAndDescription.java
License:Open Source License
private void layoutGUI() { this.setLayout(new java.awt.BorderLayout()); this.add(FormsUtils.build("r:p ~ f:p:g", "[DialogBorder]01|~|23 f:max(60dlu;pref)|~|_4 pref", "&Name:", jNameTextField, "&Description:", jDescTextArea, jSaveScriptButton, CellConstraints.LEFT).getPanel(), java.awt.BorderLayout.CENTER); }
From source file:au.gov.nla.atplugin.multiplecomponentidentifiers.editor.ArchDescComponentIdentifiersFields.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license mainPanel = new JPanel(); label3 = new JLabel(); label1 = new JLabel(); label2 = new JLabel(); identifierTypeList = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescComponentIdentifiers.PROPERTYNAME_IDENTIFIER_TYPE, ArchDescComponentIdentifiers.class); identifierLabelList = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescComponentIdentifiers.PROPERTYNAME_IDENTIFIER_LABEL, ArchDescComponentIdentifiers.class); identifierValue = ATBasicComponentFactory.createTextField( detailsModel.getModel(ArchDescComponentIdentifiers.PROPERTYNAME_COMPONENT_IDENTIFIER), true); CellConstraints cc = new CellConstraints(); //======== this ======== setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout("default:grow", "top:default:grow")); //======== mainPanel ======== {/* w ww .j a v a 2 s .c o m*/ mainPanel.setBorder(Borders.DLU4_BORDER); mainPanel.setOpaque(false); mainPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.setBackground(new Color(200, 205, 232)); mainPanel.setLayout(new FormLayout("max(min;150px), 1px, max(min;150px), 1px, max(default;150px)", "default, default, default, default, default, default")); //---- label3 ---- label3.setText("Identifier Type"); label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.add(label3, cc.xywh(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label1 ---- label1.setText("Identifier Label"); mainPanel.add(label1, cc.xy(3, 3)); //---- label2 ---- label2.setText("Identifier Value"); mainPanel.add(label2, cc.xy(5, 3)); //---- identifierTypeList ---- identifierTypeList.setOpaque(false); identifierTypeList.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.add(identifierTypeList, cc.xywh(1, 4, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- identifierLabelList ---- identifierLabelList.setOpaque(false); identifierLabelList.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.add(identifierLabelList, cc.xywh(3, 4, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); mainPanel.add(identifierValue, cc.xy(5, 4)); } add(mainPanel, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:au.gov.nla.atplugin.multiplecomponentidentifiers.panel.ResourceBasicInfoPanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel2 = new JPanel(); label_resourcesTitle = new JLabel(); scrollPane2 = new JScrollPane(); resourcesTitle = ATBasicComponentFactory .createTextArea(detailsModel.getModel(ArchDescription.PROPERTYNAME_TITLE), false); tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory .createUnboundComboBox(InLineTagsUtils.getInLineTagList(InLineTagsUtils.TITLE)); panel38 = new JPanel(); panel35 = new JPanel(); label_resourcesDateExpression = new JLabel(); resourcesDateExpression = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescription.PROPERTYNAME_DATE_EXPRESSION), false); Date1Label1 = new JLabel(); label_resourcesDateBegin = new JLabel(); resourcesDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_BEGIN); label_resourcesDateEnd = new JLabel(); resourcesDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_END); BulkDatesLabel = new JLabel(); label_resourcesBulkDateBegin = new JLabel(); resourcesBulkDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_BEGIN); label_resourcesBulkDateEnd = new JLabel(); resourcesBulkDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_END); panel3 = new JPanel(); label_resourcesLanguageCode = new JLabel(); resourcesLanguageCode = ATBasicComponentFactory.createComboBox(detailsModel, Resources.PROPERTYNAME_LANGUAGE_CODE, Resources.class); panel37 = new JPanel(); panel20 = new JPanel(); ExtentLabel = new JLabel(); panel21 = new JPanel(); label_resourcesExtentNumber = new JLabel(); resourcesExtentNumber = ATBasicComponentFactory.createDoubleField(detailsModel, Resources.PROPERTYNAME_EXTENT_NUMBER); extentType = ATBasicComponentFactory.createComboBox(detailsModel, Resources.PROPERTYNAME_EXTENT_TYPE, Resources.class); label_resourcesExtentDescription = new JLabel(); scrollPane422 = new JScrollPane(); containerSummary = ATBasicComponentFactory .createTextArea(detailsModel.getModel(Resources.PROPERTYNAME_CONTAINER_SUMMARY), false); label_resourcesLanguageNote = new JLabel(); scrollPane423 = new JScrollPane(); resourcesLanguageNote = ATBasicComponentFactory .createTextArea(detailsModel.getModel(Resources.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE), false); panel6 = new JPanel(); label_agreementReceived2 = new JLabel(); repositoryName = new JTextField(); changeRepositoryButton = new JButton(); separator2 = new JSeparator(); panel13 = new JPanel(); panel12 = new JPanel(); label_resourceIdentifier1 = new JLabel(); resourceIdentifier1 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Resources.PROPERTYNAME_RESOURCE_IDENTIFIER_1)); resourceIdentifier2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Resources.PROPERTYNAME_RESOURCE_IDENTIFIER_2)); resourceIdentifier3 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Resources.PROPERTYNAME_RESOURCE_IDENTIFIER_3)); resourceIdentifier4 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Resources.PROPERTYNAME_RESOURCE_IDENTIFIER_4)); panel19 = new JPanel(); label_resourcesLevel = new JLabel(); resourcesLevel = ATBasicComponentFactory.createComboBox(detailsModel, Resources.PROPERTYNAME_LEVEL, Resources.class); label_otherLevel = new JLabel(); resourcesOtherLevel = ATBasicComponentFactory .createTextField(detailsModel.getModel(Resources.PROPERTYNAME_OTHER_LEVEL), false); label_repositoryName5 = new JLabel(); scrollPane9 = new JScrollPane(); identifiersTable = new DomainSortableTable(); panel23 = new JPanel(); addIdentifier = new JButton(); removeIdentifier = new JButton(); label1 = new JLabel(); scrollPane6 = new JScrollPane(); instancesTable = new DomainSortableTable(ArchDescriptionInstances.class, ArchDescriptionInstances.PROPERTYNAME_INSTANCE_TYPE); panel29 = new JPanel(); addInstanceButton = new JButton(); removeInstanceButton = new JButton(); restrictionsApply = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY, Resources.class); OtherAccessionsLabel = new JLabel(); scrollPane4 = new JScrollPane(); accessionsTable = new DomainSortableTable(); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("left:max(default;300px):grow") }, RowSpec.decodeSpecs("default"))); //======== panel2 ======== {/*from w w w . j a v a 2s .c om*/ panel2.setBackground(new Color(200, 205, 232)); panel2.setLayout(new FormLayout("default:grow", "fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow, fill:default:grow")); //---- label_resourcesTitle ---- label_resourcesTitle.setText("Title"); label_resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesTitle, Resources.class, Resources.PROPERTYNAME_TITLE); panel2.add(label_resourcesTitle, cc.xy(1, 1)); //======== scrollPane2 ======== { //---- resourcesTitle ---- resourcesTitle.setRows(4); resourcesTitle.setLineWrap(true); resourcesTitle.setWrapStyleWord(true); resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane2.setViewportView(resourcesTitle); } panel2.add(scrollPane2, cc.xy(1, 2)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } panel2.add(tagApplicatorPanel, cc.xy(1, 3)); //======== panel38 ======== { panel38.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel38.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel38.setBackground(new Color(182, 187, 212)); panel38.setLayout(new FormLayout("60px:grow", "fill:default:grow")); //======== panel35 ======== { panel35.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.setOpaque(false); panel35.setBorder(Borders.DLU2_BORDER); panel35.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesDateExpression ---- label_resourcesDateExpression.setText("Date Expression"); label_resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateExpression, Resources.class, Resources.PROPERTYNAME_DATE_EXPRESSION); panel35.add(label_resourcesDateExpression, cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- resourcesDateExpression ---- resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateExpression, new CellConstraints(4, 1, 5, 1, CellConstraints.DEFAULT, CellConstraints.TOP, new Insets(0, 0, 0, 5))); //---- Date1Label1 ---- Date1Label1.setText("Inclusive Dates"); Date1Label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(Date1Label1, new CellConstraints(2, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesDateBegin ---- label_resourcesDateBegin.setText("Begin"); label_resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateBegin, Resources.class, Resources.PROPERTYNAME_DATE_BEGIN); panel35.add(label_resourcesDateBegin, cc.xy(4, 3)); //---- resourcesDateBegin ---- resourcesDateBegin.setColumns(4); resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateBegin, cc.xywh(6, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesDateEnd ---- label_resourcesDateEnd.setText("End"); label_resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateEnd, Resources.class, Resources.PROPERTYNAME_DATE_END); panel35.add(label_resourcesDateEnd, cc.xy(8, 3)); //---- resourcesDateEnd ---- resourcesDateEnd.setColumns(4); resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateEnd, new CellConstraints(10, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); //---- BulkDatesLabel ---- BulkDatesLabel.setText("Bulk Dates"); BulkDatesLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(BulkDatesLabel, new CellConstraints(2, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesBulkDateBegin ---- label_resourcesBulkDateBegin.setText("Begin"); label_resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateBegin, Resources.class, Resources.PROPERTYNAME_BULK_DATE_BEGIN); panel35.add(label_resourcesBulkDateBegin, cc.xy(4, 5)); //---- resourcesBulkDateBegin ---- resourcesBulkDateBegin.setColumns(4); resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateBegin, cc.xywh(6, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesBulkDateEnd ---- label_resourcesBulkDateEnd.setText("End"); label_resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateEnd, Resources.class, Resources.PROPERTYNAME_BULK_DATE_END); panel35.add(label_resourcesBulkDateEnd, cc.xy(8, 5)); //---- resourcesBulkDateEnd ---- resourcesBulkDateEnd.setColumns(4); resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateEnd, new CellConstraints(10, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); } panel38.add(panel35, cc.xy(1, 1)); } panel2.add(panel38, cc.xy(1, 4)); //======== panel3 ======== { panel3.setBackground(new Color(200, 205, 232)); panel3.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("200px") }, RowSpec.decodeSpecs("fill:default:grow"))); //---- label_resourcesLanguageCode ---- label_resourcesLanguageCode.setText("Language"); label_resourcesLanguageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode, Resources.class, Resources.PROPERTYNAME_LANGUAGE_CODE); panel3.add(label_resourcesLanguageCode, cc.xy(1, 1)); //---- resourcesLanguageCode ---- resourcesLanguageCode.setMaximumSize(new Dimension(50, 27)); resourcesLanguageCode.setOpaque(false); resourcesLanguageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.add(resourcesLanguageCode, cc.xywh(2, 1, 2, 1)); } panel2.add(panel3, cc.xy(1, 5)); //======== panel37 ======== { panel37.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel37.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel37.setBackground(new Color(182, 187, 212)); panel37.setLayout(new FormLayout("60px:grow", "fill:default:grow")); //======== panel20 ======== { panel20.setOpaque(false); panel20.setBorder(Borders.DLU2_BORDER); panel20.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- ExtentLabel ---- ExtentLabel.setText("Extent"); ExtentLabel.setForeground(new Color(0, 0, 102)); ExtentLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel20.add(ExtentLabel, cc.xywh(1, 1, 2, 1)); //======== panel21 ======== { panel21.setOpaque(false); panel21.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_resourcesExtentNumber ---- label_resourcesExtentNumber.setText("Extent"); label_resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber, Resources.class, Resources.PROPERTYNAME_EXTENT_NUMBER); panel21.add(label_resourcesExtentNumber, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesExtentNumber ---- resourcesExtentNumber.setColumns(4); resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(resourcesExtentNumber, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- extentType ---- extentType.setOpaque(false); extentType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(extentType, new CellConstraints(5, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } panel20.add(panel21, cc.xy(2, 3)); //---- label_resourcesExtentDescription ---- label_resourcesExtentDescription.setText("Container Summary"); label_resourcesExtentDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription, Resources.class, Resources.PROPERTYNAME_CONTAINER_SUMMARY); panel20.add(label_resourcesExtentDescription, cc.xy(2, 5)); //======== scrollPane422 ======== { scrollPane422.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane422.setOpaque(false); scrollPane422.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary ---- containerSummary.setRows(4); containerSummary.setWrapStyleWord(true); containerSummary.setLineWrap(true); containerSummary.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane422.setViewportView(containerSummary); } panel20.add(scrollPane422, new CellConstraints(1, 7, 2, 1, CellConstraints.DEFAULT, CellConstraints.FILL, new Insets(0, 15, 5, 5))); } panel37.add(panel20, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel2.add(panel37, cc.xy(1, 6)); //---- label_resourcesLanguageNote ---- label_resourcesLanguageNote.setText("Repository Processing Note"); label_resourcesLanguageNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageNote, Resources.class, Resources.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE); panel2.add(label_resourcesLanguageNote, cc.xy(1, 7)); //======== scrollPane423 ======== { scrollPane423.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane423.setOpaque(false); scrollPane423.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesLanguageNote ---- resourcesLanguageNote.setRows(4); resourcesLanguageNote.setLineWrap(true); resourcesLanguageNote.setWrapStyleWord(true); resourcesLanguageNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane423.setViewportView(resourcesLanguageNote); } panel2.add(scrollPane423, cc.xy(1, 8)); //======== panel6 ======== { panel6.setOpaque(false); panel6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel6.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_agreementReceived2 ---- label_agreementReceived2.setText("Repository:"); label_agreementReceived2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_agreementReceived2, Resources.class, Resources.PROPERTYNAME_REPOSITORY); panel6.add(label_agreementReceived2, cc.xy(1, 1)); //---- repositoryName ---- repositoryName.setEditable(false); repositoryName.setOpaque(false); repositoryName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryName.setBorder(null); panel6.add(repositoryName, cc.xy(3, 1)); //---- changeRepositoryButton ---- changeRepositoryButton.setText("Change"); changeRepositoryButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); changeRepositoryButton.setOpaque(false); changeRepositoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeRepositoryButtonActionPerformed(); } }); panel6.add(changeRepositoryButton, cc.xywh(5, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } panel2.add(panel6, cc.xy(1, 9)); } add(panel2, cc.xy(1, 1)); //---- separator2 ---- separator2.setForeground(new Color(147, 131, 86)); separator2.setOrientation(SwingConstants.VERTICAL); add(separator2, cc.xy(3, 1)); //======== panel13 ======== { panel13.setOpaque(false); panel13.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.setBorder(Borders.DLU2_BORDER); panel13.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC })); //======== panel12 ======== { panel12.setBackground(new Color(231, 188, 251)); panel12.setOpaque(false); panel12.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel12.getLayout()).setColumnGroups(new int[][] { { 3, 5, 7, 9 } }); //---- label_resourceIdentifier1 ---- label_resourceIdentifier1.setText("Resource ID"); label_resourceIdentifier1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourceIdentifier1, Resources.class, Resources.PROPERTYNAME_RESOURCE_IDENTIFIER); panel12.add(label_resourceIdentifier1, cc.xy(1, 1)); //---- resourceIdentifier1 ---- resourceIdentifier1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(resourceIdentifier1, cc.xy(3, 1)); //---- resourceIdentifier2 ---- resourceIdentifier2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(resourceIdentifier2, cc.xy(5, 1)); //---- resourceIdentifier3 ---- resourceIdentifier3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(resourceIdentifier3, cc.xy(7, 1)); //---- resourceIdentifier4 ---- resourceIdentifier4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(resourceIdentifier4, cc.xy(9, 1)); } panel13.add(panel12, cc.xy(1, 1)); //======== panel19 ======== { panel19.setOpaque(false); panel19.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel19.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), new ColumnSpec(Sizes.DLUX3), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_resourcesLevel ---- label_resourcesLevel.setText("Level"); label_resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLevel, Resources.class, Resources.PROPERTYNAME_LEVEL); panel19.add(label_resourcesLevel, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesLevel ---- resourcesLevel.setOpaque(false); resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesLevel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { resourcesLevelActionPerformed(); } }); panel19.add(resourcesLevel, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_otherLevel ---- label_otherLevel.setText("Other Level"); label_otherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_otherLevel, Resources.class, Resources.PROPERTYNAME_OTHER_LEVEL); panel19.add(label_otherLevel, cc.xy(5, 1)); //---- resourcesOtherLevel ---- resourcesOtherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel19.add(resourcesOtherLevel, new CellConstraints(7, 1, 3, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(0, 0, 0, 5))); } panel13.add(panel19, cc.xy(1, 3)); //---- label_repositoryName5 ---- label_repositoryName5.setText("Identifiers"); label_repositoryName5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.add(label_repositoryName5, cc.xy(1, 5)); //======== scrollPane9 ======== { scrollPane9.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane9.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane9.setPreferredSize(new Dimension(200, 104)); //---- identifiersTable ---- identifiersTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); identifiersTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { identifiersMouseClicked(e); } }); scrollPane9.setViewportView(identifiersTable); } panel13.add(scrollPane9, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel23 ======== { panel23.setBackground(new Color(231, 188, 251)); panel23.setOpaque(false); panel23.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel23.setMinimumSize(new Dimension(100, 29)); panel23.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- addIdentifier ---- addIdentifier.setText("Add Identifier"); addIdentifier.setOpaque(false); addIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addIdentifierActionPerformed(); } }); panel23.add(addIdentifier, cc.xy(1, 1)); //---- removeIdentifier ---- removeIdentifier.setText("Remove Identifier"); removeIdentifier.setOpaque(false); removeIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeIdentifierActionPerformed(); } }); panel23.add(removeIdentifier, cc.xy(3, 1)); } panel13.add(panel23, cc.xywh(1, 9, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label1 ---- label1.setText("Instances"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label1, Resources.class, ResourcesComponents.PROPERTYNAME_INSTANCES); panel13.add(label1, cc.xy(1, 11)); //======== scrollPane6 ======== { scrollPane6.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane6.setOpaque(false); scrollPane6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- instancesTable ---- instancesTable.setPreferredScrollableViewportSize(new Dimension(200, 75)); instancesTable.setRowHeight(20); instancesTable.setFocusable(false); instancesTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { instancesTableMouseClicked(e); } }); scrollPane6.setViewportView(instancesTable); } panel13.add(scrollPane6, cc.xywh(1, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel29 ======== { panel29.setBackground(new Color(231, 188, 251)); panel29.setOpaque(false); panel29.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel29.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- addInstanceButton ---- addInstanceButton.setText("Add Instance"); addInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addInstanceButton.setOpaque(false); addInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addInstanceButtonActionPerformed(); } }); panel29.add(addInstanceButton, cc.xy(1, 1)); //---- removeInstanceButton ---- removeInstanceButton.setText("Remove Instance"); removeInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeInstanceButton.setOpaque(false); removeInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeInstanceButtonActionPerformed(); } }); panel29.add(removeInstanceButton, cc.xy(3, 1)); } panel13.add(panel29, cc.xywh(1, 15, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- restrictionsApply ---- restrictionsApply.setText("Restrictions Apply"); restrictionsApply.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); restrictionsApply.setOpaque(false); restrictionsApply.setText( ATFieldInfo.getLabel(Resources.class, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY)); panel13.add(restrictionsApply, cc.xy(1, 17)); //---- OtherAccessionsLabel ---- OtherAccessionsLabel.setText("Accessions linked to this Resource ID:"); OtherAccessionsLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.add(OtherAccessionsLabel, cc.xy(1, 19)); //======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setPreferredSize(new Dimension(300, 100)); scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- accessionsTable ---- accessionsTable.setPreferredScrollableViewportSize(new Dimension(300, 100)); accessionsTable.setFocusable(false); scrollPane4.setViewportView(accessionsTable); } panel13.add(scrollPane4, cc.xywh(1, 21, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } add(panel13, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:au.gov.nla.atplugin.multiplecomponentidentifiers.panel.ResourceComponentBasicInfoPanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel7 = new JPanel(); label_resourcesTitle = new JLabel(); scrollPane42 = new JScrollPane(); resourcesTitle = ATBasicComponentFactory .createTextArea(detailsModel.getModel(ArchDescription.PROPERTYNAME_TITLE), false); tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory .createUnboundComboBox(InLineTagsUtils.getInLineTagList(InLineTagsUtils.TITLE)); panel38 = new JPanel(); panel35 = new JPanel(); label_resourcesDateExpression = new JLabel(); resourcesDateExpression = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescription.PROPERTYNAME_DATE_EXPRESSION), false); Date1Label1 = new JLabel(); label_resourcesDateBegin = new JLabel(); resourcesDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_BEGIN); label_resourcesDateEnd = new JLabel(); resourcesDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_END); BulkDatesLabel = new JLabel(); label_resourcesBulkDateBegin = new JLabel(); resourcesBulkDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_BEGIN); label_resourcesBulkDateEnd = new JLabel(); resourcesBulkDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_END); panel9 = new JPanel(); label_resourcesLanguageCode2 = new JLabel(); resourcesLanguageCode = ATBasicComponentFactory.createComboBox(detailsModel, ResourcesComponents.PROPERTYNAME_LANGUAGE_CODE, ResourcesComponents.class); panel5 = new JPanel(); panel20 = new JPanel(); ExtentLabel = new JLabel(); panel21 = new JPanel(); label_resourcesExtentNumber = new JLabel(); resourcesExtentNumber = ATBasicComponentFactory.createDoubleField(detailsModel, Resources.PROPERTYNAME_EXTENT_NUMBER); extentType = ATBasicComponentFactory.createComboBox(detailsModel, Resources.PROPERTYNAME_EXTENT_TYPE, Resources.class); label_resourcesExtentDescription = new JLabel(); scrollPane422 = new JScrollPane(); containerSummary = ATBasicComponentFactory .createTextArea(detailsModel.getModel(Resources.PROPERTYNAME_CONTAINER_SUMMARY), false); panel23 = new JPanel(); label_resourcesLanguageNote2 = new JLabel(); scrollPane423 = new JScrollPane(); resourcesLanguageNote = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ResourcesComponents.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE), false); separator2 = new JSeparator(); panel10 = new JPanel(); panel3 = new JPanel(); label_resourcesLevel = new JLabel(); resourcesLevel = ATBasicComponentFactory.createComboBox(detailsModel, ResourcesComponents.PROPERTYNAME_LEVEL, ResourcesComponents.class); label3 = new JLabel(); resourcesDateBegin2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(ResourcesComponents.PROPERTYNAME_PERSISTENT_ID)); label_otherLevel = new JLabel(); resourcesOtherLevel = ATBasicComponentFactory .createTextField(detailsModel.getModel(ResourcesComponents.PROPERTYNAME_OTHER_LEVEL), false); label_repositoryName5 = new JLabel(); scrollPane9 = new JScrollPane(); identifiersTable = new DomainSortableTable(); panel25 = new JPanel(); addIdentifier = new JButton(); removeIdentifier = new JButton(); label1 = new JLabel(); scrollPane4 = new JScrollPane(); instancesTable = new DomainSortableTable(ArchDescriptionInstances.class, ArchDescriptionInstances.PROPERTYNAME_INSTANCE_TYPE); panel24 = new JPanel(); addInstanceButton = new JButton(); removeInstanceButton = new JButton(); panel4 = new JPanel(); restrictionsApply2 = ATBasicComponentFactory.createCheckBox(detailsModel, ResourcesComponents.PROPERTYNAME_INTERNAL_ONLY, ResourcesComponents.class); resourcesRestrictionsApply = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY, ResourcesComponents.class); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.5), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;350px):grow") }, RowSpec.decodeSpecs("default"))); //======== panel7 ======== {//from w w w .ja v a 2 s . c om panel7.setOpaque(false); panel7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel7.setBorder(Borders.DLU2_BORDER); panel7.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC }, new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label_resourcesTitle ---- label_resourcesTitle.setText("Title"); label_resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesTitle, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_TITLE); panel7.add(label_resourcesTitle, cc.xy(1, 1)); //======== scrollPane42 ======== { scrollPane42.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane42.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesTitle ---- resourcesTitle.setRows(4); resourcesTitle.setLineWrap(true); resourcesTitle.setWrapStyleWord(true); resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane42.setViewportView(resourcesTitle); } panel7.add(scrollPane42, cc.xywh(1, 3, 2, 1)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } panel7.add(tagApplicatorPanel, cc.xywh(1, 5, 2, 1)); //======== panel38 ======== { panel38.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel38.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel38.setBackground(new Color(182, 187, 212)); panel38.setLayout(new FormLayout("60px:grow", "fill:default:grow")); //======== panel35 ======== { panel35.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.setOpaque(false); panel35.setBorder(Borders.DLU2_BORDER); panel35.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesDateExpression ---- label_resourcesDateExpression.setText("Date Expression"); label_resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateExpression, Resources.class, Resources.PROPERTYNAME_DATE_EXPRESSION); panel35.add(label_resourcesDateExpression, cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- resourcesDateExpression ---- resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateExpression, new CellConstraints(4, 1, 5, 1, CellConstraints.DEFAULT, CellConstraints.TOP, new Insets(0, 0, 0, 5))); //---- Date1Label1 ---- Date1Label1.setText("Inclusive Dates"); Date1Label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(Date1Label1, new CellConstraints(2, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesDateBegin ---- label_resourcesDateBegin.setText("Begin"); label_resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateBegin, Resources.class, Resources.PROPERTYNAME_DATE_BEGIN); panel35.add(label_resourcesDateBegin, cc.xy(4, 3)); //---- resourcesDateBegin ---- resourcesDateBegin.setColumns(4); resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateBegin, cc.xywh(6, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesDateEnd ---- label_resourcesDateEnd.setText("End"); label_resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateEnd, Resources.class, Resources.PROPERTYNAME_DATE_END); panel35.add(label_resourcesDateEnd, cc.xy(8, 3)); //---- resourcesDateEnd ---- resourcesDateEnd.setColumns(4); resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateEnd, new CellConstraints(10, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); //---- BulkDatesLabel ---- BulkDatesLabel.setText("Bulk Dates"); BulkDatesLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(BulkDatesLabel, new CellConstraints(2, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesBulkDateBegin ---- label_resourcesBulkDateBegin.setText("Begin"); label_resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateBegin, Resources.class, Resources.PROPERTYNAME_BULK_DATE_BEGIN); panel35.add(label_resourcesBulkDateBegin, cc.xy(4, 5)); //---- resourcesBulkDateBegin ---- resourcesBulkDateBegin.setColumns(4); resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateBegin, cc.xywh(6, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesBulkDateEnd ---- label_resourcesBulkDateEnd.setText("End"); label_resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateEnd, Resources.class, Resources.PROPERTYNAME_BULK_DATE_END); panel35.add(label_resourcesBulkDateEnd, cc.xy(8, 5)); //---- resourcesBulkDateEnd ---- resourcesBulkDateEnd.setColumns(4); resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateEnd, new CellConstraints(10, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); } panel38.add(panel35, cc.xy(1, 1)); } panel7.add(panel38, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel9 ======== { panel9.setOpaque(false); panel9.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("left:min(default;200px)") }, RowSpec.decodeSpecs("default"))); //---- label_resourcesLanguageCode2 ---- label_resourcesLanguageCode2.setText("Lanaguage"); label_resourcesLanguageCode2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode2, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_LANGUAGE_CODE); panel9.add(label_resourcesLanguageCode2, cc.xy(1, 1)); //---- resourcesLanguageCode ---- resourcesLanguageCode.setMaximumSize(new Dimension(150, 32767)); resourcesLanguageCode.setOpaque(false); resourcesLanguageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel9.add(resourcesLanguageCode, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } panel7.add(panel9, cc.xy(1, 9)); //======== panel5 ======== { panel5.setBackground(new Color(182, 187, 212)); panel5.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel5.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== panel20 ======== { panel20.setOpaque(false); panel20.setBorder(Borders.DLU2_BORDER); panel20.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- ExtentLabel ---- ExtentLabel.setText("Extent"); ExtentLabel.setForeground(new Color(0, 0, 102)); ExtentLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel20.add(ExtentLabel, cc.xywh(1, 1, 2, 1)); //======== panel21 ======== { panel21.setOpaque(false); panel21.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_resourcesExtentNumber ---- label_resourcesExtentNumber.setText("Extent"); label_resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber, Resources.class, Resources.PROPERTYNAME_EXTENT_NUMBER); panel21.add(label_resourcesExtentNumber, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesExtentNumber ---- resourcesExtentNumber.setColumns(4); resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(resourcesExtentNumber, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- extentType ---- extentType.setOpaque(false); extentType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(extentType, new CellConstraints(5, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } panel20.add(panel21, cc.xy(2, 3)); //---- label_resourcesExtentDescription ---- label_resourcesExtentDescription.setText("Container Summary"); label_resourcesExtentDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription, Resources.class, Resources.PROPERTYNAME_CONTAINER_SUMMARY); panel20.add(label_resourcesExtentDescription, cc.xy(2, 5)); //======== scrollPane422 ======== { scrollPane422.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane422.setOpaque(false); scrollPane422.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary ---- containerSummary.setRows(4); containerSummary.setWrapStyleWord(true); containerSummary.setLineWrap(true); containerSummary.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane422.setViewportView(containerSummary); } panel20.add(scrollPane422, new CellConstraints(1, 7, 2, 1, CellConstraints.DEFAULT, CellConstraints.FILL, new Insets(0, 15, 5, 5))); } panel5.add(panel20, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel7.add(panel5, cc.xy(1, 11)); //======== panel23 ======== { panel23.setOpaque(false); panel23.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel23.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label_resourcesLanguageNote2 ---- label_resourcesLanguageNote2.setText("Repository Processing Note"); label_resourcesLanguageNote2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageNote2, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE); panel23.add(label_resourcesLanguageNote2, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 0))); //======== scrollPane423 ======== { scrollPane423.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane423.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesLanguageNote ---- resourcesLanguageNote.setRows(4); resourcesLanguageNote.setWrapStyleWord(true); resourcesLanguageNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane423.setViewportView(resourcesLanguageNote); } panel23.add(scrollPane423, new CellConstraints(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 0))); } panel7.add(panel23, cc.xy(1, 13)); } add(panel7, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- separator2 ---- separator2.setForeground(new Color(147, 131, 86)); separator2.setOrientation(SwingConstants.VERTICAL); add(separator2, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //======== panel10 ======== { panel10.setOpaque(false); panel10.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel10.setBorder(Borders.DLU2_BORDER); panel10.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel3 ======== { panel3.setOpaque(false); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.MIN_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesLevel ---- label_resourcesLevel.setText("Level"); label_resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLevel, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_LEVEL); panel3.add(label_resourcesLevel, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesLevel ---- resourcesLevel.setOpaque(false); resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesLevel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { resourcesLevelActionPerformed(); } }); panel3.add(resourcesLevel, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label3 ---- label3.setText("Persistent ID"); label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label3, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_PERSISTENT_ID); panel3.add(label3, cc.xy(1, 3)); //---- resourcesDateBegin2 ---- resourcesDateBegin2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesDateBegin2.setEditable(false); resourcesDateBegin2.setOpaque(false); panel3.add(resourcesDateBegin2, cc.xywh(3, 3, 3, 1)); //---- label_otherLevel ---- label_otherLevel.setText("Other Level"); label_otherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_otherLevel, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_OTHER_LEVEL); panel3.add(label_otherLevel, cc.xywh(1, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesOtherLevel ---- resourcesOtherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.add(resourcesOtherLevel, cc.xywh(3, 5, 3, 1)); } panel10.add(panel3, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_repositoryName5 ---- label_repositoryName5.setText("Identifiers"); label_repositoryName5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel10.add(label_repositoryName5, cc.xy(1, 3)); //======== scrollPane9 ======== { scrollPane9.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane9.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane9.setPreferredSize(new Dimension(200, 104)); //---- identifiersTable ---- identifiersTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); identifiersTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { identifiersMouseClicked(e); } }); scrollPane9.setViewportView(identifiersTable); } panel10.add(scrollPane9, cc.xywh(1, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel25 ======== { panel25.setBackground(new Color(231, 188, 251)); panel25.setOpaque(false); panel25.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel25.setMinimumSize(new Dimension(100, 29)); panel25.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addIdentifier ---- addIdentifier.setText("Add Identifier"); addIdentifier.setOpaque(false); addIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addIdentifierActionPerformed(); } }); panel25.add(addIdentifier, cc.xy(1, 1)); //---- removeIdentifier ---- removeIdentifier.setText("Remove Identifier"); removeIdentifier.setOpaque(false); removeIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeIdentifierActionPerformed(); } }); panel25.add(removeIdentifier, cc.xy(3, 1)); } panel10.add(panel25, cc.xywh(1, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label1 ---- label1.setText("Instances"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); label1.setBackground(new Color(238, 238, 238)); ATFieldInfo.assignLabelInfo(label1, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_INSTANCES); panel10.add(label1, cc.xywh(1, 9, 2, 1)); //======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- instancesTable ---- instancesTable.setPreferredScrollableViewportSize(new Dimension(200, 75)); instancesTable.setRowHeight(20); instancesTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { instancesTableMouseClicked(e); } }); scrollPane4.setViewportView(instancesTable); } panel10.add(scrollPane4, cc.xy(1, 11)); //======== panel24 ======== { panel24.setBackground(new Color(231, 188, 251)); panel24.setOpaque(false); panel24.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel24.setMinimumSize(new Dimension(100, 29)); panel24.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addInstanceButton ---- addInstanceButton.setBackground(new Color(231, 188, 251)); addInstanceButton.setText("Add Instance"); addInstanceButton.setOpaque(false); addInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addInstanceButtonActionPerformed(); } }); panel24.add(addInstanceButton, cc.xy(1, 1)); //---- removeInstanceButton ---- removeInstanceButton.setBackground(new Color(231, 188, 251)); removeInstanceButton.setText("Remove Instance"); removeInstanceButton.setOpaque(false); removeInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeInstanceButtonActionPerformed(); } }); panel24.add(removeInstanceButton, cc.xy(3, 1)); } panel10.add(panel24, cc.xywh(1, 13, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel4 ======== { panel4.setOpaque(false); panel4.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- restrictionsApply2 ---- restrictionsApply2.setBackground(new Color(231, 188, 251)); restrictionsApply2.setText("Internal Only"); restrictionsApply2.setOpaque(false); restrictionsApply2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); restrictionsApply2.setText(ATFieldInfo.getLabel(ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_INTERNAL_ONLY)); panel4.add(restrictionsApply2, cc.xy(1, 1)); //---- resourcesRestrictionsApply ---- resourcesRestrictionsApply.setBackground(new Color(231, 188, 251)); resourcesRestrictionsApply.setText("Restrictions Apply"); resourcesRestrictionsApply.setOpaque(false); resourcesRestrictionsApply.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesRestrictionsApply.setText(ATFieldInfo.getLabel(ResourcesComponents.class, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY)); panel4.add(resourcesRestrictionsApply, cc.xy(3, 1)); } panel10.add(panel4, cc.xy(1, 15)); } add(panel10, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:ca.parkie.portfinder.client.MainWindow.java
License:GNU General Public License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* w w w. j av a 2 s . c o m*/ */ private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); final JPanel panel1 = new JPanel(); panel1.setLayout(new FormLayout( "fill:d:noGrow,left:4dlu:noGrow,fill:100px:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:100px:grow", "center:30px:noGrow,top:3dlu:noGrow,center:30px:noGrow,top:3dlu:noGrow,center:30px:noGrow,top:3dlu:noGrow,center:30px:noGrow")); panel1.setPreferredSize(new Dimension(520, 160)); CellConstraints cc = new CellConstraints(); contentPane.add(panel1, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL, new Insets(11, 11, 11, 11))); final JLabel label1 = new JLabel(); label1.setFont(new Font(label1.getFont().getName(), label1.getFont().getStyle(), 14)); label1.setText("Room:"); panel1.add(label1, cc.xy(1, 1)); roomTextField = new JTextField(); roomTextField.setFont(new Font(roomTextField.getFont().getName(), roomTextField.getFont().getStyle(), 14)); panel1.add(roomTextField, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.CENTER)); sendButton = new JButton(); sendButton.setEnabled(false); sendButton.setFont(new Font(sendButton.getFont().getName(), sendButton.getFont().getStyle(), 14)); sendButton.setText("Send"); panel1.add(sendButton, cc.xyw(1, 7, 7, CellConstraints.DEFAULT, CellConstraints.FILL)); final JLabel label2 = new JLabel(); label2.setFont(new Font(label2.getFont().getName(), label2.getFont().getStyle(), 14)); label2.setText("Port Number:"); panel1.add(label2, cc.xy(5, 1)); final JLabel label3 = new JLabel(); label3.setFont(new Font(label3.getFont().getName(), label3.getFont().getStyle(), 14)); label3.setText("Interface:"); panel1.add(label3, cc.xy(1, 3)); encodedMacLabel = new JLabel(); encodedMacLabel .setFont(new Font(encodedMacLabel.getFont().getName(), encodedMacLabel.getFont().getStyle(), 14)); encodedMacLabel.setText("Invalid"); panel1.add(encodedMacLabel, cc.xyw(3, 5, 5, CellConstraints.LEFT, CellConstraints.DEFAULT)); interfaceLabel = new JLabel(); interfaceLabel .setFont(new Font(interfaceLabel.getFont().getName(), interfaceLabel.getFont().getStyle(), 14)); interfaceLabel.setText("Unknown"); panel1.add(interfaceLabel, cc.xy(3, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label4 = new JLabel(); label4.setFont(new Font(label4.getFont().getName(), label4.getFont().getStyle(), 14)); label4.setText("Encoded MAC:"); panel1.add(label4, cc.xy(1, 5)); final JLabel label5 = new JLabel(); label5.setFont(new Font(label5.getFont().getName(), label5.getFont().getStyle(), 14)); label5.setText("Link Status:"); panel1.add(label5, cc.xy(5, 3)); linkStatusLabel = new JLabel(); linkStatusLabel .setFont(new Font(linkStatusLabel.getFont().getName(), linkStatusLabel.getFont().getStyle(), 14)); linkStatusLabel.setForeground(new Color(-3407872)); linkStatusLabel.setText("Unknown"); panel1.add(linkStatusLabel, cc.xy(7, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); portNumberTextField = new JTextField(); panel1.add(portNumberTextField, cc.xy(7, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); label1.setLabelFor(roomTextField); label2.setLabelFor(portNumberTextField); }
From source file:ca.parkie.portfinder.client.NetworkInterfaceDialog.java
License:GNU General Public License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from w ww . j a v a 2s . co m*/ */ private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); contentPane.setPreferredSize(new Dimension(370, 51)); final JPanel panel1 = new JPanel(); panel1.setLayout(new FormLayout( "fill:d:noGrow,left:4dlu:noGrow,fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:30px:noGrow")); CellConstraints cc = new CellConstraints(); contentPane.add(panel1, new CellConstraints(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.FILL, new Insets(11, 11, 11, 11))); final JLabel label1 = new JLabel(); label1.setText("Select the network interface to use:"); panel1.add(label1, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); networkInterfaceCombo = new JComboBox(); panel1.add(networkInterfaceCombo, cc.xy(3, 1)); okButton = new JButton(); okButton.setEnabled(false); okButton.setText("Ok"); panel1.add(okButton, cc.xy(5, 1)); label1.setLabelFor(networkInterfaceCombo); }
From source file:com.archivas.clienttools.arcmover.gui.ssl.SSLCertificateForm.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR * call it in your code!//from w w w . jav a2s . c o m * * @noinspection ALL */ private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); contentPane.setMinimumSize(new Dimension(400, 390)); tabbedPane1 = new JTabbedPane(); tabbedPane1.setMinimumSize(new Dimension(400, 200)); tabbedPane1.setOpaque(false); tabbedPane1.setPreferredSize(new Dimension(400, 200)); CellConstraints cc = new CellConstraints(); contentPane.add(tabbedPane1, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); final JPanel panel1 = new JPanel(); panel1.setLayout(new FormLayout("fill:6dlu:noGrow,right:d:noGrow,fill:d:grow,left:5dlu:noGrow", "center:7dlu:noGrow,center:max(d;4px):noGrow,center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:16px:noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,top:15px:grow,top:4dlu:noGrow,center:d:grow,center:18px:noGrow,top:15dlu:noGrow")); panel1.setMinimumSize(new Dimension(400, 220)); panel1.setPreferredSize(new Dimension(400, 220)); tabbedPane1.addTab("General", panel1); final JLabel label1 = new JLabel(); label1.setName("Issued to:"); label1.setText("Common Name (CN)"); panel1.add(label1, cc.xy(2, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); issuedToCommonNameLabel = new JLabel(); issuedToCommonNameLabel.setText("Issued to Value"); panel1.add(issuedToCommonNameLabel, cc.xy(3, 3)); final JLabel label2 = new JLabel(); label2.setText("Common Name (CN)"); panel1.add(label2, cc.xy(2, 14)); issuedByCommonNameLabel = new JLabel(); issuedByCommonNameLabel.setText("Issued by Value"); panel1.add(issuedByCommonNameLabel, cc.xy(3, 14)); final JLabel label3 = new JLabel(); label3.setText("Valid From"); panel1.add(label3, cc.xy(2, 22)); validDateRangeLabel = new JLabel(); validDateRangeLabel.setAutoscrolls(false); validDateRangeLabel.setText("Valid from Value"); panel1.add(validDateRangeLabel, cc.xy(3, 22)); final JLabel label4 = new JLabel(); label4.setText("MD5 Fingerprint"); panel1.add(label4, cc.xy(2, 27)); md5FingerprintLabel = new JLabel(); md5FingerprintLabel.setAutoscrolls(true); md5FingerprintLabel.setEnabled(true); md5FingerprintLabel.setText("MD5 Fingerprint value"); panel1.add(md5FingerprintLabel, cc.xy(3, 27)); final JLabel label5 = new JLabel(); label5.setText("Organization (O)"); panel1.add(label5, cc.xy(2, 5)); issuedToOrganizationLabel = new JLabel(); issuedToOrganizationLabel.setText("Organization Value"); panel1.add(issuedToOrganizationLabel, cc.xy(3, 5)); final JLabel label6 = new JLabel(); label6.setFont(new Font(label6.getFont().getName(), Font.BOLD, label6.getFont().getSize())); label6.setText("Issued To"); panel1.add(label6, cc.xy(2, 2, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label7 = new JLabel(); label7.setFont(new Font(label7.getFont().getName(), Font.BOLD, label7.getFont().getSize())); label7.setText("Issued By"); panel1.add(label7, cc.xy(2, 11, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label8 = new JLabel(); label8.setText("Organization (O)"); panel1.add(label8, cc.xy(2, 16)); issuedByOrganizationLabel = new JLabel(); issuedByOrganizationLabel.setText("Organization Value"); panel1.add(issuedByOrganizationLabel, cc.xy(3, 16)); final JLabel label9 = new JLabel(); label9.setText("Organizational Unit (OU)"); panel1.add(label9, cc.xy(2, 7)); issuedToOrganizationalUnitLabel = new JLabel(); issuedToOrganizationalUnitLabel.setText("Organizational Unit Value"); panel1.add(issuedToOrganizationalUnitLabel, cc.xy(3, 7)); final JLabel label10 = new JLabel(); label10.setText("Organizational Unit (OU)"); panel1.add(label10, cc.xy(2, 18)); issuedByOrganizationalUnitLabel = new JLabel(); issuedByOrganizationalUnitLabel.setText("Organizational Unit Value"); panel1.add(issuedByOrganizationalUnitLabel, cc.xy(3, 18)); final JLabel label11 = new JLabel(); label11.setFont(new Font(label11.getFont().getName(), Font.BOLD, label11.getFont().getSize())); label11.setText("Validity"); panel1.add(label11, cc.xy(2, 20, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label12 = new JLabel(); label12.setFont(new Font(label12.getFont().getName(), Font.BOLD, label12.getFont().getSize())); label12.setText("Fingerprints"); panel1.add(label12, cc.xy(2, 24, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label13 = new JLabel(); label13.setText("Serial Number"); panel1.add(label13, cc.xy(2, 9)); serialNumberLabel = new JLabel(); serialNumberLabel.setEnabled(true); serialNumberLabel.setText("Serial Number Value"); panel1.add(serialNumberLabel, cc.xy(3, 9)); final JLabel label14 = new JLabel(); label14.setText("SHA1 Fingerprint"); panel1.add(label14, cc.xy(2, 25)); shaFingerprintLabel = new JLabel(); shaFingerprintLabel.setText("SHA1 Fingerprint vale"); panel1.add(shaFingerprintLabel, cc.xy(3, 25)); permStoreCertCheckBox = new JCheckBox(); permStoreCertCheckBox.setEnabled(false); permStoreCertCheckBox.setText("Permanently store this exception"); permStoreCertCheckBox.setToolTipText("Save this exception permanently"); permStoreCertCheckBox.setVisible(true); panel1.add(permStoreCertCheckBox, cc.xy(2, 33)); final JLabel label15 = new JLabel(); label15.setFont(new Font(label15.getFont().getName(), Font.BOLD, label15.getFont().getSize())); label15.setText("Other Warnings"); panel1.add(label15, cc.xy(2, 30, CellConstraints.LEFT, CellConstraints.DEFAULT)); otherWarnings = new JTextPane(); otherWarnings.setBackground(UIManager.getColor("Label.background")); otherWarnings.setEditable(false); panel1.add(otherWarnings, cc.xyw(2, 32, 2, CellConstraints.CENTER, CellConstraints.CENTER)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); tabbedPane1.addTab("Details", panel2); final JScrollPane scrollPane1 = new JScrollPane(); panel2.add(scrollPane1, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL)); detailsTextArea = new JTextArea(); detailsTextArea.setEditable(false); detailsTextArea.setEnabled(true); scrollPane1.setViewportView(detailsTextArea); }