本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.createImage方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.createImage方法的具体用法?Java SwingTools.createImage怎么用?Java SwingTools.createImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.createImage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIcon
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private Icon getIcon(String plotterName, boolean selected) {
// check to decide which icon size should be loaded
if (!isSmallIconsUsed()) {
if (selected) {
return SwingTools.createImage("icons/chartPreview/" + ICON_SIZE + "/" + plotterName.replace(' ', '_')
+ ".png");
} else {
return SwingTools.createImage("icons/chartPreview/" + ICON_SIZE + "/" + plotterName.replace(' ', '_')
+ "-grey.png");
}
} else {
if (selected) {
return SwingTools.createImage("icons/chartPreview/" + SMALL_ICON_SIZE + "/"
+ plotterName.replace(' ', '_') + ".png");
} else {
return SwingTools.createImage("icons/chartPreview/" + SMALL_ICON_SIZE + "/"
+ plotterName.replace(' ', '_') + "-grey.png");
}
}
}
示例2: createProgressPanel
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
* Creates a panel which displays the process animation and a stop button.
*
* @return the created panel
*/
private JPanel createProgressPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.0;
gbc.weighty = 0.0;
gbc.insets = new Insets(0, 5, 5, 5);
ImageIcon animation = SwingTools
.createImage(I18N.getGUILabel("io.dataimport.step.store_data_to_repository.animation"));
animationLabel = new JLabel(animation);
animationLabel.setHorizontalTextPosition(JLabel.CENTER);
animationLabel.setVerticalTextPosition(JLabel.BOTTOM);
gbc.gridy += 1;
panel.add(animationLabel, gbc);
stopButton = new JButton(
new ResourceAction(true, "io.dataimport.step.store_data_to_repository.stop_data_import_progress") {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
if (backgroundJob != null) {
setEnabled(false);
backgroundJob.cancel();
isImportCancelled = true;
}
}
});
gbc.insets = new Insets(40, 5, 5, 5);
gbc.gridy += 1;
panel.add(stopButton, gbc);
return panel;
}