List of usage examples for com.jgoodies.forms.layout Sizes bounded
public static Size bounded(Size basis, Size lowerBound, Size upperBound)
From source file:NewLinksDialog.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("NewLinksDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel labelLinks = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); JEditorPane urlsArea = ComponentFactory.getURLsEditorPane(); JLabel labelSaveTo = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane2 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JXButtonPanel buttonBar = new JXButtonPanel(); btnPasteFromClipboard = new JButton(); okButton = new JButton(); btnStartPaused = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/*from w w w . j a v a 2 s . c o m*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- labelLinks ---- labelLinks.setText(bundle.getString("labelLinks.text")); labelLinks.setLabelFor(urlsArea); //======== scrollPane1 ======== { scrollPane1.setViewportView(urlsArea); } //---- labelSaveTo ---- labelSaveTo.setText(bundle.getString("labelSaveTo.text")); labelSaveTo.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); labelDescription.setLabelFor(descriptionArea); //======== scrollPane2 ======== { scrollPane2.setViewportView(descriptionArea); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.MIN_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(55)), FormSpec.DEFAULT_GROW) }), contentPanel); contentPanelBuilder.add(labelLinks, cc.xy(1, 1)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 3, 5, 1)); contentPanelBuilder.add(labelSaveTo, cc.xy(1, 5)); contentPanelBuilder.add(comboPath, cc.xy(3, 5)); contentPanelBuilder.add(btnSelectPath, cc.xy(5, 5)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane2, cc.xywh(3, 7, 3, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- btnPasteFromClipboard ---- btnPasteFromClipboard.setText(bundle.getString("btnPasteFromClipboard.text")); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- btnStartPaused ---- btnStartPaused.setText(bundle.getString("btnStartPaused.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 5, 7, 9 } }); buttonBarBuilder.add(btnPasteFromClipboard, cc.xy(1, 1)); buttonBarBuilder.add(okButton, cc.xy(5, 1)); buttonBarBuilder.add(btnStartPaused, cc.xy(7, 1)); buttonBarBuilder.add(cancelButton, cc.xy(9, 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:InformationDialog.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("InformationDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); iconLabel = new JLabel(); pathLabel = new JLabel(); JLabel labelFrom = new JLabel(); fieldFrom = new JTextField(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); progressBar = new JProgressBar(); JLabel labelRemaining = new JLabel(); remainingLabel = new JLabel(); JLabel labelEstimateTime = new JLabel(); estTimeLabel = new JLabel(); JLabel labelCurrentSpeed = new JLabel(); currentSpeedLabel = new JLabel(); JLabel labelAverageSpeed = new JLabel(); avgSpeedLabel = new JLabel(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/*from www. ja v a 2s.c om*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setText(bundle.getString("iconLabel.text")); //---- pathLabel ---- pathLabel.setText(bundle.getString("pathLabel.text")); pathLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelFrom ---- labelFrom.setText(bundle.getString("labelFrom.text")); //---- fieldFrom ---- fieldFrom.setBorder(null); fieldFrom.setOpaque(false); fieldFrom.setText(bundle.getString("fieldFrom.text")); //---- labelSize ---- labelSize.setText(bundle.getString("labelSize.text")); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setText(bundle.getString("saveToLabel.text")); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { 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 }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } //---- progressBar ---- progressBar.setFont(new Font("Tahoma", Font.BOLD, 16)); //---- labelRemaining ---- labelRemaining.setText(bundle.getString("labelRemaining.text")); //---- remainingLabel ---- remainingLabel.setText(bundle.getString("remainingLabel.text")); remainingLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelEstimateTime ---- labelEstimateTime.setText(bundle.getString("labelEstimateTime.text")); //---- estTimeLabel ---- estTimeLabel.setText(bundle.getString("estTimeLabel.text")); estTimeLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelCurrentSpeed ---- labelCurrentSpeed.setText(bundle.getString("labelCurrentSpeed.text")); //---- currentSpeedLabel ---- currentSpeedLabel.setText(bundle.getString("currentSpeedLabel.text")); currentSpeedLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelAverageSpeed ---- labelAverageSpeed.setText(bundle.getString("labelAverageSpeed.text")); //---- avgSpeedLabel ---- avgSpeedLabel.setText(bundle.getString("avgSpeedLabel.text")); avgSpeedLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); PanelBuilder contentPanelBuilder = new PanelBuilder( new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), 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, ColumnSpec.decode("max(min;70dlu)") }, 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, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, RowSpec.decode("fill:max(pref;20dlu)"), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5)); contentPanelBuilder.add(pathLabel, cc.xywh(3, 1, 7, 1)); contentPanelBuilder.add(labelFrom, cc.xy(3, 3)); contentPanelBuilder.add(fieldFrom, cc.xywh(5, 3, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 5)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 5, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 9, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 9, 1)); contentPanelBuilder.add(progressBar, cc.xywh(1, 13, 9, 1)); contentPanelBuilder.add(labelRemaining, cc.xy(1, 15)); contentPanelBuilder.add(remainingLabel, cc.xywh(3, 15, 3, 1)); contentPanelBuilder.add(labelEstimateTime, cc.xy(7, 15)); contentPanelBuilder.add(estTimeLabel, cc.xy(9, 15)); contentPanelBuilder.add(labelCurrentSpeed, cc.xy(1, 17)); contentPanelBuilder.add(currentSpeedLabel, cc.xywh(3, 17, 3, 1)); contentPanelBuilder.add(labelAverageSpeed, cc.xy(7, 17)); contentPanelBuilder.add(avgSpeedLabel, cc.xy(9, 17)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;55dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 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:MultipleSettingsDialog.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("MultipleSettingsDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel iconLabel = new JLabel(); titleLabel = new JLabel(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/* w w w .j a va 2s.co m*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setText(bundle.getString("iconLabel.text")); //---- titleLabel ---- titleLabel.setText(bundle.getString("titleLabel.text")); titleLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelSize ---- labelSize.setText(bundle.getString("labelSize.text")); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); fieldSize.setEditable(false); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setText(bundle.getString("saveToLabel.text")); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { 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 }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), 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, ColumnSpec.decode("max(min;70dlu)") }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.PREFERRED, FormSpec.NO_GROW), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5, CellConstraints.DEFAULT, CellConstraints.FILL)); contentPanelBuilder.add(titleLabel, cc.xywh(3, 1, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 3)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 3, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 7, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 7, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;55dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 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: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 ======== {/*w ww .ja v a 2 s .co 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 va 2s. co m*/ 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:com.spirit.general.gui.main.SpiritSpeedDial.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown button14 = new JButton(); button10 = new JButton(); button1 = new JButton(); button15 = new JButton(); button11 = new JButton(); button2 = new JButton(); button16 = new JButton(); button12 = new JButton(); button3 = new JButton(); button4 = new JButton(); button18 = new JButton(); button5 = new JButton(); button17 = new JButton(); button13 = new JButton(); button6 = new JButton(); button7 = new JButton(); button8 = new JButton(); button9 = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(Color.white);//from ww w . j av a 2s. com setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.bounded(Sizes.DEFAULT, Sizes.dluX(100), Sizes.dluX(100)), FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.bounded(Sizes.DEFAULT, Sizes.dluX(100), Sizes.dluX(100)), FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;100dlu):grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec("max(default;100dlu):grow"), FormFactory.LINE_GAP_ROWSPEC, new RowSpec("max(default;100dlu):grow"), FormFactory.LINE_GAP_ROWSPEC, new RowSpec("max(default;100dlu):grow"), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- button14 ---- button14.setText("Nueva oficina"); button14.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button14, cc.xywh(3, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button10 ---- button10.setText("text"); add(button10, cc.xywh(3, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button1 ---- button1.setText("text"); add(button1, cc.xywh(3, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button15 ---- button15.setText("Nuevo usuario"); button15.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button15, cc.xywh(5, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button11 ---- button11.setText("text"); add(button11, cc.xywh(5, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button2 ---- button2.setText("text"); add(button2, cc.xywh(5, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button16 ---- button16.setText("Nuevo producto"); button16.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button16, cc.xywh(7, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button12 ---- button12.setText("text"); add(button12, cc.xywh(7, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button3 ---- button3.setText("text"); add(button3, cc.xywh(7, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button4 ---- button4.setText("text"); button4.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button4, cc.xywh(3, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button18 ---- button18.setText("text"); button18.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button18, cc.xywh(5, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button5 ---- button5.setText("text"); add(button5, cc.xywh(5, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button17 ---- button17.setText("text"); button17.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button17, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button13 ---- button13.setText("text"); add(button13, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button6 ---- button6.setText("text"); add(button6, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button7 ---- button7.setText("text"); button7.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button7, cc.xywh(3, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button8 ---- button8.setText("text"); button8.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button8, cc.xywh(5, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- button9 ---- button9.setText("text"); button9.setFont(new Font("Tahoma", Font.BOLD, 14)); add(button9, cc.xywh(7, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:cz.vity.freerapid.gui.dialogs.MultipleSettingsDialog.java
@SuppressWarnings({ "deprecation" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown //ResourceBundle bundle = ResourceBundle.getBundle("MultipleSettingsDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel iconLabel = new JLabel(); titleLabel = new JLabel(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/*from w w w. j av a 2s . c o m*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setName("iconLabel"); //---- titleLabel ---- titleLabel.setName("titleLabel"); titleLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelSize ---- labelSize.setName("labelSize"); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); fieldSize.setEditable(false); //---- labelDescription ---- labelDescription.setName("labelDescription"); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setName("saveToLabel"); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setName("btnSelectPath"); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { 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 }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), 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, ColumnSpec.decode("max(min;70dlu)") }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.PREFERRED, FormSpec.NO_GROW), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5, CellConstraints.DEFAULT, CellConstraints.FILL)); contentPanelBuilder.add(titleLabel, cc.xywh(3, 1, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 3)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 3, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 7, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 7, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setName("okButton"); //---- cancelButton ---- cancelButton.setName("cancelButton"); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;42dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); }
From source file:cz.vity.freerapid.gui.dialogs.NewLinksDialog.java
@SuppressWarnings({ "deprecation" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown //ResourceBundle bundle = ResourceBundle.getBundle("NewLinksDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel labelLinks = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); urlsArea = ComponentFactory.getURLsEditorPane(); JLabel labelSaveTo = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane2 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JXButtonPanel buttonBar = new JXButtonPanel(); btnPasteFromClipboard = new JButton(); okButton = new JButton(); btnStartPaused = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//from w ww .ja v a 2s . com dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- labelLinks ---- labelLinks.setName("labelLinks"); labelLinks.setLabelFor(urlsArea); //======== scrollPane1 ======== { scrollPane1.setViewportView(urlsArea); } //---- labelSaveTo ---- labelSaveTo.setName("labelSaveTo"); labelSaveTo.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setName("btnSelectPath"); //---- labelDescription ---- labelDescription.setName("labelDescription"); labelDescription.setLabelFor(descriptionArea); //======== scrollPane2 ======== { scrollPane2.setViewportView(descriptionArea); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.MIN_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(55)), FormSpec.DEFAULT_GROW) }), contentPanel); contentPanelBuilder.add(labelLinks, cc.xy(1, 1)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 3, 5, 1)); contentPanelBuilder.add(labelSaveTo, cc.xy(1, 5)); contentPanelBuilder.add(comboPath, cc.xy(3, 5)); contentPanelBuilder.add(btnSelectPath, cc.xy(5, 5)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane2, cc.xywh(3, 7, 3, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- btnPasteFromClipboard ---- btnPasteFromClipboard.setName("btnPasteFromClipboard"); //---- okButton ---- okButton.setName("okButton"); //---- btnStartPaused ---- btnStartPaused.setName("btnStartPaused"); //---- cancelButton ---- cancelButton.setName("cancelButton"); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(pref;50dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(pref;50dlu)"), }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 5, 9 } }); buttonBarBuilder.add(btnPasteFromClipboard, cc.xy(1, 1)); buttonBarBuilder.add(okButton, cc.xy(5, 1)); buttonBarBuilder.add(btnStartPaused, cc.xy(7, 1)); buttonBarBuilder.add(cancelButton, cc.xy(9, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); }
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);//ww w .j a v a 2 s .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 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);//from w w w . j ava2s .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 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 }