/** * @param rowWeights * @param columnWeights */ public void layout(double[] rowWeights, double[] columnWeights) { SwingUtil.layoutToGrid(this.contentPanel, rowWeights, columnWeights); }
/** * @param rowWeights * @param columnWeights */ public void layout(List<Double> rowWeights, List<Double> columnWeights) { SwingUtil.layoutToGrid(this.contentPanel, rowWeights, columnWeights); }
/** * Layouts the child components of a specified parent component using GridBagLayout. * * @param numRow * The number of rows * @param numColumn * The number of columns * @param weightedRow * The row to weight * @param weightedColumn * The column to weight */ public void layout(int numRow, int numColumn, int weightedRow, int weightedColumn) { SwingUtil.layoutToGrid(this.contentPanel, numRow, numColumn, weightedRow, weightedColumn); }
private void init() { if (this.owner instanceof Frame) { this.dialog = new JDialog((Frame) this.owner); } else if (this.owner instanceof Dialog) { this.dialog = new JDialog((Dialog) this.owner); } else { // This should not happen. throw new WorkflowRuntimeException("The owner component was neither Frame or Dialog."); } this.dialog.setTitle(this.title); this.dialog.setModal(true); this.dialog.setResizable(true); Container contentPane = this.dialog.getContentPane(); int numRow = 0; if (this.description != null && this.description.length() > 0) { JLabel descriptionLabel = new JLabel("<html>" + this.description + "</html>"); contentPane.add(descriptionLabel); numRow++; } contentPane.add(this.mainPanel); numRow++; contentPane.add(this.buttonPanel); numRow++; SwingUtil.layoutToGrid(contentPane, numRow, 1, numRow - 2, 0); } }