本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}