本文整理匯總了Java中com.jgoodies.forms.layout.ColumnSpec.DEFAULT_GROW屬性的典型用法代碼示例。如果您正苦於以下問題:Java ColumnSpec.DEFAULT_GROW屬性的具體用法?Java ColumnSpec.DEFAULT_GROW怎麽用?Java ColumnSpec.DEFAULT_GROW使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.jgoodies.forms.layout.ColumnSpec
的用法示例。
在下文中一共展示了ColumnSpec.DEFAULT_GROW屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDialogContentPane
@Override
protected JComponent createDialogContentPane() {
JPanel panel = new JPanel(new FormLayout(new ColumnSpec[] { new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT,
ColumnSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC }));
CommandManager commandManager = Application.instance().getActiveWindow().getCommandManager();
List<Object> members = new ArrayList<Object>();
for (int i = 0; i < commandIds.length; i++) {
members.add(commandManager.getCommand(commandIds[i]));
}
CellConstraints cc = new CellConstraints();
CommandGroupFactoryBean commandGroupFactory = new CommandGroupFactoryBean("toolbar", members.toArray());
panel.add(commandGroupFactory.getCommandGroup().createToolBar(), cc.xy(1, 1));
JTextField toolbarTextField = new JTextField(20);
toolbarTextField.setText("input");
members.add(toolbarTextField);
commandGroupFactory = new CommandGroupFactoryBean("toolbar2", members.toArray());
panel.add(commandGroupFactory.getCommandGroup().createToolBar(), cc.xy(1, 3));
return panel;
}
示例2: createTitledDialogContentPane
@Override
protected JComponent createTitledDialogContentPane() {
JPanel panel = new JPanel(new FormLayout(new ColumnSpec[] {
new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, ColumnSpec.DEFAULT_GROW),
FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, ColumnSpec.DEFAULT_GROW) }, new RowSpec[] {
FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));
// create all columns, needed to add/remove them
TableColumn column;
for (int i = 0; i < headers.size(); ++i) {
column = new TableColumn(i, -1, new DefaultTableCellRenderer(), null);
column.setHeaderValue(headers.get(i));
tableColumns.add(column);
}
columnModel = new DefaultTableColumnModel();
// create the sortable model by wrapping our simple custom model
sortedModel = new ShuttleSortableTableModel(new CustomerTableModel());
table = new JTable(sortedModel, columnModel);
table.setAutoCreateColumnsFromModel(false);
TableSortIndicator sortIndicator = new TableSortIndicator(table);
new SortTableCommand(table, sortIndicator.getColumnSortList());
JScrollPane scrollPane = new JScrollPane(table);
CellConstraints cc = new CellConstraints();
panel.add(scrollPane, cc.xyw(1, 1, 3));
panel.add(createAddCommand().createButton(), cc.xy(1, 3));
panel.add(createRemoveCommand().createButton(), cc.xy(3, 3));
return panel;
}
示例3: createDialogContentPane
@Override
protected JComponent createDialogContentPane() {
JPanel panel = new JPanel(new FormLayout(new ColumnSpec[] {FormFactory.DEFAULT_COLSPEC , FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT,
ColumnSpec.DEFAULT_GROW)}, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC }));
CommandManager commandManager = Application.instance().getActiveWindow().getCommandManager();
List<Object> members = new ArrayList<Object>();
for (int i = 0; i < commandIds.length; i++) {
members.add(commandManager.getCommand(commandIds[i]));
}
CellConstraints cc = new CellConstraints();
CommandGroupFactoryBean commandGroupFactory = new CommandGroupFactoryBean("buttonBar", members.toArray());
panel.add(new JLabel(getMessage("buttonBar.label")), cc.xy(1, 1));
panel.add(commandGroupFactory.getCommandGroup().createButtonBar(), cc.xyw(1, 3, 3));
JTextField toolbarTextField = new JTextField(20);
toolbarTextField.setText("input");
members.add(toolbarTextField);
commandGroupFactory = new CommandGroupFactoryBean("buttonStack", members.toArray());
panel.add(new JLabel(getMessage("buttonStack.label")), cc.xy(1, 5));
panel.add(commandGroupFactory.getCommandGroup().createButtonStack(), cc.xy(3, 5));
return panel;
}