本文整理汇总了Java中org.apache.pivot.wtk.Theme类的典型用法代码示例。如果您正苦于以下问题:Java Theme类的具体用法?Java Theme怎么用?Java Theme使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Theme类属于org.apache.pivot.wtk包,在下文中一共展示了Theme类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.pivot.wtk.Theme; //导入依赖的package包/类
private void init() {
Font labelFont = Theme.getTheme().getFont();
LumpiUtil.setComponentStyle(headingLabel,
"font", labelFont.deriveFont(Font.BOLD));
imageView.setPreferredSize(48, 48);
imageColumn.setWidth(48);
textColumn.setWidth("1*");
headingRow.setHeight(24);
messageRow.setHeight(48);
headingRow.add(new TablePane.Filler());
headingRow.add(headingLabel);
messageRow.add(imageView);
messageRow.add(messageLabel);
getColumns().add(imageColumn);
getColumns().add(textColumn);
getRows().add(headingRow);
getRows().add(messageRow);
}
示例2: startup
import org.apache.pivot.wtk.Theme; //导入依赖的package包/类
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
// fix a bug in Pivot: replace the Tooltip skin class to set the background color of tooltips properly
Theme.getTheme().set(Tooltip.class, FixedTerraTooltipSkin.class);
this.resources = new Resources("groovejames.gui.resources");
this.display = display;
this.settings = Settings.load();
this.downloadTracks.getListListeners().add(new DownloadTracksListListener());
this.imageLoader = new ImageLoader();
Services.getPlayService().setListener(new PlaylistListener());
Services.getPlayService().getPlaylist().getListListeners().add(new PlaylistListListener());
Services.applySettings(settings);
initActions();
window = createWindow();
initShortcuts();
initComponents();
window.open(display);
searchField.requestFocus();
addClipboardListeners();
Services.getWatchClipboardTask().checkNow();
log.info("GUI initialized");
}
示例3: perform
import org.apache.pivot.wtk.Theme; //导入依赖的package包/类
@Override public void perform(Component source) {
Button radioButton = (Button) source;
Services.getPlayService().setRadio(radioButton.isSelected());
String buttonText = radioButton.isSelected() ? "RADIO ON" : "RADIO OFF";
int colorThemeIndex = radioButton.isSelected() ? 16 : 10;
((ButtonData) radioButton.getButtonData()).setText(buttonText);
radioButton.getStyles().put("backgroundColor", ((TerraTheme) Theme.getTheme()).getColor(colorThemeIndex));
radioButton.repaint();
}
示例4: FixedTerraTooltipSkin
import org.apache.pivot.wtk.Theme; //导入依赖的package包/类
public FixedTerraTooltipSkin() {
super();
TerraTheme theme = (TerraTheme) Theme.getTheme();
setBackgroundColor(theme.getColor(4));
}