本文整理汇总了Java中org.springframework.richclient.util.GuiStandardUtils.attachBorder方法的典型用法代码示例。如果您正苦于以下问题:Java GuiStandardUtils.attachBorder方法的具体用法?Java GuiStandardUtils.attachBorder怎么用?Java GuiStandardUtils.attachBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.richclient.util.GuiStandardUtils
的用法示例。
在下文中一共展示了GuiStandardUtils.attachBorder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createWizardIndex
import org.springframework.richclient.util.GuiStandardUtils; //导入方法依赖的package包/类
private Component createWizardIndex()
{
JPanel indexPanel = new JPanel(new FormLayout(
new ColumnSpec[]{
new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW)
},
new RowSpec[]{
new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
FormFactory.UNRELATED_GAP_ROWSPEC,
new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
FormFactory.UNRELATED_GAP_ROWSPEC,
new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
}));
CellConstraints cc = new CellConstraints();
GuiStandardUtils.attachBorder(indexPanel, BorderFactory.createEmptyBorder(5, 5, 5, 5));
indexPanel.add(createWizardTitle(), cc.xy(1, 1));
WizardPage[] pages = wizard.getPages();
DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout(
"right:pref, 3dlu, left:pref", ""));
JLabel indexNumber;
JLabel indexTitle;
for (int i = 0; i < pages.length; ++i)
{
indexNumber = new JLabel(Integer.toString(i + 1) + ".");
indexNumber.setName(Integer.toString(i + 1));
indexTitle = new JLabel(pages[i].getTitle());
indexNumbers.put(pages[i].getTitle(), indexNumber);
indexComponents.put(pages[i].getTitle(), indexTitle);
builder.append(indexNumber);
builder.append(indexTitle);
if (i < pages.length - 1)
builder.nextLine();
}
indexPanel.add(builder.getPanel(), cc.xy(1, 3));
indexPanel.add(createStepNofMPanel(pages.length), cc.xy(1, 5));
return indexPanel;
}
示例2: createButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入方法依赖的package包/类
/**
* Create a button bar with buttons for all the commands in this.
*
* @param columnSpec Custom columnSpec for each column containing a button,
* can be <code>null</code>.
* @param rowSpec Custom rowspec for the buttonbar, can be <code>null</code>.
* @param border if null, then don't use a border
*
* @return never null
*/
public JComponent createButtonBar(final ColumnSpec columnSpec, final RowSpec rowSpec, final Border border) {
final ButtonBarGroupContainerPopulator container = new ButtonBarGroupContainerPopulator();
container.setColumnSpec(columnSpec);
container.setRowSpec(rowSpec);
addCommandsToGroupContainer(container);
return GuiStandardUtils.attachBorder(container.getButtonBar(), border);
}
示例3: createButtonStack
import org.springframework.richclient.util.GuiStandardUtils; //导入方法依赖的package包/类
/**
* Create a button stack with buttons for all the commands.
*
* @param columnSpec Custom columnSpec for the stack, can be
* <code>null</code>.
* @param rowSpec Custom rowspec for each row containing a button can be
* <code>null</code>.
* @param border Border to set around the stack.
* @return never null
*/
public JComponent createButtonStack(final ColumnSpec columnSpec, final RowSpec rowSpec, final Border border) {
final ButtonStackGroupContainerPopulator container = new ButtonStackGroupContainerPopulator();
container.setColumnSpec(columnSpec);
container.setRowSpec(rowSpec);
addCommandsToGroupContainer(container);
return GuiStandardUtils.attachBorder(container.getButtonStack(), border);
}