public ImageCameraConfigurationWizard(ImageCamera camera) { this.camera = camera; panelGeneral = new JPanel(); contentPanel.add(panelGeneral); panelGeneral.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), "General", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0))); panelGeneral.setLayout(new FormLayout( new ColumnSpec[] {FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,}, new RowSpec[] {FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,})); lblSourceUrl = new JLabel("Source URL"); panelGeneral.add(lblSourceUrl, "2, 2, right, default"); textFieldSourceUrl = new JTextField(); panelGeneral.add(textFieldSourceUrl, "4, 2, fill, default"); textFieldSourceUrl.setColumns(10); btnBrowse = new JButton(browseAction); panelGeneral.add(btnBrowse, "6, 2"); }
/** * Insert the specified row into the layout. This accomodates * for the appendColumn/insertColumn API weakness in FormLayout. */ private void insertRow(int index, RowSpec rowSpec) { if(index == formLayout.getRowCount()) formLayout.appendRow(rowSpec); else formLayout.insertRow(index + 1, rowSpec); }
/** * Insert the specified column into the layout. This accomodates * for the appendRow/insertRow API weakness in FormLayout. */ private void insertColumn(int index, ColumnSpec columnSpec) { if(index == formLayout.getColumnCount()) formLayout.appendColumn(columnSpec); else formLayout.insertColumn(index + 1, columnSpec); }
/** * Adds the specified column index to the last column group. * In case there are no groups, a new group will be created. * * @param columnIndex the column index to be set grouped */ public void addGroupedColumn(int columnIndex) { int[][] newColGroups = getColumnGroups(); // Create a group if none exists. if (newColGroups.length == 0) { newColGroups = new int[][]{{columnIndex}}; } else { int lastGroupIndex = newColGroups.length-1; int[] lastGroup = newColGroups[lastGroupIndex]; int groupSize = lastGroup.length; int[] newLastGroup = new int[groupSize+1]; System.arraycopy(lastGroup, 0, newLastGroup, 0, groupSize); newLastGroup[groupSize] = columnIndex; newColGroups[lastGroupIndex] = newLastGroup; } setColumnGroups(newColGroups); }
private void initComponents() { setLayout(new FormLayout(new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormSpecs.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormSpecs.LINE_GAP_ROWSPEC, RowSpec.decode("default:grow"), FormSpecs.LINE_GAP_ROWSPEC, })); JPanel panelTvShowDataSources = new JPanel(); add(panelTvShowDataSources, "2, 2, fill, fill"); panelTvShowDataSources.setLayout(new FormLayout( new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("50dlu:grow"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, RowSpec.decode("default:grow(3)"), FormSpecs.RELATED_GAP_ROWSPEC, })); JLabel lblDataSource = new JLabel(BUNDLE.getString("wizard.tvshow.datasources")); //$NON-NLS-1$ panelTvShowDataSources.add(lblDataSource, "2, 2, 7, 1"); tpDatasourceHint.setText(BUNDLE.getString("wizard.datasource.hint")); //$NON-NLS-1$ tpDatasourceHint.setOpaque(false); panelTvShowDataSources.add(tpDatasourceHint, "2, 3, 7, 1, fill, fill"); JPanel panelTvShowSourcesButtons = new JPanel(); panelTvShowDataSources.add(panelTvShowSourcesButtons, "8, 5, fill, top"); panelTvShowSourcesButtons.setLayout(new FormLayout(new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, })); panelTvShowSourcesButtons.add(btnRemove, "1, 3, fill, top"); JLabel lblDvdOrder = new JLabel(BUNDLE.getString("Settings.dvdorder")); //$NON-NLS-1$ panelTvShowDataSources.add(lblDvdOrder, "2, 7, right, default");
JPanel panel = new JPanel(); FormLayout layout = new FormLayout("pref,2dlu,pref:grow", "pref,2dlu,pref,4dlu"); panel.setLayout(layout); CellConstraints cc = new CellConstraints(); panel.add(new JLabel(I18N.getLocalizedDialogLabel("Name")), cc.xy(1, 1)); m_name_field = new JTextField(); m_name_field.setEnabled(false); panel.add(m_name_field, cc.xy(3, 1)); panel.add(new JLabel(I18N.getLocalizedDialogLabel("Component")), cc.xy(1, 3)); layout = new FormLayout("d:grow,24px", "fill:pref"); m_class_field = new JTextField(); m_class_field.setEditable(false); JPanel cpanel = new JPanel(layout); m_customizer_btn = new JButton(FormDesignerUtils.loadImage(Icons.EDIT_16)); m_customizer_btn.setPreferredSize(new java.awt.Dimension(24, 16)); m_customizer_btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { showCustomizerDialog();
this.feeder = feeder; JPanel panel = new JPanel(); panel.setBorder(new TitledBorder(null, "Vision", TitledBorder.LEADING, TitledBorder.TOP, null, null)); contentPanel.add(panel); panel.setLayout(new FormLayout( new ColumnSpec[] {FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC,}, new RowSpec[] {FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,})); JButton btnEditPipeline = new JButton("Edit Pipeline"); btnEditPipeline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UiUtils.messageBoxOnException(() -> { panel.add(btnEditPipeline, "2, 2"); JButton btnResetPipeline = new JButton("Reset Pipeline"); btnResetPipeline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { panel.add(btnResetPipeline, "4, 2"); JLabel lblWarningThisFeeder = new JLabel("Warning: This feeder is incomplete and experimental. Use at your own risk."); lblWarningThisFeeder.setFont(new Font("Lucida Grande", Font.PLAIN, 16)); lblWarningThisFeeder.setForeground(Color.RED); lblWarningThisFeeder.setHorizontalAlignment(SwingConstants.LEFT);
public DataSourceDuplicatorView(String title) { setTitle(title); this.dataSourceName = new JTextField(); this.okButton = new JButton("Create"); this.cancelButton = new JButton("Cancel"); getRootPane().setDefaultButton(okButton); // assemble FormLayout layout = new FormLayout("right:pref, 3dlu, fill:250", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); builder.append("Name:", dataSourceName); JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT)); buttons.add(cancelButton); buttons.add(okButton); getContentPane().setLayout(new BorderLayout()); getContentPane().add(builder.getPanel(), BorderLayout.CENTER); getContentPane().add(buttons, BorderLayout.SOUTH); }
private MessageHistoryDialog() { super(MainWindow.getActiveInstance(), BUNDLE.getString("summarywindow.title"), "messageSummary"); //$NON-NLS-1$ setModal(false); setModalityType(ModalityType.MODELESS); new FormLayout(new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("300dlu:grow"), FormSpecs.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("150dlu:grow"), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, })); getContentPane().add(scrollPane, "2, 2, fill, fill"); messagesPanel = new JPanel(); messagesPanel.setBackground(Color.WHITE); messagesPanel.setLayout(new BoxLayout(messagesPanel, BoxLayout.PAGE_AXIS)); scrollPane.setViewportView(messagesPanel); scrollPane.getVerticalScrollBar().setUnitIncrement(16); getContentPane().add(panelButtons, "2, 4, fill, fill"); JButton btnClose = new JButton(BUNDLE.getString("Button.close")); //$NON-NLS-1$ panelButtons.add(btnClose); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) {
private void initComponents() { setLayout(new FormLayout(new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormSpecs.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormSpecs.LINE_GAP_ROWSPEC, RowSpec.decode("default:grow"), FormSpecs.LINE_GAP_ROWSPEC, })); JPanel panelTvShowScrapers = new JPanel(); panelTvShowScrapers.setLayout(new FormLayout( new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("20dlu:grow"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow(3)"), FormSpecs.LINE_GAP_ROWSPEC, })); lblTvShowScraper = new JLabel(BUNDLE.getString("wizard.tvshow.scraper")); //$NON-NLS-1$ panelTvShowScrapers.add(lblTvShowScraper, "2, 2, 11, 1"); panelTvShowScrapers.add(panelScraperDetails, "8, 4, 5, 1, fill, fill"); panelScraperDetails.setLayout( new FormLayout(new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormSpecs.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow"), FormSpecs.RELATED_GAP_ROWSPEC, })); panelTvShowScrapers.add(new JSeparator(), "2, 6, 11, 1"); JLabel lblScraperLanguage = new JLabel(BUNDLE.getString("Settings.preferredLanguage")); //$NON-NLS-1$ panelTvShowScrapers.add(lblScraperLanguage, "2, 7, right, default"); panelTvShowScrapers.add(cbScraperLanguage, "4, 7"); JLabel lblCountry = new JLabel(BUNDLE.getString("Settings.certificationCountry")); //$NON-NLS-1$ panelTvShowScrapers.add(lblCountry, "2, 9, right, default");
public JPanel createpanelTableAndColumn() { JPanel jpanel1 = new JPanel(); jpanel1.setName("panelTableAndColumn"); EtchedBorder etchedborder1 = new EtchedBorder(EtchedBorder.RAISED, null, null); jpanel1.setBorder(etchedborder1); FormLayout formlayout1 = new FormLayout( "FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE", "CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); CellConstraints cc = new CellConstraints(); jpanel1.setLayout(formlayout1); lblTitleTable.setBackground(new Color(102, 102, 102)); lblTitleTable.setName("lblTitleTable"); lblTitleTable.setOpaque(true); lblTitleTable.setText(" Used tables"); jpanel1.add(lblTitleTable, cc.xywh(1, 1, 5, 1)); lblTablename.setName("lblTablename"); lblTablename.setText("table name"); jpanel1.add(lblTablename, cc.xy(2, 3)); tfTablename.setName("tfTablename"); jpanel1.add(tfTablename, cc.xy(4, 3)); return jpanel1; }
public DimensionEditor() { m_panel = new JPanel(); FormLayout layout = new FormLayout("pref,5px,pref,10px,pref,5px,pref,pref:grow", "pref"); m_panel.setLayout(layout); CellConstraints cc = new CellConstraints(); m_panel.add(new JLabel(I18N.getLocalizedMessage("width")), cc.xy(1, 1)); m_panel.add(m_width, cc.xy(3, 1)); m_panel.add(new JLabel(I18N.getLocalizedMessage("height")), cc.xy(5, 1)); m_panel.add(m_height, cc.xy(7, 1)); m_panel.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2)); m_width.setEnabled(false); m_height.setEnabled(false); }
/** * constructor for creating a device */ public WolDeviceDialog() { super(BUNDLE.getString("tmm.wakeonlandevice"), "wolDialog"); //$NON-NLS-1$ setResizable(false); getContentPane().setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(100px;default)"), FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(100px;default)"), FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, })); JLabel lblDeviceName = new JLabel(BUNDLE.getString("Settings.devicename")); //$NON-NLS-1$ getContentPane().add(lblDeviceName, "2, 2, right, default"); tfName = new JTextField(); getContentPane().add(tfName, "4, 2, 5, 1, fill, default"); tfName.setColumns(10); JLabel lblMacAddress = new JLabel(BUNDLE.getString("Settings.macaddress")); //$NON-NLS-1$ getContentPane().add(lblMacAddress, "2, 4, right, default"); tfMacAddress = new JTextField(); getContentPane().add(tfMacAddress, "4, 4, 5, 1, fill, default"); tfMacAddress.setColumns(10); JButton btnSave = new JButton(BUNDLE.getString("Button.save")); //$NON-NLS-1$ btnSave.setAction(actionSave); getContentPane().add(btnSave, "6, 6"); JButton btnCancel = new JButton(BUNDLE.getString("Button.cancel")); //$NON-NLS-1$ btnCancel.setAction(actionCancel); getContentPane().add(btnCancel, "8, 6"); }
public JPanel createPanel() { JPanel jpanel1 = new JPanel(); FormLayout formlayout1 = new FormLayout( "FILL:5DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE", "CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:5DLU:NONE,FILL:DEFAULT:NONE,CENTER:5DLU:NONE"); CellConstraints cc = new CellConstraints(); jpanel1.setLayout(formlayout1); btnNew.setActionCommand("new"); btnNew.setName("btnNew"); btnNew.setText("new"); jpanel1.add(btnNew, cc.xy(2, 2)); btnSave.setActionCommand("save"); jpanel1.add(jscrollpane1, cc.xywh(2, 4, 11, 1)); lblRolename.setName("lblRolename"); lblRolename.setText("rolename"); jpanel1.add(lblRolename, cc.xy(2, 6)); jtextfieldRolename.setName("jtextfieldRolename"); jpanel1.add(jtextfieldRolename, cc.xywh(4, 6, 9, 1));
public JPanel createPanelRestorePageSize() { JPanel jpanelRestorePageSize = new JPanel(); FormLayout formlayout1 = new FormLayout( "FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:30DLU:NONE", "CENTER:DEFAULT:NONE"); CellConstraints cc = new CellConstraints(); jpanelRestorePageSize.setLayout(formlayout1); lblPageSize.setName("lblPageSize"); lblPageSize.setText("new page size"); jpanelRestorePageSize.add(lblPageSize, cc.xy(1, 1)); jtextfieldPageSize.setEnabled(false); jtextfieldPageSize.setName("jtextfieldPageSize"); jpanelRestorePageSize.add(jtextfieldPageSize, cc.xy(3, 1)); return jpanelRestorePageSize; }
public JPanel createPanelBackupButton() { JPanel jpanelBackupButton = new JPanel(); FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE", "BOTTOM:DEFAULT:NONE"); jpanelBackupButton.setLayout(formlayout1); jbuttonBackup.setActionCommand("Start Backup"); jbuttonBackup.setName("jbuttonBackup"); jbuttonBackup.setText("Start Backup"); jpanelBackupButton.add(jbuttonBackup, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM)); return jpanelBackupButton; }
root = new JPanel(); root.setLayout(new BorderLayout(0, 0)); final JSplitPane splitPane1 = new JSplitPane(); descriptionTextArea.setLineWrap(true); descriptionTextArea.setRows(4); descriptionTextArea.setToolTipText(ResourceBundle.getBundle("net/groboclown/p4plugin/P4Bundle") .getString("swarm.create.description.tooltip")); descriptionTextArea.setWrapStyleWord(true); scrollPane2.setViewportView(descriptionTextArea); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("fill:d:noGrow", "center:d:noGrow")); root.add(panel2, BorderLayout.NORTH); final JLabel label1 = new JLabel(); label1.setHorizontalAlignment(0); label1.setHorizontalTextPosition(0); label1.setText("Swarm Review Creation is in Beta"); CellConstraints cc = new CellConstraints();
public JPanel createPanel1() { JPanel jpanel1 = new JPanel(); jpanel1.setOpaque(false); FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE", "CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); CellConstraints cc = new CellConstraints(); jpanel1.setLayout(formlayout1); m_codegen_label.setFont(new Font("Dialog", Font.BOLD, 12)); m_codegen_label.setAntiAliased(true); m_codegen_label.setName("codegen.label"); m_codegen_label.setText("Code Generation"); jpanel1.add(m_codegen_label, cc.xy(1, 1)); m_options_btn.setText(I18N.getLocalizedMessage("Options...")); m_options_btn.setName("options.btn"); jpanel1.add(m_options_btn, cc.xy(3, 1)); addFillComponents(jpanel1, new int[] { 2 }, new int[0]); return jpanel1; }
panel1.setLayout(new BorderLayout(0, 0)); rootPane.add(panel1, BorderLayout.NORTH); final JLabel label1 = new JLabel(); this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("net/groboclown/p4plugin/P4Bundle").getString("configuration.stack.title")); panel1.add(label1, BorderLayout.CENTER); myAddItemButton = new JButton(); myAddItemButton.setHideActionText(true); myAddItemButton.setText(""); myAddItemButton.setToolTipText(ResourceBundle.getBundle("net/groboclown/p4plugin/P4Bundle") .getString("configuration.connection-choice.picker.tooltip")); panel1.add(myAddItemButton, BorderLayout.EAST); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); rootPane.add(panel2, BorderLayout.CENTER); final JScrollPane scrollPane1 = new JScrollPane();