当前位置: 首页>>代码示例>>Java>>正文


Java Paddings类代码示例

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


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

示例1: build

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
public JComponent build() {
	String colSpec = FormLayoutUtil.getColSpec(MAIN_COL_SPEC, orientation);
	FormLayout mainlayout = new FormLayout(colSpec, MAIN_ROW_SPEC);
	FormBuilder builder = FormBuilder.create().layout(mainlayout).border(Paddings.DLU4).opaque(true);

	CellConstraints cc = new CellConstraints();

	if (!configuration.isHideAdvancedOptions()) {
		builder.add(buildRightTabbedPanel()).at(FormLayoutUtil.flip(cc.xyw(4, 1, 3), colSpec, orientation));
		builder.add(buildLeft()).at(FormLayoutUtil.flip(cc.xy(2, 1), colSpec, orientation));
	} else {
		builder.add(buildRightTabbedPanel()).at(FormLayoutUtil.flip(cc.xyw(2, 1, 5), colSpec, orientation));
		builder.add(buildLeft()).at(FormLayoutUtil.flip(cc.xy(2, 1), colSpec, orientation));
	}

	JPanel panel = builder.getPanel();

	// Apply the orientation to the panel and all components in it
	panel.applyComponentOrientation(orientation);

	return panel;
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:23,代码来源:TranscodingTab.java

示例2: getConfigurationPanel

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
@Override
public JComponent getConfigurationPanel() {
	FormLayout layout = new FormLayout(
		"left:pref, 0:grow",
		"p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, 0:grow"
	);
	FormBuilder builder = FormBuilder.create().layout(layout).border(Paddings.EMPTY).opaque(false);

	CellConstraints cc = new CellConstraints();

	noresample = new JCheckBox(Messages.getString("TrTab2.22"), configuration.isAudioResample());
	noresample.setContentAreaFilled(false);
	noresample.addItemListener(new ItemListener() {
		@Override
		public void itemStateChanged(ItemEvent e) {
			configuration.setAudioResample(e.getStateChange() == ItemEvent.SELECTED);
		}
	});
	builder.add(GuiUtil.getPreferredSizeComponent(noresample)).at(cc.xy(2, 3));

	return builder.getPanel();
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:23,代码来源:FFmpegAudio.java

示例3: testValidEncodings

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
/**
 * Checks that the constructor rejects negative resize weights.
 */
public static void testValidEncodings() {
    assertInsetsEquals(
            Paddings.DLU14,
            Paddings.createPadding("14dlu, 14dlu, 14dlu, 14dlu"));
    assertInsetsEquals(
            Paddings.DLU14,
            Paddings.createPadding("   14dlu , 14dlu , 14dlu , 14dlu "));
    assertInsetsEquals(
            Paddings.createPadding(Sizes.DLUY1, Sizes.DLUX2, Sizes.DLUY3, Sizes.DLUX4),
            Paddings.createPadding("   1dlu , 2dlu , 3dlu , 4dlu "));
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:15,代码来源:PaddingsTest.java

示例4: setupGui

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
private void setupGui() {
    JPanel chooseStyle = FormBuilder.create()
            .columns("0:grow, $lcgap, pref, $lcgap, 0:grow")
            .rows("pref, $lg, fill:pref:grow, $lg, pref:grow, $lg, pref:grow, $lg, pref:grow")
            .padding(Paddings.DIALOG)

            .addSeparator(Localization.lang("Current Preview")).xyw(1, 1, 5)
            .add(available).xywh(1, 3, 1, 7)
            .add(chosen).xywh(5, 3, 1, 7)

            .add(btnRight).xy(3, 3, "fill, bottom")
            .add(btnLeft).xy(3, 5, "fill, top")
            .add(btnUp).xy(3, 7, "fill, bottom")
            .add(btnDown).xy(3, 9, "fill, top")
            .build();

    JPanel preview = FormBuilder.create()
            .columns("pref:grow, $lcgap, pref, $lcgap, pref")
            .rows("pref, $lg, fill:pref:grow")
            .padding(Paddings.DIALOG)

            .addSeparator(Localization.lang("Preview")).xy(1, 1)
            .add(btnTest).xy(3, 1)
            .add(btnDefault).xy(5, 1)
            .add(scrollPane).xyw(1, 3, 5)
            .build();

    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    add(chooseStyle, BorderLayout.CENTER);
    add(preview, BorderLayout.PAGE_END);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:32,代码来源:PreviewPrefsTab.java

示例5: border

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
/**
 * Sets the panel's border as an EmptyBorder using the given specification
 * for the top, left, bottom, right in DLU. For example
 * "1dlu, 2dlu, 3dlu, 4dlu" sets an empty border with 1dlu in the top,
 * 2dlu in the left side, 3dlu at the bottom, and 4dlu in the right hand
 * side.<p>
 *
 * Equivalent to {@code padding(Paddings.createPadding(paddingSpec))}.
 *
 * @param paddingSpec   describes the top, left, bottom, right sizes
 *    of the EmptyBorder to create
 *
 * @see Paddings#createPadding(String, Object...)
 *
 * @since 1.6
 * 
 * @deprecated Replaced by {@link #padding(String, Object...)}
 */
@Deprecated
public B border(String paddingSpec) {
    padding(Paddings.createPadding(paddingSpec));
    return (B) this;
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:24,代码来源:AbstractBuilder.java

示例6: padding

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
/**
 * Sets the panel's padding as an EmptyBorder using the given specification
 * for the top, left, bottom, right margins in DLU. For example
 * "1dlu, 2dlu, 3dlu, 4dlu" sets an empty border with 1dlu in the top,
 * 2dlu in the left side, 3dlu at the bottom, and 4dlu in the right hand
 * side.<p>
 *
 * Equivalent to {@code setPadding(Paddings.createPadding(paddingSpec))}.
 *
 * @param paddingSpec   describes the top, left, bottom, right margins
 *    of the padding (an EmptyBorder) to use
 * @param args          optional format arguments,
 *  used if {@code paddingSpec} is a format string
 * @return a reference to this builder
 *
 * @see #padding(EmptyBorder)
 * @see Paddings#createPadding(String, Object...)
 * 
 * @since 1.9
 */
public B padding(String paddingSpec, Object... args) {
    padding(Paddings.createPadding(paddingSpec, args));
    return (B) this;
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:25,代码来源:AbstractBuilder.java

示例7: padding

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
/**
 * Sets the panel's padding as an EmptyBorder using the given specification
 * for the top, left, bottom, right margins in DLU. For example
 * "1dlu, 2dlu, 3dlu, 4dlu" sets an empty border with 1dlu in the top,
 * 2dlu in the left side, 3dlu at the bottom, and 4dlu in the right hand
 * side.<p>
 *
 * Equivalent to {@code padding(Paddings.createPadding(paddingSpec, args))}.
 *
 * @param paddingSpec   describes the top, left, bottom, right margins
 *    of the padding (an EmptyBorder) to use
 * @param args          optional format arguments,
 *                      used if {@code paddingSpec} is a format string
 * @return a reference to this builder
 *
 * @see #padding(EmptyBorder)
 * @see Paddings#createPadding(String, Object...)
 * 
 * @since 1.9
 */
public B padding(String paddingSpec, Object... args) {
	padding(Paddings.createPadding(paddingSpec, args));
	return (B) this;
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:25,代码来源:AbstractFormBuilder.java

示例8: padding

import com.jgoodies.forms.factories.Paddings; //导入依赖的package包/类
/**
 * Sets the panel's padding as an EmptyBorder using the given specification
 * for the top, left, bottom, right margins in DLU. For example
 * "1dlu, 2dlu, 3dlu, 4dlu" sets an empty border with 1dlu in the top,
 * 2dlu in the left side, 3dlu at the bottom, and 4dlu in the right hand
 * side.<p>
 *
 * Equivalent to {@code padding(Paddings.createPadding(paddingSpec, args))}.
 *
 * @param paddingSpec   describes the top, left, bottom, right margins
 *    of the padding (an EmptyBorder) to use
 * @param args          optional format arguments,
 *                      used if {@code paddingSpec} is a format string
 * @return a reference to this builder
 *
 * @see #padding(EmptyBorder)
 * @see Paddings#createPadding(String, Object...)
 * 
 * @since 1.9
 */
public ListViewBuilder padding(String paddingSpec, Object... args) {
    padding(Paddings.createPadding(paddingSpec, args));
    return this;
}
 
开发者ID:JFormDesigner,项目名称:swing-jgoodies-forms,代码行数:25,代码来源:ListViewBuilder.java


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