• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jgoodies.forms.factories.CC的典型用法代码示例。如果您正苦于以下问题:Java CC类的具体用法?Java CC怎么用?Java CC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CC类属于com.jgoodies.forms.factories包,在下文中一共展示了CC类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testExtraExpansionHonorsCurrentMeasure

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks and verifies that components that span multiple columns
 * and that expand the container are measured using the correct measure.
 */
public static void testExtraExpansionHonorsCurrentMeasure() {
    TestComponent c1 = new TestComponent(10, 1, 50, 1);
    TestComponent c2 = new TestComponent(10, 1, 50, 1);
    TestComponent c3 = new TestComponent(10, 1, 50, 1);
    TestComponent c4 = new TestComponent(10, 1, 50, 1);
    FormLayout layout = new FormLayout(
        "10px, 15px:grow, 20px",
        "pref, pref");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy (1, 1));
    panel.add(c2, CC.xy (2, 1));
    panel.add(c3, CC.xy (3, 1));
    panel.add(c4, CC.xyw(1, 2, 2));

    int minimumLayoutWidth   = layout.minimumLayoutSize(panel).width;
    int preferredLayoutWidth = layout.preferredLayoutSize(panel).width;

    assertEquals("Minimum layout width",   45, minimumLayoutWidth);
    assertEquals("Preferred layout width", 70, preferredLayoutWidth);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:26,代码来源:FormLayoutTest.java


示例2: testHorizontalAlignments

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks whether components are aligned according to the column specs.
 */
