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


Java FlexComponent类代码示例

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


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

示例1: FontPreferences

import com.trollworks.toolkit.ui.layout.FlexComponent; //导入依赖的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.FlexComponent; //导入依赖的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: createDamageLabelAndField

import com.trollworks.toolkit.ui.layout.FlexComponent; //导入依赖的package包/类
private void createDamageLabelAndField(FlexRow row, String key, String title, String tooltip) {
    PageField field = new PageField(mSheet, key, SwingConstants.RIGHT, false, tooltip);
    PageLabel label = new PageLabel(title, field);
    add(label);
    add(field);
    row.add(new FlexComponent(label, true));
    row.add(new FlexComponent(field, true));
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:9,代码来源:AttributesPanel.java

示例4: addSeparator

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