List of usage examples for com.jgoodies.forms.layout Sizes MINIMUM
ComponentSize MINIMUM
To view the source code for com.jgoodies.forms.layout Sizes MINIMUM.
Click Source Link
From source file:PluginDetailPanel.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("PluginDetails"); titleSeparator = new JXTitledSeparator(); JLabel labelVersion = new JLabel(); versionLabel = new JLabel(); JLabel labelAuthor = new JLabel(); authorLabel = new JLabel(); JLabel labelServices = new JLabel(); servicesLabel = new JLabel(); checkboxPluginIsActive = new JCheckBox(); checkboxUpdatePlugins = new JCheckBox(); checkboxClipboardMonitoring = new JCheckBox(); JLabel labelMaxConnections = new JLabel(); spinnerMaxPluginConnections = new JSpinner(); JLabel labelPriority = new JLabel(); spinnerPluginPriority = new JSpinner(); btnPriorityUp = new JButton(); btnPriorityDown = new JButton(); pluginHyperlink = new JXHyperlink(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(new EmptyBorder(3, 3, 0, 2)); //---- titleSeparator ---- titleSeparator.setTitle(" "); //---- labelVersion ---- labelVersion.setText(bundle.getString("labelVersion.text")); //---- versionLabel ---- versionLabel.setText(bundle.getString("versionLabel.text")); //---- labelAuthor ---- labelAuthor.setText(bundle.getString("labelAuthor.text")); //---- authorLabel ---- authorLabel.setText(bundle.getString("authorLabel.text")); //---- labelServices ---- labelServices.setText(bundle.getString("labelServices.text")); //---- servicesLabel ---- servicesLabel.setText(bundle.getString("servicesLabel.text")); //---- checkboxPluginIsActive ---- checkboxPluginIsActive.setText(bundle.getString("checkboxPluginIsActive.text")); //---- checkboxUpdatePlugins ---- checkboxUpdatePlugins.setText(bundle.getString("checkboxUpdatePlugins.text")); //---- checkboxClipboardMonitoring ---- checkboxClipboardMonitoring.setText(bundle.getString("checkboxClipboardMonitoring.text")); //---- labelMaxConnections ---- labelMaxConnections.setText(bundle.getString("labelMaxConnections.text")); labelMaxConnections.setPreferredSize(new Dimension(180, 14)); labelMaxConnections.setLabelFor(spinnerMaxPluginConnections); //---- spinnerMaxPluginConnections ---- spinnerMaxPluginConnections.setModel(new SpinnerNumberModel(1, 1, null, 1)); //---- labelPriority ---- labelPriority.setText(bundle.getString("labelPriority.text")); labelPriority.setLabelFor(spinnerPluginPriority); //---- spinnerPluginPriority ---- spinnerPluginPriority.setModel(new SpinnerNumberModel(1, 1, 1000, 1)); //---- btnPriorityUp ---- btnPriorityUp.setText(bundle.getString("btnPriorityUp.text")); //---- btnPriorityDown ---- btnPriorityDown.setText(bundle.getString("btnPriorityDown.text")); //---- pluginHyperlink ---- pluginHyperlink.setText(bundle.getString("pluginHyperlink.text")); PanelBuilder builder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(pref;30dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.MINIMUM, FormSpec.DEFAULT_GROW) }, 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.LINE_GAP_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.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }), this); ((FormLayout) getLayout()).setColumnGroups(new int[][] { { 7, 9 } }); builder.add(titleSeparator, cc.xywh(1, 1, 11, 1)); builder.add(labelVersion, cc.xy(1, 3)); builder.add(versionLabel, cc.xywh(3, 3, 9, 1)); builder.add(labelAuthor, cc.xy(1, 5)); builder.add(authorLabel, cc.xywh(3, 5, 9, 1)); builder.add(labelServices, cc.xy(1, 7)); builder.add(servicesLabel, cc.xywh(3, 7, 7, 1)); builder.add(checkboxPluginIsActive, cc.xywh(1, 9, 11, 1)); builder.add(checkboxUpdatePlugins, cc.xywh(1, 11, 11, 1)); builder.add(checkboxClipboardMonitoring, cc.xywh(1, 13, 11, 1)); builder.add(labelMaxConnections, cc.xywh(1, 15, 3, 1)); builder.add(spinnerMaxPluginConnections, cc.xy(5, 15)); builder.add(labelPriority, cc.xywh(1, 17, 3, 1)); builder.add(spinnerPluginPriority, cc.xy(5, 17)); builder.add(btnPriorityUp, cc.xy(7, 17)); builder.add(btnPriorityDown, cc.xy(9, 17)); builder.add(pluginHyperlink, cc.xywh(1, 19, 9, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
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 ======== {//from w w w. j a va2s . 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:com.intellij.uiDesigner.radComponents.FormLayoutColumnProperties.java
License:Apache License
private Size getSelectedSize() { Size size;//from w w w . j a v a 2 s .c om if (myDefaultRadioButton.isSelected()) { size = Sizes.DEFAULT; } else if (myPreferredRadioButton.isSelected()) { size = Sizes.PREFERRED; } else if (myMinimumRadioButton.isSelected()) { size = Sizes.MINIMUM; } else { size = getConstantSize(myConstantSizeUnitsCombo, myConstantSizeSpinner); } if (myMinimumCheckBox.isSelected() || myMaximumCheckBox.isSelected()) { Size minSize = null; Size maxSize = null; if (myMinimumCheckBox.isSelected()) { minSize = getConstantSize(myMinSizeUnitsCombo, myMinSizeSpinner); } if (myMaximumCheckBox.isSelected()) { maxSize = getConstantSize(myMaxSizeUnitsCombo, myMaxSizeSpinner); } size = Sizes.bounded(size, minSize, maxSize); } return size; }
From source file:cz.vity.freerapid.gui.dialogs.userprefs.PluginDetailPanel.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("PluginDetails"); titleSeparator = new JXTitledSeparator(); JLabel labelVersion = new JLabel(); versionLabel = new JLabel(); JLabel labelAuthor = new JLabel(); authorLabel = new JLabel(); JLabel labelServices = new JLabel(); servicesLabel = new JLabel(); checkboxPluginIsActive = new JCheckBox(); checkboxUpdatePlugins = new JCheckBox(); checkboxClipboardMonitoring = new JCheckBox(); JLabel labelMaxConnections = new JLabel(); labelMaxConnections.setPreferredSize(new Dimension(80, 20)); labelMaxConnections.setMinimumSize(new Dimension(80, 20)); spinnerMaxPluginConnections = new JSpinner(); JLabel labelPriority = new JLabel(); spinnerPluginPriority = new JSpinner(); btnPriorityUp = new JButton(); btnPriorityDown = new JButton(); pluginHyperlink = new JXHyperlink(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(new EmptyBorder(3, 3, 0, 2)); //---- titleSeparator ---- titleSeparator.setTitle(" "); //---- labelVersion ---- labelVersion.setName("labelVersion"); //---- versionLabel ---- versionLabel.setName("versionLabel"); //---- labelAuthor ---- labelAuthor.setName("labelAuthor"); //---- authorLabel ---- authorLabel.setName("authorLabel"); //---- labelServices ---- labelServices.setName("labelServices"); //---- servicesLabel ---- servicesLabel.setName("servicesLabel"); //---- checkboxPluginIsActive ---- checkboxPluginIsActive.setName("checkboxPluginIsActive"); //---- checkboxUpdatePlugins ---- checkboxUpdatePlugins.setName("checkboxUpdatePlugins"); //---- checkboxClipboardMonitoring ---- checkboxClipboardMonitoring.setName("checkboxClipboardMonitoring"); //---- labelMaxConnections ---- labelMaxConnections.setName("labelMaxConnections"); labelMaxConnections.setPreferredSize(new Dimension(180, 14)); //---- spinnerMaxPluginConnections ---- spinnerMaxPluginConnections.setModel(new SpinnerNumberModel(1, 1, null, 1)); //---- labelPriority ---- labelPriority.setName("labelPriority"); //---- spinnerPluginPriority ---- spinnerPluginPriority.setModel(new SpinnerNumberModel(1, 1, 1000, 1)); //---- btnPriorityUp ---- btnPriorityUp.setName("btnPriorityUp"); //---- btnPriorityDown ---- btnPriorityDown.setName("btnPriorityDown"); //---- pluginHyperlink ---- pluginHyperlink.setName("pluginHyperlink"); PanelBuilder builder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(pref;30dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.MINIMUM, FormSpec.DEFAULT_GROW) }, 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.LINE_GAP_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.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }), this); ((FormLayout) getLayout()).setColumnGroups(new int[][] { { 7, 9 } }); builder.add(titleSeparator, cc.xywh(1, 1, 11, 1)); builder.add(labelVersion, cc.xy(1, 3)); builder.add(versionLabel, cc.xywh(3, 3, 9, 1)); builder.add(labelAuthor, cc.xy(1, 5)); builder.add(authorLabel, cc.xywh(3, 5, 9, 1)); builder.add(labelServices, cc.xy(1, 7)); builder.add(servicesLabel, cc.xywh(3, 7, 7, 1)); builder.add(checkboxPluginIsActive, cc.xywh(1, 9, 11, 1)); builder.add(checkboxUpdatePlugins, cc.xywh(1, 11, 11, 1)); builder.add(checkboxClipboardMonitoring, cc.xywh(1, 13, 11, 1)); builder.add(labelMaxConnections, cc.xywh(1, 15, 3, 1)); builder.add(spinnerMaxPluginConnections, cc.xy(5, 15)); builder.add(labelPriority, cc.xywh(1, 17, 3, 1)); builder.add(spinnerPluginPriority, cc.xy(5, 17)); builder.add(btnPriorityUp, cc.xy(7, 17)); builder.add(btnPriorityDown, cc.xy(9, 17)); builder.add(pluginHyperlink, cc.xywh(1, 19, 9, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.dialogs.BYU_ResourceLookup.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); lookupTable = new DomainSortableTable(Resources.class, filterField); label1 = new JLabel(); filterField = new JTextField(); buttonBar = new JPanel(); select = new JButton(); linkButton = new JButton(); createButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from ww w .j a va2 s. c o m*/ setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(); } }); Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 35, 45)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Lookup Resource"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_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), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Resource to select it."); contentPane.add(label3, cc.xywh(2, 2, 3, 1)); //---- label4 ---- label4.setText("Or hit enter if a Resource is highlighted."); contentPane.add(label4, cc.xywh(2, 4, 3, 1)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- lookupTable ---- lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); lookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lookupTableMouseClicked(e); } }); lookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { lookupTableKeyTyped(e); } }); scrollPane1.setViewportView(lookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1)); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 8)); contentPane.add(filterField, cc.xy(4, 8)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- select ---- select.setText("Select"); select.setOpaque(false); select.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectActionPerformed(); } }); buttonBar.add(select, cc.xy(1, 1)); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBar.add(linkButton, cc.xy(3, 1)); //---- createButton ---- createButton.setText("Create Resource"); createButton.setOpaque(false); createButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createButtonActionPerformed(e); } }); buttonBar.add(createButton, cc.xy(5, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(7, 1)); } contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.AccessionLookup.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); lookupTable = new DomainSortableTable(Resources.class, filterField); label1 = new JLabel(); filterField = new JTextField(); buttonBar = new JPanel(); linkButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);// w w w .j a v a2s . com setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(); } }); Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 35, 45)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Lookup Accession"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_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), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Accession to select it."); contentPane.add(label3, cc.xywh(2, 2, 3, 1)); //---- label4 ---- label4.setText("Or hit enter if a Accession is highlighted."); contentPane.add(label4, cc.xywh(2, 4, 3, 1)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- lookupTable ---- lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); lookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lookupTableMouseClicked(e); } }); lookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { lookupTableKeyTyped(e); } }); scrollPane1.setViewportView(lookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1)); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 8)); contentPane.add(filterField, cc.xy(4, 8)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBar.add(linkButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(7, 1)); } contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.AssessmentManagement.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); panel2 = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPanel = new JPanel(); panel1 = new JPanel(); label2 = new JLabel(); filterField = new JTextField(); scrollPane1 = new JScrollPane(); contentTable = new DomainSortableTable(AssessmentsSearchResult.class, filterField); buttonBar = new JPanel(); button1 = new JButton(); button2 = new JButton(); reportsButton = new JButton(); addRecordButton = new JButton(); removeRecordButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);// w w w. j a va 2 s.com Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== panel2 ======== { panel2.setBackground(new Color(80, 69, 57)); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Administration"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); panel2.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel2, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Assessment"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.RELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Filter:"); panel1.add(label2, cc.xy(1, 1)); panel1.add(filterField, cc.xy(3, 1)); } contentPanel.add(panel1, cc.xy(2, 2)); //======== scrollPane1 ======== { //---- contentTable ---- contentTable.setPreferredScrollableViewportSize(new Dimension(800, 400)); contentTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { contentTableMouseClicked(e); } }); scrollPane1.setViewportView(contentTable); } contentPanel.add(scrollPane1, cc.xy(2, 4)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.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, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- button1 ---- button1.setText("Search"); button1.setOpaque(false); button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { searchActionPerformed(); } }); buttonBar.add(button1, cc.xy(2, 1)); //---- button2 ---- button2.setText("List All"); button2.setSelectedIcon(null); button2.setOpaque(false); button2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { refreshActionPerformed(); } }); buttonBar.add(button2, cc.xy(4, 1)); //---- reportsButton ---- reportsButton.setText("Reports"); reportsButton.setOpaque(false); reportsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { reportButtonActionPerformed(e); } }); buttonBar.add(reportsButton, cc.xy(6, 1)); //---- addRecordButton ---- addRecordButton.setText("Add Record"); addRecordButton.setOpaque(false); addRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addRecordButtonActionPerformed(e); } }); buttonBar.add(addRecordButton, cc.xy(8, 1)); //---- removeRecordButton ---- removeRecordButton.setText("Remove Record"); removeRecordButton.setOpaque(false); removeRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeRecordButtonActionPerformed(e); } }); buttonBar.add(removeRecordButton, cc.xy(10, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(14, 1)); } contentPanel.add(buttonBar, cc.xy(2, 6)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.BatchLocationCreation.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); panel2 = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); panel1 = new JPanel(); contentPanel = new JPanel(); label1 = new JLabel(); building = new JTextField(); label2 = new JLabel(); floor = new JTextField(); label3 = new JLabel(); room = new JTextField(); label4 = new JLabel(); area = new JTextField(); label12 = new JLabel(); label13 = new JLabel(); label14 = new JLabel(); label5 = new JLabel(); coordinate1Label = new JTextField(); coordinate1Start = new JTextField(); label6 = new JLabel(); coordinate1End = new JTextField(); label7 = new JLabel(); coordinate2Label = new JTextField(); coordinate2Start = new JTextField(); label9 = new JLabel(); coordinate2End = new JTextField(); label8 = new JLabel(); coordinate3Label = new JTextField(); coordinate3Start = new JTextField(); label10 = new JLabel(); coordinate3End = new JTextField(); label11 = new JLabel(); repository = new JComboBox(new DefaultComboBoxModel(Repositories.getRepositoryList())); buttonBar = new JPanel(); generateButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from w ww . j a v a2s. co m Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== panel2 ======== { panel2.setBackground(new Color(80, 69, 57)); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Project Management"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); panel2.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel2, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.RELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Batch Location Creation"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, cc.xy(1, 1)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setBorder(Borders.DLU4_BORDER); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { 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, FormFactory.LABEL_COMPONENT_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, 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 })); //---- label1 ---- label1.setText("Building"); ATFieldInfo.assignLabelInfo(label1, Locations.class, Locations.PROPERTYNAME_BUILDING); contentPanel.add(label1, cc.xy(1, 1)); contentPanel.add(building, cc.xywh(3, 1, 9, 1)); //---- label2 ---- label2.setText("Floor"); ATFieldInfo.assignLabelInfo(label2, Locations.class, Locations.PROPERTYNAME_FLOOR); contentPanel.add(label2, cc.xy(1, 3)); contentPanel.add(floor, cc.xywh(3, 3, 9, 1)); //---- label3 ---- label3.setText("Room"); ATFieldInfo.assignLabelInfo(label3, Locations.class, Locations.PROPERTYNAME_ROOM); contentPanel.add(label3, cc.xy(1, 5)); contentPanel.add(room, cc.xywh(3, 5, 9, 1)); //---- label4 ---- label4.setText("Area"); ATFieldInfo.assignLabelInfo(label4, Locations.class, Locations.PROPERTYNAME_AREA); contentPanel.add(label4, cc.xy(1, 7)); contentPanel.add(area, cc.xywh(3, 7, 9, 1)); //---- label12 ---- label12.setText("Label"); contentPanel.add(label12, cc.xy(3, 9)); //---- label13 ---- label13.setText("Start"); contentPanel.add(label13, cc.xy(5, 9)); //---- label14 ---- label14.setText("End"); contentPanel.add(label14, cc.xy(9, 9)); //---- label5 ---- label5.setText("Coordinate 1"); contentPanel.add(label5, cc.xy(1, 11)); //---- coordinate1Label ---- coordinate1Label.setColumns(8); contentPanel.add(coordinate1Label, cc.xy(3, 11)); //---- coordinate1Start ---- coordinate1Start.setColumns(3); contentPanel.add(coordinate1Start, cc.xy(5, 11)); //---- label6 ---- label6.setText("-"); contentPanel.add(label6, cc.xy(7, 11)); //---- coordinate1End ---- coordinate1End.setColumns(3); contentPanel.add(coordinate1End, cc.xy(9, 11)); //---- label7 ---- label7.setText("Coordinate 2"); contentPanel.add(label7, cc.xy(1, 13)); //---- coordinate2Label ---- coordinate2Label.setColumns(8); contentPanel.add(coordinate2Label, cc.xy(3, 13)); //---- coordinate2Start ---- coordinate2Start.setColumns(3); contentPanel.add(coordinate2Start, cc.xy(5, 13)); //---- label9 ---- label9.setText("-"); contentPanel.add(label9, cc.xy(7, 13)); //---- coordinate2End ---- coordinate2End.setColumns(3); contentPanel.add(coordinate2End, cc.xy(9, 13)); //---- label8 ---- label8.setText("Coordinate 3"); contentPanel.add(label8, cc.xy(1, 15)); //---- coordinate3Label ---- coordinate3Label.setColumns(8); contentPanel.add(coordinate3Label, cc.xy(3, 15)); //---- coordinate3Start ---- coordinate3Start.setColumns(3); contentPanel.add(coordinate3Start, cc.xy(5, 15)); //---- label10 ---- label10.setText("-"); contentPanel.add(label10, cc.xy(7, 15)); //---- coordinate3End ---- coordinate3End.setColumns(3); contentPanel.add(coordinate3End, cc.xy(9, 15)); //---- label11 ---- label11.setText("Repository"); label11.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label11, Locations.class, Locations.PROPERTYNAME_REPOSITORY); contentPanel.add(label11, cc.xy(1, 17)); //---- repository ---- repository.setOpaque(false); repository.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(repository, cc.xywh(3, 17, 9, 1)); } panel1.add(contentPanel, cc.xy(1, 1)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- generateButton ---- generateButton.setText("Generate"); generateButton.setOpaque(false); generateButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { generateButtonActionPerformed(e); } }); buttonBar.add(generateButton, cc.xy(2, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(4, 1)); } panel1.add(buttonBar, cc.xywh(1, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } dialogPane.add(panel1, cc.xy(1, 3)); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.DigitalObjectLookup.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); lookupTable = new DomainSortableTable(); label1 = new JLabel(); filterField = new JTextField(); buttonBar = new JPanel(); linkButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w.ja v a 2 s . c o m*/ setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(); } }); Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 35, 45)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Lookup Digital Object"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_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), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Digital Object to select it."); contentPane.add(label3, cc.xywh(2, 2, 3, 1)); //---- label4 ---- label4.setText("Or hit enter if a Digital Object is highlighted."); contentPane.add(label4, cc.xywh(2, 4, 3, 1)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- lookupTable ---- lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); lookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lookupTableMouseClicked(e); } }); lookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { lookupTableKeyTyped(e); } }); scrollPane1.setViewportView(lookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1)); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 8)); contentPane.add(filterField, cc.xy(4, 8)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBar.add(linkButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(7, 1)); } contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.LocationAssignmentAccessions.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label1 = new JLabel(); filterField = new JTextField(); scrollPane1 = new JScrollPane(); locationLookupTable = new DomainSortableTable(Locations.class, filterField); linkingPanel = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); noteContainerLabel = new JTextField(); note = new JTextField(); buttonBar = new JPanel(); linkLocationButton = new JButton(); createLocationButton = new JButton(); doneButton = new JButton(); selectPanel = new JPanel(); buttonBar2 = new JPanel(); selectButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w.jav a2 s . c o m*/ Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel .setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec( Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 69, 57)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Location Lookup"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_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.UNRELATED_GAP_ROWSPEC })); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 2)); contentPane.add(filterField, cc.xy(4, 2)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- locationLookupTable ---- locationLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); locationLookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { subjectLookupTableMouseClicked(e); } }); locationLookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { locationLookupTableKeyTyped(e); } }); scrollPane1.setViewportView(locationLookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 4, 3, 1)); //======== linkingPanel ======== { linkingPanel.setOpaque(false); linkingPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Location to add it to the record."); linkingPanel.add(label3, cc.xy(1, 1)); //---- label4 ---- label4.setText("Or hit enter if a Location is highlighted."); linkingPanel.add(label4, cc.xy(1, 3)); //---- noteContainerLabel ---- noteContainerLabel.setText("Note/Container information"); noteContainerLabel.setOpaque(false); noteContainerLabel.setBorder(null); linkingPanel.add(noteContainerLabel, cc.xy(1, 5)); linkingPanel.add(note, cc.xy(1, 7)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkLocationButton ---- linkLocationButton.setText("Link"); linkLocationButton.setOpaque(false); linkLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkLocationButtonActionPerformed(); } }); buttonBar.add(linkLocationButton, cc.xy(1, 1)); //---- createLocationButton ---- createLocationButton.setText("Create Location"); createLocationButton.setBackground(new Color(231, 188, 251)); createLocationButton.setOpaque(false); createLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createLocationButtonActionPerformed(e); } }); buttonBar.add(createLocationButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setBackground(new Color(231, 188, 251)); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(5, 1)); } linkingPanel.add(buttonBar, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } contentPane.add(linkingPanel, cc.xywh(2, 6, 3, 1)); //======== selectPanel ======== { selectPanel.setOpaque(false); selectPanel.setLayout(new FormLayout("default:grow", "default")); //======== buttonBar2 ======== { buttonBar2.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar2.setBackground(new Color(231, 188, 251)); buttonBar2.setOpaque(false); buttonBar2 .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- selectButton ---- selectButton.setText("Select"); selectButton.setOpaque(false); selectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectButtonActionPerformed(); } }); buttonBar2.add(selectButton, cc.xy(1, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setOpaque(false); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar2.add(cancelButton, cc.xy(3, 1)); } selectPanel.add(buttonBar2, cc.xywh(1, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } contentPane.add(selectPanel, cc.xywh(2, 8, 3, 1)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }