當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。