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


Java Alignment类代码示例

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


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

示例1: FontPreferences

import com.trollworks.toolkit.ui.layout.Alignment; //导入依赖的package包/类
/**
 * Creates a new {@link FontPreferences}.
 *
 * @param owner The owning {@link PreferencesWindow}.
 */
public FontPreferences(PreferencesWindow owner) {
	super(FONTS, owner);
	FlexGrid grid = new FlexGrid();
	String[] keys = Fonts.getKeys();
	mFontPanels = new FontPanel[keys.length];
	int i = 0;
	for (String key : keys) {
		grid.add(new FlexComponent(createLabel(Fonts.getDescription(key), null), Alignment.RIGHT_BOTTOM, Alignment.CENTER), i, 0);
		mFontPanels[i] = new FontPanel(UIManager.getFont(key));
		mFontPanels[i].setActionCommand(key);
		mFontPanels[i].addActionListener(this);
		add(mFontPanels[i]);
		grid.add(mFontPanels[i], i, 1);
		i++;
	}
	grid.apply(this);
}
 
开发者ID:Ayutac,项目名称:toolkit,代码行数:23,代码来源:FontPreferences.java

示例2: createLabelAndField

import com.trollworks.toolkit.ui.layout.Alignment; //导入依赖的package包/类
private void createLabelAndField(FlexGrid grid, int row, String key, String title, String tooltip, int alignment, boolean enabled) {
    PageField field = new PageField(mSheet, key, alignment, enabled, tooltip);
    PageLabel label = new PageLabel(title, field);
    add(label);
    add(field);
    grid.add(new FlexComponent(label, Alignment.RIGHT_BOTTOM, Alignment.CENTER), row, 0);
    grid.add(field, row, 1);
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:9,代码来源:AttributesPanel.java

示例3: createDamageFields

import com.trollworks.toolkit.ui.layout.Alignment; //导入依赖的package包/类
private void createDamageFields(FlexGrid grid, int rowIndex) {
    FlexRow row = new FlexRow();
    row.setHorizontalAlignment(Alignment.CENTER);
    createDamageLabelAndField(row, GURPSCharacter.ID_BASIC_THRUST, BASIC_THRUST, BASIC_THRUST_TOOLTIP);
    row.add(new FlexSpacer(0, 0, false, false));
    createDamageLabelAndField(row, GURPSCharacter.ID_BASIC_SWING, BASIC_SWING, BASIC_SWING_TOOLTIP);
    grid.add(row, rowIndex, 0, 1, 2);
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:9,代码来源:AttributesPanel.java

示例4: addSeparator

import com.trollworks.toolkit.ui.layout.Alignment; //导入依赖的package包/类
/** @param flexContainer The {@link FlexContainer} to add a separator to. */
protected void addSeparator(FlexContainer flexContainer) {
	JSeparator sep = new JSeparator();
	sep.setOpaque(false);
	sep.setMaximumSize(new Dimension(LayoutSize.MAXIMUM_SIZE, 1));
	add(sep);
	FlexComponent comp = new FlexComponent(sep, Alignment.CENTER, Alignment.CENTER);
	comp.setInsets(new Insets(5, 0, 5, 0));
	flexContainer.add(comp);
}
 
开发者ID:Ayutac,项目名称:toolkit,代码行数:11,代码来源:PreferencePanel.java

示例5: createFlexLabel

import com.trollworks.toolkit.ui.layout.Alignment; //导入依赖的package包/类
private FlexComponent createFlexLabel(String title, String tooltip) {
    return new FlexComponent(createLabel(title, tooltip), Alignment.RIGHT_BOTTOM, Alignment.CENTER);
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:4,代码来源:SheetPreferences.java


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