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