當前位置: 首頁>>代碼示例>>Java>>正文


Java GuiStandardUtils.attachBorder方法代碼示例

本文整理匯總了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;
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:38,代碼來源:ExtendedWizardDialog.java

示例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);
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:18,代碼來源:CommandGroup.java

示例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);
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:18,代碼來源:CommandGroup.java


注:本文中的org.springframework.richclient.util.GuiStandardUtils.attachBorder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。