public static void testHorizontalAlignments() {
    TestComponent left   = new TestComponent(2, 7, 4, 9);
    TestComponent center = new TestComponent(2, 7, 4, 9);
    TestComponent right  = new TestComponent(2, 7, 4, 9);
    TestComponent fill   = new TestComponent(2, 7, 4, 9);
    TestComponent def    = new TestComponent(2, 7, 4, 9);
    FormLayout layout = new FormLayout(
        "left:10px, center:10px, right:10px, fill:10px, 10px",
        "pref");

    JPanel panel = new JPanel(layout);
    panel.add(left,   CC.xy(1, 1));
    panel.add(center, CC.xy(2, 1));
    panel.add(right,  CC.xy(3, 1));
    panel.add(fill,   CC.xy(4, 1));
    panel.add(def,    CC.xy(5, 1));

    panel.doLayout();

    assertEquals("Left.x",         0, left.getX());
    assertEquals("Left.width",     4, left.getWidth());
    assertEquals("Center.x",      13, center.getX());
    assertEquals("Center.width",   4, center.getWidth());
    assertEquals("Right.x",       26, right.getX());
    assertEquals("Right.width",    4, right.getWidth());
    assertEquals("Fill.x",        30, fill.getX());
    assertEquals("Fill.width",    10, fill.getWidth());
    assertEquals("Default.x",     40, def.getX());
    assertEquals("Default.width", 10, def.getWidth());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:34,代码来源:FormLayoutTest.java


示例3: testVerticalAlignments

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks whether components are aligned according to the row specs.
 */
public static void testVerticalAlignments() {
    TestComponent top     = new TestComponent(7, 2, 9, 4);
    TestComponent center  = new TestComponent(7, 2, 9, 4);
    TestComponent bottom  = new TestComponent(7, 2, 9, 4);
    TestComponent fill    = new TestComponent(7, 2, 9, 4);
    TestComponent def     = new TestComponent(7, 2, 9, 4);
    FormLayout layout = new FormLayout(
        "pref",
        "top:10px, center:10px, bottom:10px, fill:10px, 10px");

    JPanel panel = new JPanel(layout);
    panel.add(top,     CC.xy(1, 1));
    panel.add(center,  CC.xy(1, 2));
    panel.add(bottom,  CC.xy(1, 3));
    panel.add(fill,    CC.xy(1, 4));
    panel.add(def,     CC.xy(1, 5));

    panel.doLayout();

    assertEquals("Top.y",           0, top.getY());
    assertEquals("Top.height",      4, top.getHeight());
    assertEquals("Center.y",       13, center.getY());
    assertEquals("Center.height",   4, center.getHeight());
    assertEquals("Bottom.y",       26, bottom.getY());
    assertEquals("Bottom.height",   4, bottom.getHeight());
    assertEquals("Fill.y",         30, fill.getY());
    assertEquals("Fill.height",    10, fill.getHeight());
    assertEquals("Default.y",      43, def.getY());
    assertEquals("Default.height",  4, def.getHeight());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:34,代码来源:FormLayoutTest.java


示例4: testBoundedWidth

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Tests bounded min and pref widths.
 */
public static void testBoundedWidth() {
    TestComponent c1 = new TestComponent( 2, 7,  4, 9);
    TestComponent c2 = new TestComponent(20, 7, 40, 9);
    TestComponent c3 = new TestComponent( 2, 7,  4, 9);
    TestComponent c4 = new TestComponent(20, 7, 40, 9);
    TestComponent c5 = new TestComponent( 2, 7,  4, 9);
    TestComponent c6 = new TestComponent(20, 7, 40, 9);
    TestComponent c7 = new TestComponent( 2, 7,  4, 9);
    TestComponent c8 = new TestComponent(20, 7, 40, 9);
    FormLayout layout = new FormLayout(
        "[10px,min],  [10px,min],  " +
        "[10px,pref], [10px,pref], " +
        "[min,10px],  [min,10px],  " +
        "[pref,10px], [pref,10px]",
        "pref");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy(1, 1));
    panel.add(c2, CC.xy(2, 1));
    panel.add(c3, CC.xy(3, 1));
    panel.add(c4, CC.xy(4, 1));
    panel.add(c5, CC.xy(5, 1));
    panel.add(c6, CC.xy(6, 1));
    panel.add(c7, CC.xy(7, 1));
    panel.add(c8, CC.xy(8, 1));

    panel.doLayout();

    assertEquals("max(10px;c1_min).width",   10, c1.getWidth());
    assertEquals("max(10px;c2_min).width",   20, c2.getWidth());
    assertEquals("max(10px;c3_pref).width",  10, c3.getWidth());
    assertEquals("max(10px;c4_pref).width",  40, c4.getWidth());
    assertEquals("min(10px;c5_min).width",    2, c5.getWidth());
    assertEquals("min(10px;c6_min).width",   10, c6.getWidth());
    assertEquals("min(10px;c7_pref).width",   4, c7.getWidth());
    assertEquals("min(10px;c8_pref).width",  10, c8.getWidth());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:41,代码来源:FormLayoutTest.java


示例5: testBoundedHeight

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Tests bounded min and pref widths.
 */
public static void testBoundedHeight() {
    TestComponent c1 = new TestComponent(7,  2, 9,  4);
    TestComponent c2 = new TestComponent(7, 20, 9, 40);
    TestComponent c3 = new TestComponent(7,  2, 9,  4);
    TestComponent c4 = new TestComponent(7, 20, 9, 40);
    TestComponent c5 = new TestComponent(7,  2, 9,  4);
    TestComponent c6 = new TestComponent(7, 20, 9, 40);
    TestComponent c7 = new TestComponent(7,  2, 9,  4);
    TestComponent c8 = new TestComponent(7, 20, 9, 40);
    FormLayout layout = new FormLayout(
        "pref",
        "f:[10px,min],  f:[10px,min],  " +
        "f:[10px,pref], f:[10px,pref], " +
        "f:[min,10px],  f:[min,10px],  " +
        "f:[pref,10px], f:[pref,10px]");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy(1, 1));
    panel.add(c2, CC.xy(1, 2));
    panel.add(c3, CC.xy(1, 3));
    panel.add(c4, CC.xy(1, 4));
    panel.add(c5, CC.xy(1, 5));
    panel.add(c6, CC.xy(1, 6));
    panel.add(c7, CC.xy(1, 7));
    panel.add(c8, CC.xy(1, 8));

    panel.doLayout();

    assertEquals("[10px, c1_min].height",  10, c1.getHeight());
    assertEquals("[10px, c2_min].height",  20, c2.getHeight());
    assertEquals("[10px,c3_pref].height",  10, c3.getHeight());
    assertEquals("[10px,c4_pref].height",  40, c4.getHeight());
    assertEquals("[c5_min, 10px].height",   2, c5.getHeight());
    assertEquals("[c6_min, 10px].height",  10, c6.getHeight());
    assertEquals("[c7_pref,10px].height",   4, c7.getHeight());
    assertEquals("[c8_pref,10px].height",  10, c8.getHeight());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:41,代码来源:FormLayoutTest.java


示例6: testNoExtraExpansionIfAllColumnsAreFixed

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks and verifies that components that span multiple columns
 * do not expand the container of no column grows.
 */
public static void testNoExtraExpansionIfAllColumnsAreFixed() {
    TestComponent c1 = new TestComponent(10, 1, 50, 1);
    TestComponent c2 = new TestComponent(10, 1, 50, 1);
    TestComponent c3 = new TestComponent(10, 1, 50, 1);
    TestComponent c4 = new TestComponent(10, 1, 50, 1);
    FormLayout layout = new FormLayout(
        "10px, 15px, 20px",
        "pref, pref");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy (1, 1));
    panel.add(c2, CC.xy (2, 1));
    panel.add(c3, CC.xy (3, 1));
    panel.add(c4, CC.xyw(1, 2, 2));

    Dimension preferredLayoutSize = layout.preferredLayoutSize(panel);
    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    int col1And2Width = c2.getX() + c2.getWidth();
    int gridWidth     = c3.getX() + c3.getWidth();
    int totalWidth    = preferredLayoutSize.width;

    assertEquals("Col1+2 width", 25, col1And2Width);
    assertEquals("Grid width",   45, gridWidth);
    assertEquals("Total width",  45, totalWidth);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:31,代码来源:FormLayoutTest.java


示例7: testNoExtraExpansionIfSpannedColumnsAreFixed

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks and verifies that components that span multiple columns
 * do not expand the container of no column grows.
 */
public static void testNoExtraExpansionIfSpannedColumnsAreFixed() {
    TestComponent c1 = new TestComponent(10, 1, 50, 1);
    TestComponent c2 = new TestComponent(10, 1, 50, 1);
    TestComponent c3 = new TestComponent(10, 1, 50, 1);
    TestComponent c4 = new TestComponent(10, 1, 50, 1);
    FormLayout layout = new FormLayout(
        "10px, 15px, 20px:grow",
        "pref, pref");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy (1, 1));
    panel.add(c2, CC.xy (2, 1));
    panel.add(c3, CC.xy (3, 1));
    panel.add(c4, CC.xyw(1, 2, 2));

    Dimension preferredLayoutSize = layout.preferredLayoutSize(panel);
    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    int col1And2Width = c2.getX() + c2.getWidth();
    int gridWidth     = c3.getX() + c3.getWidth();
    int totalWidth    = preferredLayoutSize.width;

    assertEquals("Col1+2 width",  25, col1And2Width);
    assertEquals("Grid width",    45, gridWidth);
    assertEquals("Total width",   45, totalWidth); // 70 is wrong
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:31,代码来源:FormLayoutTest.java


示例8: testExtraExpansionIfSpannedColumnsGrow

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks and verifies that components that span multiple columns
 * do not expand the container of no column grows.
 */
public static void testExtraExpansionIfSpannedColumnsGrow() {
    TestComponent c1 = new TestComponent(10, 1, 50, 1);
    TestComponent c2 = new TestComponent(10, 1, 50, 1);
    TestComponent c3 = new TestComponent(10, 1, 50, 1);
    TestComponent c4 = new TestComponent(10, 1, 50, 1);
    FormLayout layout = new FormLayout(
        "10px, 15px:grow, 20px",
        "pref, pref");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy (1, 1));
    panel.add(c2, CC.xy (2, 1));
    panel.add(c3, CC.xy (3, 1));
    panel.add(c4, CC.xyw(1, 2, 2));

    Dimension preferredLayoutSize = layout.preferredLayoutSize(panel);
    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    int col1And2Width = c2.getX() + c2.getWidth();
    int gridWidth     = c3.getX() + c3.getWidth();
    int totalWidth    = preferredLayoutSize.width;

    assertEquals("Col1+2 width",  50, col1And2Width);
    assertEquals("Grid width",    70, gridWidth);
    assertEquals("Total width",   70, totalWidth);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:31,代码来源:FormLayoutTest.java


示例9: testDefaultSize

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Tests the layout size, column and row sizes for a default specs.
 */
public static void testDefaultSize() {
    TestComponent c1 = new TestComponent(10, 10, 50, 50);
    FormLayout layout = new FormLayout(
            "default",
            "default");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy(1, 1));

    Dimension minimumLayoutSize    = layout.minimumLayoutSize(panel);
    Dimension preferredLayoutSize  = layout.preferredLayoutSize(panel);
    assertEquals("Minimum layout width", 10, minimumLayoutSize.width);
    assertEquals("Minimum layout height", 10, minimumLayoutSize.height);
    assertEquals("Preferred layout width",  50, preferredLayoutSize.width);
    assertEquals("Preferred layout height", 50, preferredLayoutSize.height);

    panel.setSize(minimumLayoutSize);
    panel.doLayout();
    int columnWidth = c1.getWidth();
    int rowHeight = c1.getHeight();
    assertEquals("Column width (container min)", 10, columnWidth);
    assertEquals("Row height (container min)", 10, rowHeight);

    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    columnWidth = c1.getWidth();
    rowHeight = c1.getHeight();
    assertEquals("Column width (container pref)", 50, columnWidth);
    assertEquals("Row height (container pref)", 50, rowHeight);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:34,代码来源:FormLayoutTest.java


示例10: testDefaultWithLowerBound

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Tests the combination of a default size spec with a lower bound
 * that shall ensure a minimum size.
 */
public static void testDefaultWithLowerBound() {
    TestComponent c1 = new TestComponent(10, 10, 50, 50);
    FormLayout layout = new FormLayout(
            "[20px,default]",
            "[20px,default]");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy(1, 1));

    Dimension minimumLayoutSize    = layout.minimumLayoutSize(panel);
    Dimension preferredLayoutSize  = layout.preferredLayoutSize(panel);

    assertEquals("Minimum layout width", 20, minimumLayoutSize.width);
    assertEquals("Minimum layout height", 20, minimumLayoutSize.height);
    assertEquals("Preferred layout width",  50, preferredLayoutSize.width);
    assertEquals("Preferred layout height", 50, preferredLayoutSize.height);

    panel.setSize(minimumLayoutSize);
    panel.doLayout();
    int columnWidth = c1.getWidth();
    int rowHeight = c1.getHeight();
    assertEquals("Column width (container min)", 20, columnWidth);
    assertEquals("Row height (container min)", 20, rowHeight);

    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    columnWidth = c1.getWidth();
    rowHeight = c1.getHeight();
    assertEquals("Column width (container pref)", 50, columnWidth);
    assertEquals("Row height (container pref)", 50, rowHeight);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:36,代码来源:FormLayoutTest.java


示例11: testDefaultWithUpperBound

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Tests the combination of a default size spec with an upper bound
 * that shall ensure a maximum size.
 */
public static void testDefaultWithUpperBound() {
    TestComponent c1 = new TestComponent(10, 10, 50, 50);
    FormLayout layout = new FormLayout(
            "[default,20px]",
            "[default,20px]");

    JPanel panel = new JPanel(layout);
    panel.add(c1, CC.xy(1, 1));

    Dimension minimumLayoutSize    = layout.minimumLayoutSize(panel);
    Dimension preferredLayoutSize  = layout.preferredLayoutSize(panel);

    assertEquals("Minimum layout width", 10, minimumLayoutSize.width);
    assertEquals("Minimum layout height", 10, minimumLayoutSize.height);
    assertEquals("Preferred layout width",  20, preferredLayoutSize.width);
    assertEquals("Preferred layout height", 20, preferredLayoutSize.height);

    panel.setSize(minimumLayoutSize);
    panel.doLayout();
    int columnWidth = c1.getWidth();
    int rowHeight = c1.getHeight();
    assertEquals("Column width (container min)", 10, columnWidth);
    assertEquals("Row height (container min)", 10, rowHeight);

    panel.setSize(preferredLayoutSize);
    panel.doLayout();
    columnWidth = c1.getWidth();
    rowHeight = c1.getHeight();
    assertEquals("Column width (container pref)", 20, columnWidth);
    assertEquals("Row height (container pref)", 20, rowHeight);
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:36,代码来源:FormLayoutTest.java


示例12: createSamplePanel

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Creates and returns a sample panel that uses the sample layout
 * created by {@code #createSampleLayout}. Useful to test the
 * FormLayout serialization in combination with a layout container
 * and some components managed by the FormLayout. Especially it tests
 * the serialization of {@code CellConstraints} objects.
 *
 * @return a sample panel
 */
private static JPanel createSamplePanel() {
    JPanel panel = new JPanel(createSampleLayout());
    panel.add(new JLabel("Test1"),  CC.xy(1, 1, "l, t"));
    panel.add(new JButton("Test2"), CC.xy(2, 2, "c, c"));
    panel.add(new JButton("Test3"), CC.xy(3, 3, "r, b"));
    panel.add(new JButton("Test4"), CC.xy(4, 4, "f, f"));
    panel.doLayout();
    return panel;
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:19,代码来源:SerializationTest.java


示例13: testLabelForWithMnemonic

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks the association between mnemonic label and next component.
 */
public void testLabelForWithMnemonic() {
    builder.add(labelWithMnemonic, CC.xy(1, 1));
    builder.add(plainField,        CC.xy(3, 1));
    assertSame("Labeling label",
            plainField,
            labelWithMnemonic.getLabelFor());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:11,代码来源:PanelBuilderTest.java


示例14: testLabelForWithoutMnemonic

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks the association between plain label and next component.
 */
public void testLabelForWithoutMnemonic() {
    builder.add(labelWithoutMnemonic, CC.xy(1, 1));
    builder.add(plainField,           CC.xy(3, 1));
    assertSame("Labeling label",
            plainField,
            labelWithoutMnemonic.getLabelFor());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:11,代码来源:PanelBuilderTest.java


示例15: testLabelForUnfocusableField

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks the association between label and unfocusable component.
 */
public void testLabelForUnfocusableField() {
    builder.add(labelWithoutMnemonic, CC.xy(1, 1));
    builder.add(unfocusableField,     CC.xy(3, 1));
    assertNull("Labeling label",
            labelWithoutMnemonic.getLabelFor());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:10,代码来源:PanelBuilderTest.java


示例16: testLabelForLabelingLabel

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
/**
 * Checks the association between labeling label and next component.
 */
public void testLabelForLabelingLabel() {
    builder.add(labelingLabel,     CC.xy(1, 1));
    builder.add(plainField,        CC.xy(3, 1));
    builder.add(labelWithMnemonic, CC.xy(1, 3));
    builder.add(new JTextField(),  CC.xy(3, 3));
    assertSame("Labeling label",
            labeledField,
            labelingLabel.getLabelFor());
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:13,代码来源:PanelBuilderTest.java


示例17: MainDialog

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
public MainDialog(final Gui gui, final SecureStore store) {
    this.setTitle("Portalsammler");
    this.setSize(800, 600);
    this.gui = gui;
    this.table = new DocumentTable(gui, store);

    this.setDefaultCloseOperation(EXIT_ON_CLOSE);

    this.filterField = new JTextField();
    this.filterField.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            MainDialog.this.filter();
        }
    });

    final PanelBuilder fpb = new PanelBuilder(new FormLayout(
            "right:pref, 4dlu, fill:pref:grow", "p"));
    fpb.addLabel("&Filter", CC.xy(1, 1));
    fpb.add(this.filterField, CC.xy(3, 1));

    final ButtonBarBuilder bbb = new ButtonBarBuilder();
    this.pollButton = this.createPollButton();
    bbb.addButton(this.pollButton, this.createConfigButton());

    final PanelBuilder builder = new PanelBuilder(new FormLayout(
            "4dlu, fill:pref:grow, 4dlu",
            "4dlu, p, 4dlu, fill:50dlu:grow, 4dlu, p, 4dlu"));
    builder.add(fpb.getPanel(), CC.xy(2, 2));
    builder.add(this.table.createWrappedPanel(), CC.xy(2, 4));
    builder.add(bbb.getPanel(), CC.xy(2, 6));

    this.setContentPane(builder.getPanel());
    this.setLocationRelativeTo(this.getOwner());
}
 
开发者ID:tobiasbaum,项目名称:portalsammler,代码行数:36,代码来源:MainDialog.java


示例18: TextViewer

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
public TextViewer(final String title, final String text) {
    super(title);

    final JTextArea contentArea = new JTextArea(text);
    contentArea.setEditable(false);

    final PanelBuilder builder = new PanelBuilder(new FormLayout(
            "4dlu, fill:350dlu:grow, 4dlu",
            "4dlu, fill:300dlu:grow, 4dlu"));
    builder.add(new JScrollPane(contentArea), CC.xy(2, 2));
    this.setContentPane(builder.getPanel());

    this.pack();
}
 
开发者ID:tobiasbaum,项目名称:portalsammler,代码行数:15,代码来源:TextViewer.java


示例19: initComponents

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    createUIComponents();

    label1 = new JLabel();

    //======== this ========
    setName("this");

    //---- label1 ----
    label1.setText("Prenota uno dei nostri prodotti!");
    label1.setFont(new Font("Dialog", Font.PLAIN, 16));
    label1.setHorizontalAlignment(SwingConstants.CENTER);
    label1.setName("label1");

    //---- button1 ----
    button1.setText("Avvia Prenotazione");
    button1.setFont(new Font("Ubuntu", Font.PLAIN, 14));
    button1.setName("button1");
    button1.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            avviaPrenotazione(e);
        }
    });

    PanelBuilder builder = new PanelBuilder(new FormLayout(
        "[150px,min]:grow, $lcgap, [75dlu,default], $lcgap, [150px,min]:grow",
        "[100px,min]:grow, $lgap, [35dlu,min], $lgap, fill:[100px,min]:grow"), this);

    builder.add(label1,  CC.xy(3, 1));
    builder.add(button1, CC.xy(3, 3, CC.FILL, CC.FILL));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}
 
开发者ID:GameShopAdvance,项目名称:GameShop-Advance,代码行数:35,代码来源:CustomerPanel.java


示例20: initComponents

import com.jgoodies.forms.factories.CC; //导入依赖的package包/类
private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    createUIComponents();


    //======== this ========
    setName("this");

    //---- codiceProdotto ----
    codiceProdotto.setText("text");
    codiceProdotto.setHorizontalAlignment(SwingConstants.CENTER);
    codiceProdotto.setName("codiceProdotto");

    //---- nomeProdotto ----
    nomeProdotto.setText("text");
    nomeProdotto.setName("nomeProdotto");

    //---- quantitaAggiunta ----
    quantitaAggiunta.setText("text");
    quantitaAggiunta.setHorizontalAlignment(SwingConstants.CENTER);
    quantitaAggiunta.setName("quantitaAggiunta");

    //---- quantitaDisponibile ----
    quantitaDisponibile.setText("text");
    quantitaDisponibile.setHorizontalAlignment(SwingConstants.CENTER);
    quantitaDisponibile.setName("quantitaDisponibile");

    PanelBuilder builder = new PanelBuilder(new FormLayout(
        "[25dlu,default,50dlu]:grow, $lcgap, [150dlu,default]:grow, $lcgap, [25dlu,default,40dlu]:grow, $lcgap, [25dlu,default,50dlu]:grow",
        "[35dlu,default]:grow"), this);

    builder.add(codiceProdotto,      CC.xy(1, 1,    CC.FILL, CC.FILL));
    builder.add(nomeProdotto,        CC.xy(3, 1,    CC.FILL, CC.FILL));
    builder.add(quantitaAggiunta,    CC.xy(5, 1,    CC.FILL, CC.FILL));
    builder.add(quantitaDisponibile, CC.xy(7, 1, CC.DEFAULT, CC.FILL));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}
 
开发者ID:GameShopAdvance,项目名称:GameShop-Advance,代码行数:38,代码来源:InventoryCellRenderer.java



注:本文中的com.jgoodies.forms.factories.CC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HtmlMapper类代码示例发布时间:2022-05-23
下一篇:
Java SchedulerResourceTypes类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap