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


Java TableLayoutBuilder.getPanel方法代碼示例

本文整理匯總了Java中org.springframework.richclient.layout.TableLayoutBuilder.getPanel方法的典型用法代碼示例。如果您正苦於以下問題:Java TableLayoutBuilder.getPanel方法的具體用法?Java TableLayoutBuilder.getPanel怎麽用?Java TableLayoutBuilder.getPanel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.richclient.layout.TableLayoutBuilder的用法示例。


在下文中一共展示了TableLayoutBuilder.getPanel方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createDialogContentPane

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
protected JComponent createDialogContentPane() {
    TableLayoutBuilder layoutBuilder = new TableLayoutBuilder();

    if (this.inputField == null) {
        this.inputField = getComponentFactory().createTextField();
    }
    // work around for bug in JFormattedTextField text field for selectAll
    if (inputField instanceof JFormattedTextField) {
        SelectAllBugFixer selectAllBugFixer = new SelectAllBugFixer();
        inputField.addFocusListener(selectAllBugFixer);
    }

    layoutBuilder.cell(createInputLabel(), TableLayoutBuilder.DEFAULT_LABEL_ATTRIBUTES);
    layoutBuilder.labelGapCol();
    layoutBuilder.cell(inputField);

    layoutBuilder.unrelatedGapRow();
    layoutBuilder.cell(getMessagePane().getControl());

    layoutBuilder.relatedGapRow();
    layoutBuilder.separator("");
    return layoutBuilder.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:24,代碼來源:InputApplicationDialog.java

示例2: createControl

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
protected JComponent createControl() {
    titleLabel = new JLabel();
    titleLabel.setName("title");
    titleLabel.setOpaque(false);
    titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
    titleLabel.setText(title);

    iconLabel = new JLabel();
    iconLabel.setName("icon");
    iconLabel.setBackground(getBackgroundColor());
    iconLabel.setIcon(getIcon());

    JPanel panel = new JPanel();
    panel.setName("panel");
    panel.setBackground(getBackgroundColor());
    TableLayoutBuilder table = new TableLayoutBuilder(panel);
    table.row(FormFactory.LINE_GAP_ROWSPEC);
    table.gapCol();
    table.cell(titleLabel);
    table.gapCol();
    table.cell(iconLabel, "rowspan=2 colspec=pref");
    table.row(FormFactory.NARROW_LINE_GAP_ROWSPEC);
    table.cell(messagePane.getControl());
    table.row(FormFactory.NARROW_LINE_GAP_ROWSPEC);
    return table.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:27,代碼來源:TitlePane.java

示例3: createDialogContentPane

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
protected JComponent createDialogContentPane() {
	TableLayoutBuilder builder = new TableLayoutBuilder();

	JComponent selectionComponent = createSelectionComponent();
	Assert.state(selectionComponent != null, "createSelectionComponent cannot return null");

	if (StringUtils.hasText(description)) {
		builder.cell(getComponentFactory().createLabelFor(description, selectionComponent));
		builder.relatedGapRow();
		builder.row();
	}

	builder.cell(selectionComponent);

	return builder.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:17,代碼來源:AbstractSelectionDialog.java

示例4: createContentControl

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
protected JPanel createContentControl() {
    TableLayoutBuilder panelBuilder = new TableLayoutBuilder();
    String colSpec = "colSpec=" + getTreeControlWidth() + " rowSpec=fill:default:grow";
    panelBuilder.cell(new JScrollPane(pageTree), colSpec);
    panelBuilder.gapCol();
    panelBuilder.cell(pagePanel, "valign=top");
    return panelBuilder.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:9,代碼來源:TreeCompositeDialogPage.java

示例5: createSelectionComponent

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
protected JComponent createSelectionComponent() {
    TableLayoutBuilder builder = new TableLayoutBuilder();

    JComponent filterComponent = createFilterComponent();
    builder.cell(filterComponent);
    builder.row();
    builder.relatedGapRow();
    builder.cell(super.createSelectionComponent());

    return builder.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:12,代碼來源:FilterListSelectionDialog.java

示例6: SimplePanel

import org.springframework.richclient.layout.TableLayoutBuilder; //導入方法依賴的package包/類
public SimplePanel() {
    TableLayoutBuilder builder = new TableLayoutBuilder(this);

    stringField = new JTextField(10);
    stringField.setName("stringProperty");

    comboBox = new JComboBox(new String[] { "item 0", "item 1", "item 2" });
    comboBox.setName("comboProperty");

    checkBox = new JCheckBox("checkbox");
    checkBox.setName("booleanProperty");

    builder.cell(new JLabel("string"));
    builder.gapCol();
    builder.cell(stringField);
    builder.relatedGapRow();
    builder.cell(new JLabel("combo"));
    builder.gapCol();
    builder.cell(comboBox);
    builder.relatedGapRow();
    builder.cell(checkBox);
    builder.relatedGapRow();
    
    JPanel nestedPanel =new JPanel();
    nestedField = new JTextField("test");
    nestedField.setName("nestedField");
    nestedPanel.add(nestedField);
    
    builder.cell(nestedPanel);

    builder.getPanel();
}
 
開發者ID:shevek,項目名稱:spring-rich-client,代碼行數:33,代碼來源:SimplePanel.java


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